[jboss-user] [EJB 3.0] - Re: Entity EJBs, @Service & Thread

galo.navarro do-not-reply at jboss.com
Mon Sep 11 07:11:22 EDT 2006


"wolfc" wrote : How did you start the thread?
  | 
  | I suspect that you're running a custom thread which has no transaction context. You could try using the EJB Timer Service, it starts business methods within the correct context.

In the start() method of my service:


  | 	public void start() throws Exception {
  | 		System.out.println("start");
  | 	    Thread thread = new Thread(this);
  | 	    thread.start();		
  | 	}
  | 


I had considered using a Timer for it but would that not be much more unnefficient using a Service for something that doesn't quite need it? 

Thanks.

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

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



More information about the jboss-user mailing list