[jboss-user] [EJB 3.0] - Re: How to inject sessionbean from sessionbean from another
Jaikiran, I just tried the @Service notation: | package ae; | | import javax.annotation.Resource; | import javax.ejb.TransactionAttribute; | import javax.ejb.TransactionAttributeType; | | import org.apache.log4j.Logger; | import org.jboss.ejb3.annotation.Depends; | import org.jboss.ejb3.annotation.Management; | import org.jboss.ejb3.annotation.Service; | | @Service | @Management(MasterMBean.class) | @Depends( { "jboss.j2ee:jar=SubEJB.jar,name=CalculatorBean,service=EJB3" }) | public class Master implements MasterMBean { | | private static final Logger log = Logger.getLogger(Master.class); | | @EJB(mappedName = Calculator.JNDI_NAME) | private Calculator additionBean; | | @TransactionAttribute(TransactionAttributeType.NEVER) | public void start() throws Exception { | log.info("### starting"); | | if (additionBean == null) { | log.error("### unable to inject CalculatorBean!!!"); | return; | } | | long result = additionBean.add(new int[] { 1, 2, 3 }); | log.info(result); | | // TODO use a quartz job to run a calculation every 5 seconds! | } | | public void stop() { | log.info("### stopping"); | } | } | After removing the master-mbean-jboss.xml and deploying the SAR into server/all/deploy-hasingleton, the Injection worked pretty fine! But the old approach still does not work. Can you tell me why? Another thing: as you can see, I had to annotate the start() method, because I got an Exception: anonymous wrote : | 14:54:06,031 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.connectionfact...@1e287e5 started | 14:54:06,031 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA' | 14:54:06,093 INFO [TomcatDeployment] deploy, ctxPath=/, vfsUrl=ROOT.war | 14:54:06,156 INFO [TomcatDeployment] deploy, ctxPath=/jmx-console, vfsUrl=jmx-console.war | 14:54:06,265 INFO [JBossASKernel] Created KernelDeployment for: SubEJB.jar | 14:54:06,265 INFO [JBossASKernel] installing bean: jboss.j2ee:jar=SubEJB.jar,name=CalculatorBean,service=EJB3 | 14:54:06,265 INFO [JBossASKernel] with dependencies: | 14:54:06,265 INFO [JBossASKernel] and demands: | 14:54:06,265 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService | 14:54:06,265 INFO [JBossASKernel] and supplies: | 14:54:06,265 INFO [JBossASKernel] jndi:AECalculator | 14:54:06,265 INFO [JBossASKernel] jndi:CalculatorBean/remote-ae.Calculator | 14:54:06,265 INFO [JBossASKernel] Class:ae.Calculator | 14:54:06,265 INFO [JBossASKernel] Added bean(jboss.j2ee:jar=SubEJB.jar,name=CalculatorBean,service=EJB3) to KernelDeployment of: SubEJB.jar | 14:54:06,375 INFO [SessionSpecContainer] Starting jboss.j2ee:jar=SubEJB.jar,name=CalculatorBean,service=EJB3 | 14:54:06,390 INFO [EJBContainer] STARTED EJB: ae.CalculatorBean ejbName: CalculatorBean | 14:54:06,437 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI: | | AECalculator - EJB3.x Default Remote Business Interface | CalculatorBean/remote-ae.Calculator - EJB3.x Remote Business Interface | | 14:54:06,593 INFO [EJBContainer] STARTED EJB: ae.Master ejbName: Master | 14:54:06,609 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI: | | | 14:54:06,625 INFO [JBossASKernel] installing bean: jboss.j2ee:jar=master.sar,name=Master,service=EJB3,type=ManagementInterface | 14:54:06,625 INFO [JBossASKernel] with dependencies: | 14:54:06,625 INFO [JBossASKernel] and demands: | 14:54:06,625 INFO [JBossASKernel] jndi:AECalculator | 14:54:06,625 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService | 14:54:06,625 INFO [JBossASKernel] jboss.j2ee:jar=SubEJB.jar,name=CalculatorBean,service=EJB3 | 14:54:06,625 INFO [JBossASKernel] and supplies: | 14:54:06,625 INFO [JBossASKernel] jndi:Master/remote | 14:54:06,625 INFO [JBossASKernel] Class:ae.MasterMBean | 14:54:06,625 INFO [JBossASKernel] Installing bean(jboss.j2ee:jar=master.sar,name=Master,service=EJB3,type=ManagementInterface) into kernel | 14:54:06,640 INFO [Master] ### starting | 14:54:06,687 ERROR [ServiceContainer] Encountered an error in start of Master | java.lang.RuntimeException: Problem registering @Management interface for @Service class ae.Master | at org.jboss.ejb3.service.ServiceContainer.registerManagementInterface(ServiceContainer.java:727) | [...] | at java.lang.Thread.run(Thread.java:595) | Caused by: java.lang.RuntimeException: javax.management.MBeanException | at org.jboss.ejb3.deployers.JBossASKernel.installMBean(JBossASKernel.java:181) |
[jboss-user] [EJB 3.0] - Re: How to inject sessionbean from sessionbean from another
Master.java package ae; | | import javax.annotation.Resource; | | import org.apache.log4j.Logger; | | import ae.Calculator; | | public class Master implements MasterMBean { | private static final Logger log = Logger.getLogger(Master.class); | | @Resource(mappedName = Calculator.JNDI_NAME) | private Calculator additionBean; | | public void start() throws Exception { | if (additionBean == null) { | log.error("### unable to inject CalculatorBean!!!"); | return; | } | | long result = additionBean.add(new int[] { 1, 2, 3 }); | log.info(result); | | // TODO use a quartz job to run a calculation every 5 seconds! | } | | public void stop() {} | } | master-mbean-service.xml: | | | | | jboss.j2ee:jar=SubEJB.jar,name=CalculatorBean,service=EJB3 | | | | Calculator.java: | package ae; | | public interface Calculator { | public static final String JNDI_NAME = "AECalculator"; | public long add(int... summands); | } | CalculatorBean.java: | package ae; | | import javax.ejb.Remote; | import javax.ejb.Stateless; | | import org.apache.log4j.Logger; | import org.jboss.ejb3.annotation.Clustered; | | @Clustered | @Stateless(mappedName = Calculator.JNDI_NAME) | @Remote(Calculator.class) | public class CalculatorBean implements Calculator { | private static final Logger log = Logger.getLogger(CalculatorBean.class); | | public long add(int... summands) { | long result = 0; | for (int i : summands) { | result += (long) i; | } | log.info(result); | return result; | } | } | View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4204949#4204949 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4204949 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0] - Re: How to inject sessionbean from sessionbean from another
anonymous wrote : public class Master implements MasterMBean { | What is this class (into which you are injection the EJB)? Are you using the @Service annotation? Or are you configuring the service through xml? Can you post the configurations? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4204942#4204942 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4204942 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0] - Re: How to inject sessionbean from sessionbean from another
Sure. I hope, this is everything you need: anonymous wrote : 11:32:01,640 INFO [ServerPeer] JBoss Messaging 1.4.1.GA server [0] started | 11:32:01,812 INFO [STDOUT] | --- | GMS: address is 192.168.22.42:2527 | --- | 11:32:03,828 INFO [GroupMember] org.jboss.messaging.core.impl.postoffice.groupmember$controlmembershipliste...@4d98da got new view [192.168.22 | 11:32:03,828 INFO [GroupMember] I am (192.168.22.42:2527) | 11:32:03,828 INFO [GroupMember] New Members : 1 ([192.168.22.42:2527]) | 11:32:03,828 INFO [GroupMember] All Members : 1 ([192.168.22.42:2527]) | 11:32:03,828 INFO [STDOUT] | --- | GMS: address is 192.168.22.42:7900 | --- | 11:32:08,890 INFO [QueueService] Queue[/queue/ExpiryQueue] started, fullSize=20, pageSize=2000, downCacheSize=2000 | 11:32:08,968 INFO [ConnectionFactory] Connector bisocket://fup-dd-ap-12:4457 has leasing enabled, lease period 1 milliseconds | 11:32:08,968 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.connectionfact...@13c7b26 started | 11:32:09,000 INFO [ConnectionFactory] Connector bisocket://fup-dd-ap-12:4457 has leasing enabled, lease period 1 milliseconds | 11:32:09,000 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.connectionfact...@10eb73 started | 11:32:09,015 INFO [QueueService] Queue[/queue/DLQ] started, fullSize=20, pageSize=2000, downCacheSize=2000 | 11:32:09,312 WARN [JBossASSecurityMetadataStore] WARNING! POTENTIAL SECURITY RISK. It has been detected that the MessageSucker component which | 11:32:09,718 INFO [ConnectionFactory] Connector bisocket://fup-dd-ap-12:4457 has leasing enabled, lease period 1 milliseconds | 11:32:09,718 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.connectionfact...@1219df4 started | 11:32:09,718 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI na | 11:32:09,765 INFO [TomcatDeployment] deploy, ctxPath=/, vfsUrl=ROOT.war | 11:32:09,812 INFO [TomcatDeployment] deploy, ctxPath=/jmx-console, vfsUrl=jmx-console.war | 11:32:10,140 INFO [JBossASKernel] Created KernelDeployment for: SubEJB.jar | 11:32:10,156 INFO [JBossASKernel] installing bean: jboss.j2ee:jar=SubEJB.jar,name=CalculatorBean,service=EJB3 | 11:32:10,156 INFO [JBossASKernel] with dependencies: | 11:32:10,156 INFO [JBossASKernel] and demands: | 11:32:10,156 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService | 11:32:10,156 INFO [JBossASKernel] and supplies: | 11:32:10,156 INFO [JBossASKernel] jndi:AECalculator | 11:32:10,156 INFO [JBossASKernel] jndi:CalculatorBean/remote-ae.Calculator | 11:32:10,156 INFO [JBossASKernel] Class:ae.Calculator | 11:32:10,156 INFO [JBossASKernel] Added bean(jboss.j2ee:jar=SubEJB.jar,name=CalculatorBean,service=EJB3) to KernelDeployment of: SubEJB.jar | 11:32:10,265 INFO [SessionSpecContainer] Starting jboss.j2ee:jar=SubEJB.jar,name=CalculatorBean,service=EJB3 | 11:32:10,265 INFO [EJBContainer] STARTED EJB: ae.CalculatorBean ejbName: CalculatorBean | 11:32:10,312 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI: | | AECalculator - EJB3.x Default Remote Business Interface | CalculatorBean/remote-ae.Calculator - EJB3.x Remote Business Interface | | 11:32:10,343 ERROR [Master] ### unable to inject CalculatorBean!!! | 11:32:10,390 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080 | 11:32:10,406 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-0.0.0.0-8009 | 11:32:10,406 INFO [ServerImpl] JBoss (Microcontainer) [5.0.0.GA (build: SVNTag=JBoss_5_0_0_GA date=200812041714)] Started in 45s:63ms | Thanks for your help! Andre View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4204931#4204931 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4204931 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0] - Re: How to inject sessionbean from sessionbean from another
Please post the console logs when the server is being started and your application being deployed. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4204920#4204920 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4204920 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0] - Re: How to inject sessionbean from sessionbean from another
Hey there! I have a similar question, but the @RemoteBinding Solution doesn't work. My JBoss AS 5.0.0.GA runs in "all" mode, because I need clustering capabilities. I have a usual EJB_JAR in folder "deploy" and a SAR in "deploy-hasingleton". The SAR contains an MBean which uses a SLSB defined in the EJB-JAR: public class Master implements MasterMBean { | | @Resource(mappedName = Calculator.JNDI_NAME) | private Calculator additionBean; | | // ... MBean stuff The Bean is just a simple Calculator, which adds the given numbers: @Clustered | @Stateless(mappedName = Calculator.JNDI_NAME) | @Remote(Calculator.class) | public class CalculatorBean implements Calculator { | | public long add(int... summands) { | long result = 0; | | for (int i : summands) { | result += (long) i; | } | return result; | } | } When starting the server, the MBean can't use the Calculator, behause it was not injected. But the injection works pretty fine for a SLSB defined in a second EJB-JAR. Is this a problem with the two different deploy folders? Or am I doing something wrong? Thanks, Andre View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4204918#4204918 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4204918 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0] - Re: How to inject sessionbean from sessionbean from another
"kolszew73" wrote : Ok i know, but ... it works fine in JBOSS 4.2.2 ! | I'm sympathetic to this in practice. So: [url]https://jira.jboss.org/jira/browse/EJBTHREE-1689[/ur] S, ALR View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4202529#4202529 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4202529 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0] - Re: How to inject sessionbean from sessionbean from another
Ok i know, but ... it works fine in JBOSS 4.2.2 ! View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4202494#4202494 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4202494 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0] - Re: How to inject sessionbean from sessionbean from another
"kolszew73" wrote : 1. This in not EJB3 compilant, i must use annotation org.jboss.ejb3.annotation.LocalBinding which is'n standard EJB annotation Strong words from someone trying to bypass spec scoping by injecting across unrelated JARs/EARs. ;) True story though. Looking forward we'll be moving the injection framework to the new pluggable @EJB reference resolvers, which will optionally support injection across any EJB3 DeploymentUnits registered w/ the MainDeployer. S, ALR View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4202485#4202485 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4202485 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0] - Re: How to inject sessionbean from sessionbean from another
"kolszew73" wrote : | 2. I' have another problem, when i'm redeploy first jar, (secon not), during redeploy server stops/starts VatCounter but do not stop/start ComplexCounter (which is depended) (Jboss 4.2.2 stops/starts both). | ComplexCounter is dependent on VatCounter. So stopping/undeploying VatCounter should have also stopped/undeployed ComplexCounter. If that's not happening then maybe you have discovered an issue. Could you please file a JIRA here https://jira.jboss.org/jira/browse/EJBTHREE with the details and if possible a sample application which shows this issue? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4202457#4202457 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4202457 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0] - Re: How to inject sessionbean from sessionbean from another
anonymous wrote : 1. This in not EJB3 compilant, i must use annotation org.jboss.ejb3.annotation.LocalBinding which is'n standard EJB annotation Instead you can configure the jndi-name and local-jndi-name for the bean in a jboss.xml file. In EJB3.0 the spec does not talk about a standard default global jndi name. However, EJB3.1 proposes a standard default global jndi name for the beans. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4202455#4202455 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4202455 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0] - Re: How to inject sessionbean from sessionbean from another
Thanx, this works fine. But ... :) 1. This in not EJB3 compilant, i must use annotation org.jboss.ejb3.annotation.LocalBinding which is'n standard EJB annotation 2. I' have another problem, when i'm redeploy first jar, (secon not), during redeploy server stops/starts VatCounter but do not stop/start ComplexCounter (which is depended) (Jboss 4.2.2 stops/starts both). And after that when im running ComplexCounter (from remote client) i get exception | Exception in thread "AWT-EventQueue-0" java.lang.reflect.UndeclaredThrowableException | at $Proxy2.getVatPoz(Unknown Source) | at pl.com.stream.asen2.client.MainFrame$2.actionPerformed(MainFrame.java:65) | at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) | at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) | at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) | at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) | at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) | at java.awt.Component.processMouseEvent(Component.java:6099) | at javax.swing.JComponent.processMouseEvent(JComponent.java:3265) | at java.awt.Component.processEvent(Component.java:5864) | at java.awt.Container.processEvent(Container.java:2058) | at java.awt.Component.dispatchEventImpl(Component.java:4466) | at java.awt.Container.dispatchEventImpl(Container.java:2116) | at java.awt.Component.dispatchEvent(Component.java:4296) | at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322) | at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986) | at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916) | at java.awt.Container.dispatchEventImpl(Container.java:2102) | at java.awt.Window.dispatchEventImpl(Window.java:2454) | at java.awt.Component.dispatchEvent(Component.java:4296) | at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) | at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:284) | at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) | at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) | at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) | at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) | at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) | Caused by: org.jboss.aop.DispatcherConnectException: EJB container is not completely started, or is stopped. | at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:60) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) | at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) | at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:486) | at org.jboss.ejb3.session.InvokableContextClassProxyHack._dynamicInvoke(InvokableContextClassProxyHack.java:56) | at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:91) | at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82) | at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:908) | at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:742) | at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:695) | at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:522) | at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:230) | at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:206) | at org.jboss.remoting.Client.invoke(Client.java:1708) | at org.jboss.remoting.Client.invoke(Client.java:612) | at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) | at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) | at org.jboss.ejb3.security.client.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) | at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:76) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.ja
[jboss-user] [EJB 3.0] - Re: How to inject sessionbean from sessionbean from another
Looks similar to http://www.jboss.com/index.html?module=bb&op=viewtopic&t=138796. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4202443#4202443 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4202443 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0] - Re: How to inject sessionbean from sessionbean
For other people who are interested: Thats the code in the groupHandler now: | @IgnoreDependency | @EJB() private CourseHandlerRemote courseHandler; And thats it in the courseHandler: @EJB() private GroupHandlerRemote groupHandler; View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199392#4199392 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199392 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0] - Re: How to inject sessionbean from sessionbean
Yeah! :-) Thats it. Thank you very much. Best regards, NSchweig View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199391#4199391 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199391 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0] - Re: How to inject sessionbean from sessionbean
anonymous wrote : CourseHandler tries to inject groupHandler and vice versa You mean a circular dependency? Try adding @IgnoreDependency on one of the injections. See this for detatils http://www.jboss.com/index.html?module=bb&op=viewtopic&t=117943 View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199324#4199324 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199324 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0] - Re: How to inject sessionbean from sessionbean
Hi, the only thing I see in the server.log that belongs to that error is: | ... | 2009-01-03 10:27:14,656 ERROR [org.jboss.system.server.profileservice.ProfileServiceBootstrap] (main) Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS): | | *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State} | | jboss.j2ee:ear=CMT_ejb.jar,jar=CMT_ejb.jar,name=CourseHandler,service=EJB3 | -> {Described:** UNRESOLVED Demands 'jndi:CMT_ejb/de.cmt.beans.groupAdministration.GroupHandlerRemote' **} | | jboss.j2ee:ear=CMT_ejb.jar,jar=CMT_ejb.jar,name=GroupHandler,service=EJB3 | -> {Described:** UNRESOLVED Demands 'Class:de.cmt.beans.courseAdministration.CourseHandlerRemote' **} | | | *** CONTEXTS IN ERROR: Name -> Error | | -> ** UNRESOLVED Demands 'Class:de.cmt.beans.courseAdministration.CourseHandlerRemote' ** | | -> ** UNRESOLVED Demands 'jndi:CMT_ejb/de.cmt.beans.groupAdministration.GroupHandlerRemote' ** | | | 2009-01-03 10:27:14,656 DEBUG [org.jboss.bootstrap.microcontainer.ServerImpl] (main) Installing life thread Thread[JBossLifeThread,5,jboss] | ... | (CourseHandler tries to inject groupHandler and vice versa) In the console it is the following: 10:27:14,656 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS): | | *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State} | | jboss.j2ee:ear=CMT_ejb.jar,jar=CMT_ejb.jar,name=CourseHandler,service=EJB3 | -> {Described:** UNRESOLVED Demands 'jndi:CMT_ejb/de.cmt.beans.groupAdministration.GroupHandlerRemote' **} | | jboss.j2ee:ear=CMT_ejb.jar,jar=CMT_ejb.jar,name=GroupHandler,service=EJB3 | -> {Described:** UNRESOLVED Demands 'Class:de.cmt.beans.courseAdministration.CourseHandlerRemote' **} | | | *** CONTEXTS IN ERROR: Name -> Error | | -> ** UNRESOLVED Demands 'Class:de.cmt.beans.courseAdministration.CourseHandlerRemote' ** | | -> ** UNRESOLVED Demands 'jndi:CMT_ejb/de.cmt.beans.groupAdministration.GroupHandlerRemote' ** | | I use JBoss 5.0.0 CR2 and jdk1.5.0_14 The EJBs are part of the same application; they are only in separat packages: | CMT_ejb.jar\de\cmt\beans\groupAdministration | CMT_ejb.jar\de\cmt\beans\courseAdministration Thanks, NSchweig View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199313#4199313 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199313 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0] - Re: How to inject sessionbean from sessionbean
Please post the entire exception stacktrace and even the console logs. Which version of JBossAS and Java do you use? And are those EJBs part of the same deployed application? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199298#4199298 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199298 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user