Hi Manish,
You need to give a resource reference in the deployment
plan. Geronimo does not have a Global JNDI context currently since its
not mandated by the J2EE spec. So you will be able to lookup and
access the datasource from JNDI only within the module in which it is
defined. The usage can be seen by going to Database pools and clicking
on the usage link near a currently deployed pool. I am also showing it
below
In your j2ee deployment descriptor (eg web.xml)add the following
<resource-ref>
<res-ref-name>jdbc/MyDataSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
In your geronimo specific descriptor (eg geronimo-web.xml) add the following
<resource-ref>
<ref-name>jdbc/MyDataSource</ref-name>
<resource-link>SystemDatasource</resource-link>
</resource-ref>
Note that the contents of <res-ref-name> tag in web.xml should be the
same as the contents of <ref-name> tag in geronimo-web.xml and that
will match the name you lookup in
JNDI(java:comp/env/jdbc/MyDataSource)
SystemDatasource is the name of the datasource you deploy on geronimo
Thanks
Manu
On 8/8/06, Manish Satwani <[EMAIL PROTECTED]> wrote:
Hi All,
Please tell me How can I give JNDI Name of Database pool in Geronimo 1.1 ,
there is no way to define from the console.
How can I give in deployment Plan
Thanks
Manish Satwani
Senior Software Engineer
Aceva Technologies | Unlock Your Working Capital
A-1501, Signature Towers - I,
South City, Gurgaon,
Haryana – 122001
Call at:
+91-124-2805091/92 Ext. 35
+91-99113-16998
Visit: http://www.aceva.com