Hanya Sebagai Pengingat

=================================

Senin, 25 Juli 2011

Membuat Connection Pool di Glassfish

mugi22@mugi22:~/glassfish-3.0.1/glassfish/bin$ ./asadmin create-jdbc-connection-pool --datasourceclassname com.mysql.jdbc.jdbc2.optional.MysqlDataSource --restype javax.sql.DataSource --property user=root:password=pegadaian:url="jdbc\:mysql\://localhost\:3306/crud" mysql_crud17

Command create-jdbc-connection-pool executed successfully.

###ConnectionPoolDataSource


buatt JDBCNYA
./asadmin create-jdbc-resource --connectionpoolid oracle_lendor_cn1 jdbc/cn1

./asadmin create-jdbc-resource --connectionpoolid oracle_lendor_cn2 jdbc/cn2

./asadmin create-jdbc-resource --connectionpoolid oracle_lendor_cn3 jdbc/cn3















$GLASSFISH_HOME/bin/asadmin start-domain

$GLASSFISH_HOME/bin/asadmin create-jdbc-connection-pool --datasourceclassname com.mysql.jdbc.jdbc2.optional.MysqlXADataSource --property user=root:password=xxx:DatabaseName=test:ServerName=localhost:port=3306 mysql-pool
$GLASSFISH_HOME/bin/asadmin create-jdbc-resource --connectionpoolid mysql-pool jdbc/test

$GLASSFISH_HOME/bin/asadmin stop-domain

cd $GLASSFISH_HOME/domains/domain1/config
cat domain.xml | sed "s/xxx//" > domain.xml.replaced
mv domain.xml domain.xml.original
mv domain.xml.replaced domain.xml

$GLASSFISH_HOME/bin/asadmin start-domain

Tidak ada komentar: