Skip to content

Commit

Permalink
Merge pull request oracle#1102 from mriccell/master
Browse files Browse the repository at this point in the history
Remove configuration of DERBY DB from sample
  • Loading branch information
mriccell authored Jan 3, 2019
2 parents 15f8c73 + 1db6a0a commit d6d5397
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 72 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Example Image with a WebLogic Server Domain
=============================================
This Dockerfile extends the Oracle WebLogic image by creating a sample WebLogic Server 12.2.1.3 domain and cluster into a Docker image.

A domain is created inside the image and utility scripts are copied into the image, enabling users to start an Administration Server and a Managed Server, each running in separate containers. As part of the domain configuration, there is a data source that connects to a Derby database started in the Admin Server container. The data source in the Managed servers connect to the Derby database in the Administration Server container.
A domain is created inside the image and utility scripts are copied into the image, enabling users to start an Administration Server and a Managed Server, each running in separate containers.

**Note:** In this sample, the WebLogic Servers are configured with a blank listen address; when running JTA transactions, you must use a DNS server to configure the listen addresses to use DNS names.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def getEnvVar(var):
print('cluster_type : [%s]' % cluster_type);
print('managed_server_name_base : [%s]' % managed_server_name_base);
print('production_mode_enabled : [%s]' % production_mode_enabled);
print('dsname : [%s]' % dsname);
#print('dsname : [%s]' % dsname);
print('t3_channel_port : [%s]' % t3_channel_port);
print('t3_public_address : [%s]' % t3_public_address);

Expand Down Expand Up @@ -159,46 +159,46 @@ def getEnvVar(var):

# Create a Data Source
# ======================
cd('/')
print('Configuring a Data Source: %s' % dsname);
create(dsname, 'JDBCSystemResource')
cd('/JDBCSystemResource/' + dsname + '/JdbcResource/' + dsname)
cmo.setName(dsname)

cd('/JDBCSystemResource/' + dsname + '/JdbcResource/' + dsname)
create('myJdbcDataSourceParams','JDBCDataSourceParams')
cd('JDBCDataSourceParams/NO_NAME_0')
set('JNDIName', java.lang.String(dsjndiname))
set('GlobalTransactionsProtocol', java.lang.String('None'))

cd('/JDBCSystemResource/' + dsname + '/JdbcResource/' + dsname)
create('myJdbcDriverParams','JDBCDriverParams')
cd('JDBCDriverParams/NO_NAME_0')
set('DriverName', dsdriver)
set('URL', dsurl)
set('PasswordEncrypted', dspassword)
set('UseXADataSourceInterface', 'false')

print 'create JDBCDriverParams Properties'
create('myProperties','Properties')
cd('Properties/NO_NAME_0')
create('user','Property')
cd('Property/user')
set('Value', dsusername)

cd('../../')
create('databaseName','Property')
cd('Property/databaseName')
set('Value', dsdbname)

print 'create JDBCConnectionPoolParams'
cd('/JDBCSystemResource/' + dsname + '/JdbcResource/' + dsname)
create('myJdbcConnectionPoolParams','JDBCConnectionPoolParams')
cd('JDBCConnectionPoolParams/NO_NAME_0')
set('TestTableName','SQL SELECT 1 FROM DUAL')
set('InitialCapacity',int(dsinitalcapacity))

print('Done setting attributes for Data Source: %s' % dsname);
#cd('/')
#print('Configuring a Data Source: %s' % dsname);
#create(dsname, 'JDBCSystemResource')
#cd('/JDBCSystemResource/' + dsname + '/JdbcResource/' + dsname)
#cmo.setName(dsname)

#cd('/JDBCSystemResource/' + dsname + '/JdbcResource/' + dsname)
#create('myJdbcDataSourceParams','JDBCDataSourceParams')
#cd('JDBCDataSourceParams/NO_NAME_0')
#set('JNDIName', java.lang.String(dsjndiname))
#set('GlobalTransactionsProtocol', java.lang.String('None'))

