Hi can you give it a try on the snapshot please? http://repository.apache.org/content/groups/snapshots/org/apache/openejb/apache-tomee/1.7.0-SNAPSHOT/apache-tomee-1.7.0-20140528.041234-9-plus.zip
Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-05-28 15:12 GMT+02:00 racarlson <[email protected]>: > here is my deployment information > tomee version: apache-tomee-plus-1.6.0 > windows 7 64 bit , jdk 7 > > ####### CODE > > package com.test; > > @ Remote > @ Local > @ WebService > public interface MyService > { > @ WebMethod ( operationName = "entityManagerTest" ) > public void entityManagerTest( @ WebParam ( name = "input" ) String > input); > } > > ####### > > package com.test; > > // imports ... > > > @Stateless > @EJB(beanInterface = MyService.class, beanName = "MyServiceImpl", name = > "MyServiceImpl") > public class MyServiceImpl implements MyService, java.io.Serializable > { > private static final long serialVersionUID = 1L; > private final static org.slf4j.Logger LOG = > org.slf4j.LoggerFactory.getLogger(MyServiceImpl.class); > > @PersistenceContext(unitName = "TESTPC") > private EntityManager entityManager; > > public MyServiceImpl() > { > > } > > > @Override > public void entityManagerTest( String input) > { > LOG.debug("entityManager = "+entityManager); // null when i call > it as xml > // other method code is in here - irrelevant at this point since > entityManager was null > } > > } > > > > ####### PART OF TOMEE.XML > > <Resource id="TESTMN" type="DataSource"> > JdbcDriver com.mysql.jdbc.Driver > JdbcUrl > jdbc:mysql://localhost:3306/test?zeroDateTimeBehavior=convertToNull > UserName test > Password ******* > JtaManaged true > </Resource> > > <Resource id="TESTUM" type="DataSource"> > JdbcDriver com.mysql.jdbc.Driver > JdbcUrl > jdbc:mysql://localhost:3306/test?zeroDateTimeBehavior=convertToNull > UserName test > Password ******** > JtaManaged false > </Resource> > > > ####### PERSISTENCE.XML > > <?xml version="1.0" encoding="UTF-8"?> > <persistence xmlns="http://java.sun.com/xml/ns/persistence" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="persistence_1_0.xsd" version="1.0"> > <persistence-unit name="TESTPC" transaction-type="JTA"> > <provider>org.hibernate.ejb.HibernatePersistence</provider> > <jta-data-source>TESTMN</jta-data-source> > <non-jta-data-source>TESTUM</non-jta-data-source> > <class>com.test.Account</class> > <class>com.test.Address</class> > <class>com.test.Product</class> > <class>com.test.CustomerOrder</class> > <properties> > <property name = "hibernate.connection.driver_class" > value="com.mysql.jdbc.Driver" /> > <property name = "hibernate.default_schema" value="test" /> > <property name = "hibernate.dialect" > value="org.hibernate.dialect.MySQLDialect" /> > </properties> > </persistence-unit> > </persistence> > > > > ######## project structure > C:\apache-tomee-plus-1.6.0\conf\tomee.xml > > C:\apache-tomee-plus-1.6.0\webapps\testproject\WEB-INF\classes\META-INF\persistence.xml > > C:\apache-tomee-plus-1.6.0\webapps\testproject\WEB-INF\classes\com\test\MyService.class > > C:\apache-tomee-plus-1.6.0\webapps\testproject\WEB-INF\classes\com\test\MyServiceImpl.class > > > > > > > -- > View this message in context: > http://openejb.979440.n4.nabble.com/tomee-doesn-t-inject-entityManager-exposed-as-WebService-when-called-thru-soap-tp4669705p4669707.html > Sent from the OpenEJB User mailing list archive at Nabble.com. >
