[jboss-user] [JBoss Seam] - Re: Test EJB3/Seam from eclipse

jfrankman do-not-reply at jboss.com
Mon May 21 12:19:19 EDT 2007


I am having one more issue. Any ideas or explanations are appreciated. I can now get the entitymanager from inside eclipse. I can call the EntityManager's persist and find methods directly in my test case but I cannot successfully call my service and DAO layer classes. I am trying to test a service layer class, but since I am injecting the dao into the service (see code snippet below), when I run the test from Eclipse the DAO used by the service class is null. I would have thought that the embedded container would have injected this in for me.

My ecllipse project was created by seam-gen and I do have a source folder: "embedded-ejb/conf" in my project. I have not modified any of the config files. Is there anything else I need to do to get the embedded container to work inside eclipse such as modifying the embedded container config files or adding any jars to the classpath? If not, am I barking up the wrong tree? Is it possible to test the service and dao layers using the embedded container?


@Stateless
  | @Name("clientService")
  | public class ClientServiceImpl implements ClientService
  | {
  | 	@In(create=true) private ClientDAO clientDao;

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

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



More information about the jboss-user mailing list