I think I have come across a "chicken and egg" scenario.

I want to have a connection pool that is globally accessible, so I
added the following to my <GlobalNamingResources>

<Resource name="jdbc/GlobalPool"
              auth="Container"
              type="javax.sql.DataSource"
              driverClassName="com.mysql.jdbc.Driver"
               url="jdbc:mysql://localhost/test"
          username="root"
          password=""
         maxActive="100"
           maxIdle="30"
           maxWait="10000"
/>

I tested this section and can access this resource fine from any webapp.

Now I want to make a PersistenceManagerFactory global.

<Resource
               name="jdo/PersistenceManagerFactory"
               auth="Container"
               type="javax.jdo.PersistenceManagerFactory"
           factory="PersistenceManagerFactoryFactory"
   
javax.jdo.PersistenceManagerFactoryClass="org.jpox.PersistenceManagerFactoryImpl"
     javax.jdo.option.ConnectionFactoryName="java:comp/env/jdbc/GlobalPool"
      org.jpox.autoCreateSchema="true"
 />


I end up with this error:

javax.naming.NamingException: Connection Factory
"java:comp/env/jdbc/GlobalPool" not found

javax.naming.NameNotFoundException: Name comp is not bound in this Context


Is there a way I can reference a Global JNDI resource from another one ?


-Thanks
Steve More

P.S. This is on version 5.5.17

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to