[jboss-user] [EJB 3.0] - injecting bean into remote Client

joshua883 do-not-reply at jboss.com
Sat Apr 18 13:10:31 EDT 2009


Hi all,
I've tested EJB injection in a remote Client :

public class Client {
  | 	@EJB(mappedName="TestBean/remote")
  | 	static Test t;
  | 
  | 	public static void main(String[] args) throws Exception
  | 	{
  | 		Context ctx = new InitialContext();
  | 
  | 		t.doSomething();
  | 	}

unfortunately "t" is null so injection doesn't happen.
Tested with JBoss 5.0.0 GA on JDK 1.6
Any workaround ?
thanks
john

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

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



More information about the jboss-user mailing list