sorry wrong list... ;-)

> -----Ursprüngliche Nachricht-----
> Von: Kristian Köhler [mailto:[EMAIL PROTECTED]
> Gesendet: Mittwoch, 26. September 2007 12:21
> An: Geronmio-Dev (E-Mail)
> Betreff: How to register a Datasource in GlobalJNDI Namespace?
> 
> 
> Hi
> 
> i use a custom deployment mechanism to install my application 
> into Geronimo 2.0.1. I have no special deployment plan for 
> that kind of application. One component out of my application 
> wants to access the DataSource registered within Geronimo 
> Application server. The component tries to lookup the db via 
> a JNDI lookup call.
> 
> My idea is to register the DB within the Global JNDI 
> Namespace and that access it from within my application. I 
> configured the pool via deployment plan and registered a 
> GBeanBinding GBean for the registration in the Global Namespace.
> 
> My problem is: What's the name of the DBPool to access/ to 
> link to with the GBeanBinding? Is this a passable way to do this?
> 
> Here is the plan:
> 
> ----- 8< -----
> 
> <connector 
> xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-${gero
> nimoSchemaVersion}">
> 
>     <resourceadapter>
>         <outbound-resourceadapter>
>             <connection-definition>
>                 
> <connectionfactory-interface>javax.sql.DataSource</connectionf
> actory-interface>
>                 <connectiondefinition-instance>
>                  <name>Datasource</name>
>                   ...
>                 </connectiondefinition-instance>
>             </connection-definition>
>         </outbound-resourceadapter>
>     </resourceadapter>
> 
>     <gbean name="MyDatabaseBinding" 
> class="org.apache.geronimo.gjndi.binding.GBeanBinding">
>         <attribute name="name">Database</attribute>
>         <attribute 
> name="abstractNameQuery">?name=Datasource</attribute>
>         <reference name="Context">
>             <name>JavaContext</name>
>         </reference>
>     </gbean>
> 
> ----- 8< -----
> 
> 
> Thanks!
> 
> Kristian
> 

Reply via email to