Skip to content

Instantly share code, notes, and snippets.

@adikari
Last active April 24, 2017 09:18
Show Gist options
  • Save adikari/7ca78154963627e31ead0419c480981a to your computer and use it in GitHub Desktop.
Save adikari/7ca78154963627e31ead0419c480981a to your computer and use it in GitHub Desktop.
create jdbc pool and resource using asadmin
asadmin create-jdbc-connection-pool \
--datasourceclassname org.apache.derby.jdbc.ClientDataSource \
--restype javax.sql.DataSource \
--property URL=“jdbc\\:derby\\://localhost\\:1527/sun-appserv-samples”:driverClass=org.apache.derby.jdbc.ClientDriver:Password=APP:portNumber=1527:databaseName=APP:User=APP:serverName=localhost JDBC
asadmin create-jdbc-resource —connectionpoolid JDBC jdbc/APP
asadmin set server-config.security-service.activate-default-principal-to-role-mapping=true
create-auth-realm --classname com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm \
--property defaultuser=admin:Password=admin \
JDBC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment