geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manu George" <manu.t.geo...@gmail.com>
Subject Re: How Can I give global jndi name od Database pool in geronimo 1.1
Date Tue, 08 Aug 2006 05:52:23 GMT
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 <manish.satwani@gmail.com> 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

Mime
View raw message