Concerns and issues relating to all versions of WebSphere Application Server
Do you know how to configure JDBC, DataSources, etc using wsadminlib.py library ?
See:
https://cwiki.apache.org/ARCHIVA/archiva-on-websphere-61.html
Specifically, the file, createArchivaServer.py, from:
https://cwiki.apache.org/ARCHIVA/archiva-on-websphere-61.data/createArchivaServer.py
And this is the relevant sections from the file:
# Specify the DB2 details.
db2DriverPath = "/usr/opt/db2_08_01/java"
db2Alias = "DB2ArchivaUserId"
db2UserId = "db2inst1"
db2Password = "db2inst1"
# JNDI details
db2DatabaseName = "ARCHIVA"
db2DriverType = "4"
db2ServerName = "localhost"
db2PortNumber = "50000"
and
# Set the WebSpere Variable needed to for the universal driver. In this case, we just set it for
# the individual server. To set it for the entire node, just remove the serverName variable completely.
print "Setting WebSphere Variable"
setWebSphereVariable( "DB2UNIVERSAL_JDBC_DRIVER_PATH", db2DriverPath, nodeName, serverName)
# Create a JAAS entry for the userid/password for the DB2 datasource.
# If the entry already exists, the function simply returns.
createJAAS(db2Alias, db2UserId, db2Password)
# Create the DB2 Universal Driver
print "Creating the DB2 Universal Driver Provider"
serverId = getServerId(nodeName,serverName)
jdbcProvider = createJdbcProvider ( serverId, "DB2 Universal JDBC Driver Provider", "${DB2UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc.jar;${UNIVERSAL_JDBC_DRIVER_PATH}/db2cc_license_cu.jar;${DB2UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc_license_cisuz.jar", "", "com.ibm.db2.jcc.DB2ConnectionPoolDataSource", "Non-XA DB2 Universal JDBC Driver-compliant Provider. Datasources created under this provider support only 1-phase commit processing except in the case where driver type 2 is used under WAS z/OS. On WAS z/OS, driver type 2 uses RRS and supports 2-phase commit processing." )
print "Created: jdbcProvider = " + jdbcProvider
# Create the JNDI Data Sources
# First, jdbc/users
print "Creating the Users Database Data Source"
usersDataSource = createDataSource( jdbcProvider, "Users Database", "jdbc/users", "jdbc/users", 10, db2Alias, "com.ibm.websphere.rsadapter.DB2UniversalDataStoreHelper" )
print "Created: usersDataSource = " + usersDataSource
setJ2eeResourceProperty( usersDataSource, "databaseName", "java.lang.String", db2DatabaseName, "The name of the database." )
setJ2eeResourceProperty( usersDataSource, "driverType", "java.lang.Integer", db2DriverType, "The JDBC connectivity-type of a data source." )
setJ2eeResourceProperty( usersDataSource, "serverName", "java.lang.String", db2ServerName, "The TCP/IP address or host name for the DRDA server." )
setJ2eeResourceProperty( usersDataSource, "portNumber", "java.lang.Integer", db2PortNumber, "The TCP/IP port number where the DRDA server resides." )
# Then, jdbc/archiva
print "Creating the Archiva Database Data Source"
archivaDataSource = createDataSource( jdbcProvider, "Archiva Database", "jdbc/archiva", "jdbc/archiva", 10, db2Alias, "com.ibm.websphere.rsadapter.DB2UniversalDataStoreHelper" )
print "Created: archivaDataSource = " + archivaDataSource
setJ2eeResourceProperty( archivaDataSource, "databaseName", "java.lang.String", db2DatabaseName, "The name of the database." )
setJ2eeResourceProperty( archivaDataSource, "driverType", "java.lang.Integer", db2DriverType, "The JDBC connectivity-type of a data source." )
setJ2eeResourceProperty( archivaDataSource, "serverName", "java.lang.String", db2ServerName, "The TCP/IP address or host name for the DRDA server." )
setJ2eeResourceProperty( archivaDataSource, "portNumber", "java.lang.Integer", db2PortNumber, "The TCP/IP port number where the DRDA server resides." )
Courtesy IBMer Chris Graham from down under.
Labels: configuration
Post a Comment
Note: Only a member of this blog may post a comment.