Hi,

To wrap the connection pool in a DataSource, you will also need the
following line in your weblogic.properties file:

weblogic.jdbc.TXDataSource.myJtsDataSource=SybaseDB

Lookup is simply:

ds = (javax.sql.DataSource)ctxt.lookup("myJtsDataSource");

If you want different beans to use different DataSources or connection
pools, then you would register more than one DataSource in
weblogic.properties;  put the DataSource name as an Envionrment Naming
Context value in your bean's DD, and do lookup of this value.

Gene



----- Original Message -----
From: "Diwakar Killamsetty" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 24, 2000 10:03 PM
Subject: Problem with Weblogic


> I am novice to Java Technologies.
>
> I am using Weblogic as EJBean container and Sybase as Resource Manager.
>
> In weblogic.properties I mentioned the following details to make
connection
> pool:
>
> weblogic.jdbc.connectionPool.SybaseDB=\
>          url=jdbc:sybase:Tds:db1.hyd.wilco-int.com:1400/STB2LocalData,\
>          driver=com.sybase.jdbc2.jdbc.SybDriver,\
>          initialCapacity=1,\
>          maxCapacity=2,\
>          capacityIncrement=1,\
>          props=user=stb2;password=stb2user
> weblogic.allow.reserve.weblogic.jdbc.connectionPool.SybaseDB= everyone
> weblogic.allow.reset.weblogic.jdbc.connectionPool.SybaseDB= everyone
> weblogic.allow.shrink.weblogic.jdbc.connectionPool.SybaseDB= everyone
>
> The deployment descriptor has the following details:
>
> <resource-ref>
>   <description>DataSource</description>
>   <res-ref-name>jdbc/SybaseDB</res-ref-name>
>   <res-type>javax.sql.DataSource</res-type>
>   <res-auth>Container</res-auth>
> </resource-ref>
>
> And from EJBean I am trying to access a connection from the connection
pool.
>
> InitialContext ctx = new InitialContext();
> DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/SybaseDB");
> Connection connection = ds.getConnection("stb2user", "stb2");
>
> While deploying I am getting an error:
>
> ERROR: Error from ejbc: No JNDI name set for the referenced resource
factory
> for reference jdbc/SybaseDB of type javax.sql.DataSource
>
> Please let me know how to solve this problem.
>
> regards,
>
> Diwakar.
> (office) +91-40-3308600 x8547.
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff EJB-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to