[jboss-user] [EJB 3.0] - EjB3 & JBoos AS - JUnit testing

karl.martens do-not-reply at jboss.com
Thu May 3 19:30:33 EDT 2007


Hi,
  I am  try to crate an ear using the following technologies:

    * JBoss AS 4.0.5.GA with EJB3
    * JBoss Embeddable EJB3 Container
    * Hibernate 3
    * JUnit 

  I have been able to create an ear the deploys and executes on the JBoss AS but when the same code is executed with JUnit in the embeddable EJB 3 container the dependent EJBs do not get injected as I expected.

  Tracked the problem down to the different annotations being used in the JBoss AS (javax.ebj.ejb) vs Embeddable container (javax.annotation.ejb).

  Changing the annotation to other one got the code working on the embeddable container but now fails on the JBoss AS (as one would expect).

  Does anyone know a way that I can have the same code run deployed on a JBoss AS and testable with JUnit?  
   
  Some options I'm exploring but not having any luck on finding people that have managed to accomplish:
  1) Upgrade embedded ejb3 container to use same annotation as JBoss AS
  2) Run JBoss AS server in same JVM as JUnit runner
  
  Would greatly appreciate any advice anyone can offer, even if its different then the approaches I've described above.

Thanks

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

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



More information about the jboss-user mailing list