openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hiran Chaudhuri <Hiran.Chaudh...@web.de>
Subject Re: Tomcat Injection
Date Wed, 09 Jul 2008 09:32:31 GMT
... on second thought:
Does Tomcat do dependency injection at all? In my eyes it is a servlet container, not an application
server. You might want to change to Glassfish, Geronimo or JBoss.

But maybe such behaviour has been introduced to Tomcat and noone ever informed me about it...
;-)

Hiran Chaudhuri


> -----Ursprüngliche Nachricht-----
> Von: "ericp56" <eric.phetteplace@twcable.com>
> Gesendet: 08.07.08 22:03:01
> An: users@openjpa.apache.org
> Betreff: Tomcat Injection


> 
> Hello,
> 
> After reading some documentation, I though I had my injection code worked
> out, but apparently not.
> 
> I am using Tomcat with OpenJPA.
> 
> In my class, I have:
> 	@PersistenceUnit(unitName = "CallScheduler")
> 	private @Resource(name="bean/OpenJPAEMF")OpenJPAEntityManagerFactory emf;
> In my META-INF/context.xml, I have:
> 	<Resource name="bean/OpenJPAEMF" auth="Container"
> 	factory="org.apache.openjpa.persistence.OpenJPAEntityManagerFactory"
> 	type="org.apache.openjpa.persistence.OpenJPAEntityManagerFactory.class" />
> 
> While executing a method in my class,  emf is still null.
> 
> How should I instantiate emf?  I am under the impression that
> OpenJPAPersistence.createEntityManagerFactory is for unmanaged code...
> 
> Eric
> -- 
> View this message in context: http://n2.nabble.com/Tomcat-Injection-tp395699p395699.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
> 
> 


_______________________________________________________________________
EINE FÜR ALLE: die kostenlose WEB.DE-Plattform für Freunde und Deine
Homepage mit eigenem Namen. Jetzt starten! http://unddu.de/?kid=kid@mf2


Mime
View raw message