geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: JNDI initialization and browsing question.
Date Tue, 12 Jul 2005 16:42:49 GMT

On Jul 11, 2005, at 6:26 PM, Piotr Przybylski wrote:

>
> Hi,
> I have a question about JNDI maybe someone can help me with. Does JNDI  
> require any special initialization and is there a way to browse it,  
> other than using JNDI API? I am  running into JNDI lookup problem on  
> M3 driver. I am using a simple resource adapter RAR file (v 1.5  
> compliant). When I deploy it to the server, it deploys fine. The  
> application (with JSP) also deploys fine but when I try to lookup the  
> connection from the jsp triggered class, the JNDI context seems empty,  
> the lookup of the following does not find anything:
this one should work:
> - java:comp/env/test/j2c/po/dii/order/Order_CF
these should not work:
> - test/j2c/po/dii/order/Order_CF
> - g2MyTestAdapterCF
>
> The global context seems to contain only JMXConnector Object.
I don't recommend using the global context.  Use the java:comp stuff as  
you are trying to do.
>
> Below are the relevant fragmnets of the configuration files used to  
> deploy connector and application.
>
> Thank you, any help greatly appreciated.
>
> Regards,
>
> Piotr Przybylski.
>
> geronimo-jetty.xml:
>         <naming:resource-ref>
>                  
> <naming:ref-name>test/j2c/po/dii/order/Order_CF</naming:ref-name>
>                  
> <naming:resource-link>g2MyTestAdapter</naming:resource-link>
>         </naming:resource-ref>
>
>
> web.xml:
>         <resource-ref>
>                  
> <res-ref-name>test/j2c/po/dii/order/Order_CF</res-ref-name>
>                  
> <res-type>javax.resource.cci.ConnectionFactory</res-type>
>                 <res-auth>Container</res-auth>
>                 <res-sharing-scope>Shareable</res-sharing-scope>
>         </resource-ref>
>
>
> geronimo-ra.xml
>
> ...
> <resourceadapter>
>    <outbound-resourceadapter>
>    <connection-definition>
>        
> <connectionfactory-interface>javax.resource.cci.ConnectionFactory</ 
> connectionfactory-interface>
>    <connectiondefinition-instance>
>       <name>g2MyTestAdapter</name>
>       <config-property-setting  
> name="ServerName">localhost</config-property-setting>
>       <config-property-setting  
> name="UserName">user</config-property-setting>
>         <connectionmanager>
>             <no-transaction />
>           <single-pool>
>               <max-size>10</max-size>
>                
> <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
>               <match-one />
>           </single-pool>
>     </connectionmanager>
>     <global-jndi-name>TestAdapterCF</global-jndi-name>
>   </connectiondefinition-instance>
>   </connection-definition>
>   </outbound-resourceadapter>
>   </resourceadapter>
>   </connector>
>
>

I don't see what is wrong here, this looks correct to me.  Can you look  
in the log  (var/log/geronimo.log) and verify that a gbean for the  
connection factory started? It is probably easiest to search for name=  
g2MyTestAdapter

I would expect that you would get a deployment error if the  
resource-link was not resolvable, so I think the most likely  
explanation is that for some reason the connector didn't start  
properly.  By looking for the object name in the log you may be able to  
find out why.

hope this helps,
david jencks
>


Mime
View raw message