geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Klopp, Alexander" <alexander.kl...@siemens.com>
Subject Need help with jndi configuration of a datasource
Date Wed, 12 Nov 2008 10:40:54 GMT
Hi all, 
 
I'm working with geronimo 2.1. 
I've created some stateless session beans using the annotation principle
(without having an ejb-jar.xml)
The beans access to a datasource defined in the dbpool section of the
console.
 
My openejb-jar.xml looks like
 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.2
<BLOCKED::http://www.openejb.org/xml/ns/openejb-jar-2.2> " 
  xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2
<BLOCKED::http://geronimo.apache.org/xml/ns/deployment-1.2> "> 
  <environment>
    <moduleId>
      <groupId>pqm</groupId>
      <artifactId>pqm-ejb</artifactId>
      <version>1.0</version>
      <type>jar</type>
    </moduleId>
    <dependencies>
    
       <dependency>
         <groupId>console.dbpool</groupId>
         <artifactId>docbase_tgmt</artifactId>
       </dependency>  
 
     ... some more dependencies ...
 
    </dependencies>
  <enterprise-beans>  
  <session>
    <ejb-name>DocumentFacadeEJB</ejb-name>
    <jndi-name>ejb/DocumentFacade</jndi-name>
    <resource-ref>
        <ref-name>docbase_tgmt</ref-name>
     <resource-link>docbase_tgmt</resource-link>
    </resource-ref>
  </session>
 </enterprise-beans>   
</openejb-jar>
 
The lookup looks like 
... ctx.lookup("java:comp/env/docbase_tgmt"); ...

After executing a busingess methode that access to the datasource a
NameNotFoundException will be thrown.
 
A similar configuration with the web application deployment descriptor
works fine. There I'm able to get the datasource via jndi lookup from a
jsp page
 
Do you have any ideas  ??
 
Regards
Alex
 

Mime
View raw message