#cd('/JDBCSystemResource/' + dsname + '/JdbcResource/' + dsname)
#create('myJdbcDriverParams','JDBCDriverParams')
#cd('JDBCDriverParams/NO_NAME_0')
#set('DriverName', dsdriver)
#set('URL', dsurl)
#set('PasswordEncrypted', dspassword)
#set('UseXADataSourceInterface', 'false')

#print 'create JDBCDriverParams Properties'
#create('myProperties','Properties')
#cd('Properties/NO_NAME_0')
#create('user','Property')
#cd('Property/user')
#set('Value', dsusername)

#cd('../../')
#create('databaseName','Property')
#cd('Property/databaseName')
#set('Value', dsdbname)

#print 'create JDBCConnectionPoolParams'
#cd('/JDBCSystemResource/' + dsname + '/JdbcResource/' + dsname)
#create('myJdbcConnectionPoolParams','JDBCConnectionPoolParams')
#cd('JDBCConnectionPoolParams/NO_NAME_0')
#set('TestTableName','SQL SELECT 1 FROM DUAL')
#set('InitialCapacity',int(dsinitalcapacity))

#print('Done setting attributes for Data Source: %s' % dsname);

# Assign
# ======
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,6 @@ if [ -z "${JAVA_OPTIONS}" ]; then
fi
export JAVA_OPTIONS=${JAVA_OPTIONS}

#Define start of Derby Database
#echo "Java Options: ${JAVA_OPTIONS}"
#DERBY_FLAG=`awk '{print $1}' ${SEC_PROPERTIES_FILE} | grep ^DERBY_FLAG= | cut -d "=" -f2`
#if [ -z "${DERBY_FLAG}" ]; then
# DERBY_FLAG="true"
#fi
#export DERBY_FLAG=${DERBY_FLAG}
#echo "Start Derby: ${DERBY_FLAG}"

# Create domain
mkdir -p ${AS_SECURITY}
echo "username=${USER}" >> ${AS_SECURITY}/boot.properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,6 @@ fi
export JAVA_OPTIONS=${JAVA_OPTIONS}
echo "Java Options: ${JAVA_OPTIONS}"

#Set env to Start Derby DB
#DERBY_FLAG=`awk '{print $1}' ${SEC_PROPERTIES_FILE} | grep ^DERBY_FLAG= | cut -d "=" -f2`
#if [ -z "${DERBY_FLAG}" ]; then
# DERBY_FLAG="true"
#fi
#export DERBY_FLAG=${DERBY_FLAG}
#echo "Start Derby: ${DERBY_FLAG}"

# Create Managed Server
mkdir -p ${MS_SECURITY}
echo "username=${USER}" >> ${MS_SECURITY}/boot.properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,11 @@ CLUSTER_NAME=cluster-1
DEBUG_PORT=8453
DB_PORT=1527
DEBUG_FLAG=true
DERBY_FLAG=true
PRODUCTION_MODE_ENABLED=true
CLUSTER_TYPE=DYNAMIC
JAVA_OPTIONS=-Dweblogic.StdoutDebugEnabled=false
T3_CHANNEL_PORT=30012
T3_PUBLIC_ADDRESS=kubernetes
#Derby Data Source parameters
dsname=DockerDS
dsdbname=DerbyDB;create=true
dsjndiname=/DockerDS
dsdriver=org.apache.derby.jdbc.ClientXADataSource
dsurl=jdbc:derby://localhost:1527/DerbyDB;ServerName=localhost;databaseName=DerbyDB;create=true
dsusername=dbuser
dspassword=dbpassword
dstestquery=SQL SELECT 1 FROM SYS.SYSTABLES
dsinitalcapacity=0
dsmaxcapacity=15
#Oracle database settings
#dsname=DockerDS2
#dsdbname=default;create=true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
username=myuser
password=mypassword1
JAVA_OPTIONS=-Dweblogic.StdoutDebugEnabled=false
DERBY_FLAG=true

0 comments on commit d6d5397

Please sign in to comment.