tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@visi.com>
Subject Re: Tomcat - Injection: No such property
Date Fri, 06 Feb 2009 06:36:11 GMT

On Jan 31, 2009, at 2:49 AM, JensToerber wrote:

>
> Hi,
>
> i am facing the same problem in Tomcat 6.0.18. EntityManager does  
> not get
> injected: "no such property".
> Openejb 3.1 works in a test application with EJB-, EntityManager-,
> DataSource-, javax.Mail.Session-, Queue-injection.
>
> Now i have the situation to port an existing application which uses  
> Spring's
> org.springframework.jndi.JndiObjectFactoryBean for looking up EJBs.
>
> Ok we could replace that by a ServiceLocator or of course the
> EJB3-Injection. But to minimize the effort it would be great to get  
> this
> scenario running.
>
> I have the impression that Spring changes something regarding JNDI,  
> where
> then Openejb and/or Tomcat have problems.
>
> How about this:
> - 
> Djava 
> .naming 
> .factory.initial=org.apache.openejb.client.LocalInitialContextFactory
> -Djava.naming.factory.url.pkgs=org.apache.naming.factory.XXX
>
> What should work? This as system properties on startup of Tomcat?
> - 
> Djava 
> .naming 
> .factory.initial=org.apache.openejb.client.LocalInitialContextFactory
> -Djava.naming.factory.url.pkgs=org.apache.naming.factory
>
> Don't get the complete idea here, i am sorry.

Seems this thread is getting a little overloaded to the point of being  
misleading.

The Jetty-specific suggestion of setting the  
java.naming.factory.initial and java.naming.factory.url as system  
properties should not be done in Tomcat as it will cause failures.   
Our integration expects to live inside of Tomcat's JNDI tree and we  
have a lot of code that adds entries to the Tomcat tree so it should  
contain everything that is required to run the app, including any  
@PersistenceContext, @PersistenceUnit, @Resource, @EJB refs.

Can you give a code example of what you are attempting that doesn't  
seem to be working?

I don't know if this helps anyone on the thread, but here's a servlet  
that has injected one of every kind of resource[1].  We have  
equivalents test for each ejb type that run in tomcat as well.

I suspect we could use a bunch more webapp examples.

-David


[1] http://svn.apache.org/repos/asf/openejb/tags/openejb-3.1/itests/openejb-itests-servlets/src/main/java/org/apache/openejb/test/servlet/AnnotatedServlet.java


Mime
View raw message