Skip to content

@brunoborges /create-demoiselle-ds.py
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Script para criar um Data Source chamado 'jdbc/demoiselle' usando o banco Derby (em memória) para rodar um projeto Demoiselle de exemplo. Para saber mais, veja no http://blogs.oracle.com/brunoborges
connect('weblogic', 'welcome1', 't3://localhost:7001')
edit()
startEdit()
cd('/')
cmo.createJDBCSystemResource('jdbc/demoiselle')
cd('/JDBCSystemResources/jdbc/demoiselle/JDBCResource/jdbc/demoiselle')
cmo.setName('jdbc/demoiselle')
cd('/JDBCSystemResources/jdbc/demoiselle/JDBCResource/jdbc/demoiselle/JDBCDataSourceParams/jdbc/demoiselle')
set('JNDINames',jarray.array([String('jdbc/demoiselle')], String))
cd('/JDBCSystemResources/jdbc/demoiselle/JDBCResource/jdbc/demoiselle/JDBCDriverParams/jdbc/demoiselle')
cmo.setUrl('jdbc:derby://localhost:1527/demoiselle;ServerName=localhost;databaseName=demoiselle')
cmo.setDriverName('org.apache.derby.jdbc.ClientXADataSource')
setEncrypted('Password', 'Password_1389107767408', '/home/bruno/Work/tools/oracle/wls1212/user_projects/domains/base_domain/Script1389107730212Config', '/home/bruno/Work/tools/oracle/wls1212/user_projects/domains/base_domain/Script1389107730212Secret')
cd('/JDBCSystemResources/jdbc/demoiselle/JDBCResource/jdbc/demoiselle/JDBCConnectionPoolParams/jdbc/demoiselle')
cmo.setTestTableName('SQL SELECT 1 FROM SYS.SYSTABLES\r\n\r\n')
cd('/JDBCSystemResources/jdbc/demoiselle/JDBCResource/jdbc/demoiselle/JDBCDriverParams/jdbc/demoiselle/Properties/jdbc/demoiselle')
cmo.createProperty('user')
cd('/JDBCSystemResources/jdbc/demoiselle/JDBCResource/jdbc/demoiselle/JDBCDriverParams/jdbc/demoiselle/Properties/jdbc/demoiselle/Properties/user')
cmo.setValue('demoiselle')
cd('/JDBCSystemResources/jdbc/demoiselle/JDBCResource/jdbc/demoiselle/JDBCDriverParams/jdbc/demoiselle/Properties/jdbc/demoiselle')
cmo.createProperty('portNumber')
cd('/JDBCSystemResources/jdbc/demoiselle/JDBCResource/jdbc/demoiselle/JDBCDriverParams/jdbc/demoiselle/Properties/jdbc/demoiselle/Properties/portNumber')
cmo.setValue('1527')
cd('/JDBCSystemResources/jdbc/demoiselle/JDBCResource/jdbc/demoiselle/JDBCDriverParams/jdbc/demoiselle/Properties/jdbc/demoiselle')
cmo.createProperty('databaseName')
cd('/JDBCSystemResources/jdbc/demoiselle/JDBCResource/jdbc/demoiselle/JDBCDriverParams/jdbc/demoiselle/Properties/jdbc/demoiselle/Properties/databaseName')
cmo.setValue('demoiselle;create=true')
cd('/JDBCSystemResources/jdbc/demoiselle/JDBCResource/jdbc/demoiselle/JDBCDriverParams/jdbc/demoiselle/Properties/jdbc/demoiselle')
cmo.createProperty('serverName')
cd('/JDBCSystemResources/jdbc/demoiselle/JDBCResource/jdbc/demoiselle/JDBCDriverParams/jdbc/demoiselle/Properties/jdbc/demoiselle/Properties/serverName')
cmo.setValue('localhost')
cd('/JDBCSystemResources/jdbc/demoiselle/JDBCResource/jdbc/demoiselle/JDBCDataSourceParams/jdbc/demoiselle')
cmo.setGlobalTransactionsProtocol('TwoPhaseCommit')
cd('/JDBCSystemResources/jdbc/demoiselle')
set('Targets',jarray.array([ObjectName('com.bea:Name=AdminServer,Type=Server')], ObjectName))
save()
activate()
#stopEdit()
#activate()
exit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.