-
1. Re: MBean POJO(jboss ejb3 annotations) NOT working in jboss
yashendrac May 20, 2009 6:47 PM (in response to yashendrac)Ok I followed the steps mentioned in this FAQ
http://www.jboss.org/community/wiki/WhydontmyAS42xServicebeansdeployinAS5
my service had @EJB for ejb dependency injection, after removing that I can see start method of my service is invoked but still it is stuck in PreInstall status, this is the message in logDeployment "WebServer" is missing the following dependencies: Dependency "smc.jboss:service=KeyStoreService" (should be in state "Create", but is actually in state "PreInstall")
-
2. Re: MBean POJO(jboss ejb3 annotations) NOT working in jboss
jaikiran May 21, 2009 2:34 AM (in response to yashendrac)An @EJB injection in a Service should have worked. Can you post the entire exception stacktrace that you see when a @EJB is added in the service?
-
3. Re: MBean POJO(jboss ejb3 annotations) NOT working in jboss
yashendrac May 21, 2009 3:36 PM (in response to yashendrac)Ok I got the problem....
the stateless bean I am referring through @EJB annotation is not deployed properly. Actually that ejb uses hibernate and I just came to know that my hibernate-service.xml/hibernate configuration from JBoss 4 is not going to work until I make changes as specified here
http://www.jboss.org/community/wiki/JBossHibernate3
I did that too but now the problem is that it is not able to load my hibernate mapping xmls -hbm.xml. both my MBean and -hbm.xml are bundled in same jar. Even if it is not bundled in same jar it should be loaded. I have not configured this -hbm.xml in -hibernate.xml as it is not required, still if I want to do it explicitly then I dont know how to do it. -
4. Re: MBean POJO(jboss ejb3 annotations) NOT working in jboss
yashendrac May 21, 2009 3:58 PM (in response to yashendrac)Ok I started this new thread, as it turned out to be the problem related with JBoss 5 Hibernate configuration
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232577 -
5. Re: MBean POJO(jboss ejb3 annotations) NOT working in jboss
womuji Jul 20, 2009 4:38 PM (in response to yashendrac)I have the same issue without any EJB involvement:
@Service (objectName="MyJMX:service=TestJMX") @Management(MyJMXInterface.class) public class MyJMXImpl implements MyJMXInterface { public void create() throws Exception { System.out.println("++++ Enter MyJMXImpl.create()"); } public void destroy() throws Exception { System.out.println("++++ Enter MyJMXImpl.destroy()"); } public void myTestMethod() { System.out.println("++++ Enter MyJMXImpl.myTestMethod()"); } public void start() throws Exception { System.out.println("++++ Enter MyJMXImpl.start()"); } public void stop() throws Exception { System.out.println("++++ Enter MyJMXImpl.stop()"); } }
I jarred this class along with the interface into a jar file, and its start() method got invoked when deployed in jboss4, but nothing happened with jboss 5. Your help is appriciated. -
6. Re: MBean POJO(jboss ejb3 annotations) NOT working in jboss
jaikiran Jul 20, 2009 5:20 PM (in response to yashendrac)The EJB3 annotations have been moved between JBoss AS-4.x and JBoss AS-5.x. You probably aren't using the latest import statements for the annotations. Here's our tutorials for this http://www.jboss.org/file-access/default/members/jbossejb3/freezone/docs/tutorial/1.0.7/html/Service_POJOs.html
-
7. Re: MBean POJO(jboss ejb3 annotations) NOT working in jboss
womuji Jul 21, 2009 10:06 AM (in response to yashendrac)Thanks a log, jaikiran! That's exactly the problem.