anonymous wrote : @WebService()
  | @PersistenceContext(name = "persistence/LogicalName", unitName = 
"MissionStatusProjectPU2")
  | public class MissionStatusService {
  | 
  | EntityManager em;
  | 
  | public MissionStatusService() {
  | 
  | try {
  | Context ctx = (Context) new 
javax.naming.InitialContext().lookup("java:comp/env");
  | em = (EntityManager) ctx.lookup("persistence/LogicalName");
  | } catch (NamingException ex) {
  | ex.printStackTrace();
  | }
  | 
  | } 

How about this:


  | @WebService()
  | public class MissionStatusService {
  | 
  | @PersistenceContext
  | EntityManager em;
  | 
  | public MissionStatusService() {
  |  //do nothing
  | 
  | } 
  | .....
  | }


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109322
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to