Hi, the Problem is that when I use the jar with persistence.xml it says: | ObjectName: jboss.jca:name=jdbc/MYDB,service=ManagedConnectionFactory | State: NOTYETINSTALLED | Depends On Me: | persistence.units:jar=EJBTest2EJB.jar,unitName=entwDS |
I used to use the hibernate-service.xml (ejb.har) and a hibernat.cfg.xml(ejb.jar) in my Application (App.ear). With a Utility class I build the SessionFactory and used it in my beans. The DataSource was defined in a mydata-ds.xml, which defines an oracle db as a Datasource. The entity beans are mapped via a MyEntity.hbm.xml. In that scenario all works fine concerning this matter (all ejb 3). Now, I wanted to go towards using the annotations in the Entity classes and use a persistence.xml file for the persicetence-unit to see how this works and make things easier. My setup is basicly like the one in the ejb3 trailblaizer (more or less). I just use a jar file, which contains all the classes and has a persistence.xml in its META-INF (and an empty ejb-jar.xml). The persistence.xml has the same properties set as in the hibernate.cfg.xml. As it JTA-data-source it uses the ds (java:/jdbc/MYDB) defined in the mydata-ds.xml (which is always deployed, not part of the jar). It seems it cant use the DataSource which works for the alternative approach. The only thing that I see is that the bound datasource has: service=DataSourceBinding and not service=ManagedConnectionFactory: 14:23:00,250 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jb | oss.jca:service=DataSourceBinding,name=/jdbc/OLGAENTW' to JNDI name 'java:/jdbc/ | OLGAENTW' So what am I missing in the config ? I read all the docu and trail blaizer and all that they say, I thing do: have your jar with its persistence.xml and a *-ds.xml for your data sources and of course use the correct names defined. Thanks View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3950842#3950842 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3950842 _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
