in JBoss.xml I define:
<resource-managers>
<resource-manager res-class="org.jboss.ejb.deployment.JDBCResource">
<res-name>oraclePool</res-name>
<res-jndi-name>oraclePool</res-jndi-name>
</resource-manager>
</resource-managers>
in the java source code you can do like:
protected Connection getConnection() throws SQLException
{
InitialContext initCtx = null;
String aOraclePoolName = "java:comp/env/jdbc/oraclePool";
try {
initCtx = new InitialContext();
DataSource ds = (DataSource) initCtx.lookup(aOraclePoolName);
return ds.getConnection();
}
....
}
On Wed, 23 May 2001 21:30:31 -0700, Lan Nguyen wrote:
>*This message was transferred with a trial version of CommuniGate(tm) Pro*
>Hi Everyone;
>
>After you modify the jboss.jcml to include
><mbean code="org.jboss.jdbc.XADataSourceLoader"
>name="DefaultDomain:service=XADataSource,name=OracleDS">
> <attribute name="PoolName">OracleDS</attribute>
> <attribute
>name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImp
>l</attribute>
> <attribute
>name="URL">jdbc:oracle:thin:@serverhostname:1521:ORCL</attribute>
> <attribute name="JDBCUser">scott</attribute>
> <attribute name="Password">tiger</attribute>
></mbean>
>
>how do you access this connection pool in the client program??
>
>ps - does any one have an example of a client program for connection
>pooling??
>Thank
>
>-Lan
>
>
>_______________________________________________
>JBoss-user mailing list
>[EMAIL PROTECTED]
>http://lists.sourceforge.net/lists/listinfo/jboss-user
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user