• Post Reply Bookmark Topic Watch Topic
  • New Topic

Anyone who tried @Init annotation in Stateful Session Bean  RSS feed

Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I'm writing a ejb 2.1 client for ejb 3.0 Stateful bean. I've initialize(String) and initialize(String,String) methods in my bean class.

And my home interface has create(String) and createCart(String,String) method

I tried to use Init annotation on initialize method. as..



but in both cases I'm getting exception saying..
Bean class for ejb [CartEJB] does not define a
method corresponding to [Home] interface method [public abstract com.seed.ejb20
.CartRemote com.seed.ejb20.CartHome.createCart(java.lang.String,java.lang.String
) throws java.rmi.RemoteException,javax.ejb.CreateException]

and so on....

So can you please guide me how do use this Init annotation.
My code works well if I don't use Init annotation and instead use Deployment descriptor elements init-method.....


[ September 01, 2008: Message edited by: Nitin Takale ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!