[jboss-user] [JBoss and NetBeans] - Re: Netbeans 6, Java Persistence API, Web Service using Anno

jsolderitsch do-not-reply at jboss.com
Fri Nov 30 14:22:49 EST 2007


"phejl" wrote : I some did more investigation with jboss 4.2.2 and jboss 5 beta2, here is what I observed (don't take it as an unchangeable fact).
  | With jboss 4 it seems to me that PersistentContext in servlet or webservice is ignored completely (jboss 4 is not ee 5 certified - provides ejb3 and ee5 web apps, however not sure if wired properly).
  | When using jboss 5 server noticed the annotation however wasn't able to load the proper context (maybe really problem with wiring jpa and web, since it is still beta).
  | 
  | Maybe somebody from jboss could tell you more...
  | P.

Thanks for doing some checking.

I have been trying some of the Seam 2.0.0 demos (deploying to my 4.2.2 JBoss) and tutorials and ran seam-gen using my database.

I got this to work. And in the set of generated files I see a persistence.xml and a components.xml.

I think I see some interesting bits:

In the generated persistence.xml I see:

   <persistence-unit name="AfmsttModernizationSeam">
  |       <provider>org.hibernate.ejb.HibernatePersistence</provider>
  |       <jta-data-source>java:/AfmsttModernizationSeamDatasource</jta-data-source>
  |       <properties>
  |          <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
  |          <property name="hibernate.hbm2ddl.auto" value="validate"/>
  |          <property name="hibernate.show_sql" value="true"/>
  |          <property name="hibernate.format_sql" value="true"/>
  |          <property name="jboss.entity.manager.factory.jndi.name" value="java:/AfmsttModernizationSeamEntityManagerFactory"/>
  |       </properties>
  |    </persistence-unit>

and in components.xml I see:

   <persistence:managed-persistence-context name="entityManager"
  |                                      auto-create="true"
  |                       persistence-unit-jndi-name="java:/AfmsttModernizationSeamEntityManagerFactory"/>
  | 

These seem like config options that may help the wiring to complete the circuit if I add them in the right place in my war file.



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109438#4109438

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109438



More information about the jboss-user mailing list