8 Replies Latest reply on Mar 30, 2006 10:25 PM by nick.hynes

    Remote Session Bean calling other remote session bean & Inje

    andyd


      Hi,
      What seems to work for me is as follows:

      @MessageDriven
      public class MyMessageBean
      {
      ...
      ...
      // use following to reference a Session
      @Resource (jndiName="")
      private remoteorlocalinterfacename yourRef;

      public void onMessage(...)
      {...}

      }


      What seems to work for me, regarding your transaction error is to use local interfaces. or to specify REQUIRESNEW as the TransactionAttribute in the annotation. I'm not sure at the moment what is best, but I'm sure someone else can give some additional pointers, this is just what I've found works - still learning myself.

      Andy.



        • 1. Re: JBoss Security Roles Problem.... everyone is admin!
          jcrume

          Here is what I get on startup:

          [ INFO] 19:17 (ServiceMBeanSupport.java:start:220)
          Started jboss.security:service=XMLLoginConfig

          [DEBUG] 19:17 (ServiceMBeanSupport.java:start:187)
          Starting

          [DEBUG] 19:17 (JaasSecurityManagerService.java:startService:337)
          securityMgrCtxPath=java:/jaas

          [DEBUG] 19:17 (JaasSecurityManagerService.java:startService:343)
          cachePolicyCtxPath=java:/timedCacheFactory

          [DEBUG] 19:17 (JaasSecurityManagerService.java:startService:348)
          SecurityProxyFactory=org.jboss.security.SubjectSecurityProxyFactory@eafb71

          [ INFO] 19:17 (ServiceMBeanSupport.java:start:220)
          Started jboss.security:service=JaasSecurityManager

          [DEBUG] 19:19 (ServiceMBeanSupport.java:create:154)
          Creating

          [DEBUG] 19:19 (ServiceMBeanSupport.java:create:172)
          Created

          [DEBUG] 19:19 (ServiceMBeanSupport.java:start:187)
          Starting

          [DEBUG] 19:19 (EmbeddedTomcatService.java:startService:252)
          Setting catalina debug level to: 0

          [DEBUG] 19:19 (EmbeddedTomcatService.java:startService:268)
          Setting catalina.home to: C:\tools\jboss-3.2.3\server\default

          [DEBUG] 19:19 (EmbeddedTomcatService.java:startService:269)
          Setting catalina.base to: C:\tools\jboss-3.2.3\server\default

          [ INFO] 19:20 (Log4jLogger.java:log:149)
          CoyoteConnector Coyote can't register jmx for protocol

          [ INFO] 19:20 (Log4jLogger.java:log:149)
          CoyoteConnector Coyote can't register jmx for protocol

          [ INFO] 19:20 (EmbeddedTomcatService.java:startService:279)
          OK

          [DEBUG] 19:20 (AbstractWebContainer.java:init:276)
          Begin init

          [DEBUG] 19:20 (AbstractWebContainer.java:init:353)
          End init

          [DEBUG] 19:20 (AbstractWebContainer.java:start:418)
          webContext: null

          [DEBUG] 19:20 (AbstractWebContainer.java:start:419)
          warURL: file:/C:/tools/jboss-3.2.3/server/default/deploy/http-invoker.sar/invoke
          r.war/

          [DEBUG] 19:20 (AbstractWebContainer.java:start:420)
          webAppParser: org.jboss.web.AbstractWebContainer$DescriptorParser@1352447

          [ INFO] 19:20 (EmbeddedTomcatService.java:performDeploy:306)
          deploy, ctxPath=/invoker, warUrl=file:/C:/tools/jboss-3.2.3/server/default/deplo
          y/http-invoker.sar/invoker.war/

          [DEBUG] 19:20 (EmbeddedTomcatService.java:createWebContext:521)
          Using session cookies default setting

          [DEBUG] 19:20 (AbstractWebContainer.java:parseWebAppDescriptors:555)
          AbstractWebContainer.parseWebAppDescriptors, Begin

          [DEBUG] 19:20 (AbstractWebContainer.java:parseWebAppDescriptors:563)
          Creating ENC using ClassLoader: java.net.FactoryURLClassLoader@1fc468e

          [DEBUG] 19:20 (AbstractWebContainer.java:parseWebAppDescriptors:567)
          ..org.jboss.mx.loading.UnifiedClassLoader3@180b22e{ url=file:/C:/tools/jboss-3.2
          .3/server/default/deploy/http-invoker.sar/ ,addedOrder=3}

          [DEBUG] 19:20 (AbstractWebContainer.java:parseWebAppDescriptors:567)
          ..org.jboss.system.server.NoAnnotationURLClassLoader@13f3045

          [DEBUG] 19:20 (AbstractWebContainer.java:parseWebAppDescriptors:567)
          ..sun.misc.Launcher$AppClassLoader@e80a59

          [DEBUG] 19:20 (AbstractWebContainer.java:parseWebAppDescriptors:567)
          ..sun.misc.Launcher$ExtClassLoader@1ff5ea7

          [DEBUG] 19:20 (AbstractWebContainer.java:parseWebAppDescriptors:576)
          Linked java:comp/UserTransaction to JNDI name: UserTransaction

          [DEBUG] 19:20 (AbstractWebContainer.java:parseWebAppDescriptors:585)
          addEnvEntries

          [DEBUG] 19:20 (AbstractWebContainer.java:parseWebAppDescriptors:588)
          linkResourceEnvRefs

          [DEBUG] 19:20 (AbstractWebContainer.java:parseWebAppDescriptors:591)
          linkResourceRefs

          [DEBUG] 19:20 (AbstractWebContainer.java:parseWebAppDescriptors:594)
          linkEjbRefs

          [DEBUG] 19:20 (AbstractWebContainer.java:parseWebAppDescriptors:597)
          linkEjbLocalRefs

          [DEBUG] 19:20 (AbstractWebContainer.java:parseWebAppDescriptors:600)
          linkSecurityDomain

          [DEBUG] 19:20 (AbstractWebContainer.java:linkSecurityDomain:788)
          Linking security/securityMgr to JNDI name: java:/jaas/http-invoker

          [DEBUG] 19:20 (AbstractWebContainer.java:parseWebAppDescriptors:602)
          AbstractWebContainer.parseWebAppDescriptors, End

          [ INFO] 19:21 (Log4jLogger.java:log:149)
          SingleSignOnContextConfig[/invoker]: Added certificates -> request attribute Val
          ve

          [ INFO] 19:21 (Log4jLogger.java:log:149)
          SingleSignOnContextConfig[/invoker]: Configured an authenticator for method BASI
          C

          [DEBUG] 19:21 (EmbeddedTomcatService.java:lifecycleEvent:536)
          Context.lifecycleEvent, event=org.apache.catalina.LifecycleEvent[source=Standard
          Engine[MainEngine].StandardHost[localhost].StandardContext[/invoker]]

          [ WARN] 19:21 (EmbeddedTomcatService.java:contextInit:637)
          Unable to invoke setDelegate on class loader:org.jboss.web.tomcat.tc4.WebCtxLoad
          er$ENCLoader@14c7a98

          [ INFO] 19:21 (Log4jLogger.java:log:149)
          StandardManager[/invoker]: Seeding random number generator class java.security.S
          ecureRandom

          [ INFO] 19:21 (Log4jLogger.java:log:149)
          StandardManager[/invoker]: Seeding of random number generator has been completed


          [ INFO] 19:21 (Log4jLogger.java:log:149)
          StandardWrapper[/invoker:default]: Loading container servlet default

          [ INFO] 19:21 (Log4jLogger.java:log:149)
          StandardWrapper[/invoker:invoker]: Loading container servlet invoker

          [DEBUG] 19:22 (EmbeddedTomcatService.java:performDeploy:310)
          Initialized: {WebApplication: /C:/tools/jboss-3.2.3/server/default/deploy/http-i
          nvoker.sar/invoker.war/, URL: file:/C:/tools/jboss-3.2.3/server/default/deploy/h
          ttp-invoker.sar/invoker.war/, classLoader: java.net.FactoryURLClassLoader@1fc468
          e:33310350}

          [ INFO] 19:22 (ServiceMBeanSupport.java:start:220)
          Started jboss.web:service=WebServer

          [DEBUG] 19:22 (AbstractWebContainer.java:init:276)
          Begin init

          [DEBUG] 19:22 (AbstractWebContainer.java:init:353)
          End init

          [DEBUG] 19:22 (AbstractWebContainer.java:start:418)
          webContext: null

          [DEBUG] 19:22 (AbstractWebContainer.java:start:419)
          warURL: file:/C:/tools/jboss-3.2.3/server/default/deploy/jms/jbossmq-httpil.sar/
          jbossmq-httpil.war/

          [DEBUG] 19:22 (AbstractWebContainer.java:start:420)
          webAppParser: org.jboss.web.AbstractWebContainer$DescriptorParser@1082277

          [ INFO] 19:22 (EmbeddedTomcatService.java:performDeploy:306)
          deploy, ctxPath=/jbossmq-httpil, warUrl=file:/C:/tools/jboss-3.2.3/server/defaul
          t/deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/

          [DEBUG] 19:22 (EmbeddedTomcatService.java:createWebContext:521)
          Using session cookies default setting

          [DEBUG] 19:22 (AbstractWebContainer.java:parseWebAppDescriptors:555)
          AbstractWebContainer.parseWebAppDescriptors, Begin

          [DEBUG] 19:22 (AbstractWebContainer.java:parseWebAppDescriptors:563)
          Creating ENC using ClassLoader: java.net.FactoryURLClassLoader@10eb535

          [DEBUG] 19:22 (AbstractWebContainer.java:parseWebAppDescriptors:567)
          ..org.jboss.mx.loading.UnifiedClassLoader3@1e5c339{ url=file:/C:/tools/jboss-3.2
          .3/server/default/deploy/jms/jbossmq-httpil.sar/ ,addedOrder=6}

          [DEBUG] 19:22 (AbstractWebContainer.java:parseWebAppDescriptors:567)
          ..org.jboss.system.server.NoAnnotationURLClassLoader@13f3045

          [DEBUG] 19:22 (AbstractWebContainer.java:parseWebAppDescriptors:567)
          ..sun.misc.Launcher$AppClassLoader@e80a59

          [DEBUG] 19:22 (AbstractWebContainer.java:parseWebAppDescriptors:567)
          ..sun.misc.Launcher$ExtClassLoader@1ff5ea7

          [DEBUG] 19:22 (AbstractWebContainer.java:parseWebAppDescriptors:576)
          Linked java:comp/UserTransaction to JNDI name: UserTransaction

          [DEBUG] 19:22 (AbstractWebContainer.java:parseWebAppDescriptors:585)
          addEnvEntries

          [DEBUG] 19:22 (AbstractWebContainer.java:parseWebAppDescriptors:588)
          linkResourceEnvRefs

          [DEBUG] 19:22 (AbstractWebContainer.java:parseWebAppDescriptors:591)
          linkResourceRefs

          [DEBUG] 19:22 (AbstractWebContainer.java:parseWebAppDescriptors:594)
          linkEjbRefs

          [DEBUG] 19:22 (AbstractWebContainer.java:parseWebAppDescriptors:597)
          linkEjbLocalRefs

          [DEBUG] 19:22 (AbstractWebContainer.java:parseWebAppDescriptors:600)
          linkSecurityDomain

          [DEBUG] 19:22 (AbstractWebContainer.java:linkSecurityDomain:788)
          Linking security/securityMgr to JNDI name: java:/jaas/jbossmq-httpil

          [DEBUG] 19:22 (AbstractWebContainer.java:parseWebAppDescriptors:602)
          AbstractWebContainer.parseWebAppDescriptors, End

          [ INFO] 19:22 (Log4jLogger.java:log:149)
          SingleSignOnContextConfig[/jbossmq-httpil]: Added certificates -> request attrib
          ute Valve

          [ INFO] 19:22 (Log4jLogger.java:log:149)
          SingleSignOnContextConfig[/jbossmq-httpil]: Configured an authenticator for meth
          od BASIC

          [DEBUG] 19:22 (EmbeddedTomcatService.java:lifecycleEvent:536)
          Context.lifecycleEvent, event=org.apache.catalina.LifecycleEvent[source=Standard
          Engine[MainEngine].StandardHost[localhost].StandardContext[/jbossmq-httpil]]

          [ WARN] 19:22 (EmbeddedTomcatService.java:contextInit:637)
          Unable to invoke setDelegate on class loader:org.jboss.web.tomcat.tc4.WebCtxLoad
          er$ENCLoader@39d811

          [ INFO] 19:22 (Log4jLogger.java:log:149)
          StandardManager[/jbossmq-httpil]: Seeding random number generator class java.sec
          urity.SecureRandom

          [ INFO] 19:22 (Log4jLogger.java:log:149)
          StandardManager[/jbossmq-httpil]: Seeding of random number generator has been co
          mpleted

          [ INFO] 19:22 (Log4jLogger.java:log:149)
          StandardWrapper[/jbossmq-httpil:default]: Loading container servlet default

          [ INFO] 19:22 (Log4jLogger.java:log:149)
          StandardWrapper[/jbossmq-httpil:invoker]: Loading container servlet invoker

          [DEBUG] 19:22 (EmbeddedTomcatService.java:performDeploy:310)
          Initialized: {WebApplication: /C:/tools/jboss-3.2.3/server/default/deploy/jms/jb
          ossmq-httpil.sar/jbossmq-httpil.war/, URL: file:/C:/tools/jboss-3.2.3/server/def
          ault/deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/, classLoader: java.net.Fa
          ctoryURLClassLoader@10eb535:17741109}

          [ INFO] 19:27 (JaasSecurityManagerService.java:newSecurityDomainCtx:494)
          Created securityMgr=org.jboss.security.plugins.JaasSecurityManager@7a140f

          [DEBUG] 19:27 (JaasSecurityManager.java:setCachePolicy:181)
          CachePolicy set to: org.jboss.util.TimedCachePolicy@1079781

          [ INFO] 19:27 (JaasSecurityManagerService.java:setSecurityDomainCache:451)
          setCachePolicy, c=org.jboss.util.TimedCachePolicy@1079781

          [ INFO] 19:27 (JaasSecurityManagerService.java:lookupSecurityDomain:472)
          Added HsqlDbRealm, org.jboss.security.plugins.SecurityDomainContext@16bbeaf to m
          ap

          [ INFO] 19:27 (JaasSecurityManagerService.java:newSecurityDomainCtx:494)
          Created securityMgr=org.jboss.security.plugins.JaasSecurityManager@ae4f8b

          [DEBUG] 19:27 (JaasSecurityManager.java:setCachePolicy:181)
          CachePolicy set to: org.jboss.util.TimedCachePolicy@1e8614a

          [ INFO] 19:27 (JaasSecurityManagerService.java:setSecurityDomainCache:451)
          setCachePolicy, c=org.jboss.util.TimedCachePolicy@1e8614a

          [ INFO] 19:27 (JaasSecurityManagerService.java:lookupSecurityDomain:472)
          Added jbossmq, org.jboss.security.plugins.SecurityDomainContext@14b52aa to map

          [ INFO] 19:28 (JaasSecurityManagerService.java:newSecurityDomainCtx:494)
          Created securityMgr=org.jboss.security.plugins.JaasSecurityManager@1443628

          [DEBUG] 19:28 (JaasSecurityManager.java:setCachePolicy:181)
          CachePolicy set to: org.jboss.util.TimedCachePolicy@13f903b

          [ INFO] 19:28 (JaasSecurityManagerService.java:setSecurityDomainCache:451)
          setCachePolicy, c=org.jboss.util.TimedCachePolicy@13f903b

          [ INFO] 19:28 (JaasSecurityManagerService.java:lookupSecurityDomain:472)
          Added JmsXARealm, org.jboss.security.plugins.SecurityDomainContext@164a8c to map


          [DEBUG] 19:29 (AbstractWebContainer.java:init:276)
          Begin init

          [DEBUG] 19:29 (AbstractWebContainer.java:init:353)
          End init

          [DEBUG] 19:29 (AbstractWebContainer.java:start:418)
          webContext: null

          [DEBUG] 19:29 (AbstractWebContainer.java:start:419)
          warURL: file:/C:/tools/jboss-3.2.3/server/default/deploy/express.war/

          [DEBUG] 19:29 (AbstractWebContainer.java:start:420)
          webAppParser: org.jboss.web.AbstractWebContainer$DescriptorParser@7cb66a

          [ INFO] 19:29 (EmbeddedTomcatService.java:performDeploy:306)
          deploy, ctxPath=/express, warUrl=file:/C:/tools/jboss-3.2.3/server/default/deplo
          y/express.war/

          [DEBUG] 19:30 (EmbeddedTomcatService.java:createWebContext:521)
          Using session cookies default setting

          [DEBUG] 19:30 (AbstractWebContainer.java:parseWebAppDescriptors:555)
          AbstractWebContainer.parseWebAppDescriptors, Begin

          [DEBUG] 19:30 (AbstractWebContainer.java:parseWebAppDescriptors:563)
          Creating ENC using ClassLoader: java.net.FactoryURLClassLoader@2465e5

          [DEBUG] 19:30 (AbstractWebContainer.java:parseWebAppDescriptors:567)
          ..org.jboss.mx.loading.UnifiedClassLoader3@1df59bd{ url=file:/C:/tools/jboss-3.2
          .3/server/default/deploy/express.war/ ,addedOrder=35}

          [DEBUG] 19:30 (AbstractWebContainer.java:parseWebAppDescriptors:567)
          ..org.jboss.system.server.NoAnnotationURLClassLoader@13f3045

          [DEBUG] 19:30 (AbstractWebContainer.java:parseWebAppDescriptors:567)
          ..sun.misc.Launcher$AppClassLoader@e80a59

          [DEBUG] 19:30 (AbstractWebContainer.java:parseWebAppDescriptors:567)
          ..sun.misc.Launcher$ExtClassLoader@1ff5ea7

          [DEBUG] 19:30 (AbstractWebContainer.java:parseWebAppDescriptors:576)
          Linked java:comp/UserTransaction to JNDI name: UserTransaction

          [DEBUG] 19:30 (AbstractWebContainer.java:parseWebAppDescriptors:585)
          addEnvEntries

          [DEBUG] 19:30 (AbstractWebContainer.java:parseWebAppDescriptors:588)
          linkResourceEnvRefs

          [DEBUG] 19:30 (AbstractWebContainer.java:linkResourceEnvRefs:640)
          Linking 'jms/processStatus' to JNDI name: topic/processStatus

          [DEBUG] 19:30 (AbstractWebContainer.java:linkResourceEnvRefs:640)
          Linking 'jms/Wafer2DBQueue' to JNDI name: queue/Wafer2DBQueue

          [DEBUG] 19:30 (AbstractWebContainer.java:linkResourceEnvRefs:640)
          Linking 'jms/uploadStatus' to JNDI name: topic/uploadStatus

          [DEBUG] 19:30 (AbstractWebContainer.java:parseWebAppDescriptors:591)
          linkResourceRefs

          [DEBUG] 19:30 (AbstractWebContainer.java:linkResourceRefs:674)
          Linking 'jdbc/mysql' to JNDI name: java:jdbc/mysql

          [DEBUG] 19:30 (AbstractWebContainer.java:parseWebAppDescriptors:594)
          linkEjbRefs

          [DEBUG] 19:30 (AbstractWebContainer.java:parseWebAppDescriptors:597)
          linkEjbLocalRefs

          [DEBUG] 19:30 (AbstractWebContainer.java:parseWebAppDescriptors:600)
          linkSecurityDomain

          [DEBUG] 19:30 (AbstractWebContainer.java:linkSecurityDomain:779)
          Binding security/securityMgr to NullSecurityManager

          [DEBUG] 19:30 (AbstractWebContainer.java:parseWebAppDescriptors:602)
          AbstractWebContainer.parseWebAppDescriptors, End

          [ INFO] 19:31 (Log4jLogger.java:log:149)
          SingleSignOnContextConfig[/express]: Added certificates -> request attribute Val
          ve

          [ INFO] 19:31 (Log4jLogger.java:log:149)
          SingleSignOnContextConfig[/express]: Configured an authenticator for method FORM


          [DEBUG] 19:31 (EmbeddedTomcatService.java:lifecycleEvent:536)
          Context.lifecycleEvent, event=org.apache.catalina.LifecycleEvent[source=Standard
          Engine[MainEngine].StandardHost[localhost].StandardContext[/express]]

          [ WARN] 19:31 (EmbeddedTomcatService.java:contextInit:637)
          Unable to invoke setDelegate on class loader:org.jboss.web.tomcat.tc4.WebCtxLoad
          er$ENCLoader@20a52f

          [ INFO] 19:31 (Log4jLogger.java:log:149)
          StandardManager[/express]: Seeding random number generator class java.security.S
          ecureRandom

          [ INFO] 19:31 (Log4jLogger.java:log:149)
          StandardManager[/express]: Seeding of random number generator has been completed


          [ INFO] 19:31 (Log4jLogger.java:log:149)
          Loading root WebApplicationContext

          [DEBUG] 19:35 (JMSTemplate.java:subscribeToTopicNonDurable:141)
          Looked up topic with name 'java:comp/env/jms/uploadStatus'

          [DEBUG] 19:35 (JMSTemplate.java:subscribeToTopicNonDurable:150)
          MessageListener [com.testAdvantage.webapp.listener.StartupJMSStatusQueueListener
          $UploadStatusListener@e2d0ab] subscribed OK to topic with name 'java:comp/env/jm
          s/uploadStatus'

          [DEBUG] 19:35 (JMSTemplate.java:subscribeToTopicNonDurable:141)
          Looked up topic with name 'java:comp/env/jms/processStatus'

          [DEBUG] 19:35 (JMSTemplate.java:subscribeToTopicNonDurable:150)
          MessageListener [com.testAdvantage.webapp.listener.StartupJMSStatusQueueListener
          $ProcessStatusListener@1e2350a] subscribed OK to topic with name 'java:comp/env/
          jms/processStatus'

          [ INFO] 19:35 (Log4jLogger.java:log:149)
          StandardWrapper[/express:default]: Loading container servlet default

          [DEBUG] 19:35 (ActionServlet.java:initServlet:1118)
          Scanning web.xml for controller servlet mapping

          [DEBUG] 19:35 (ActionServlet.java:addServletMapping:490)
          Process servletName=action, urlPattern=*.do

          [DEBUG] 19:35 (ActionServlet.java:addServletMapping:490)
          Process servletName=register, urlPattern=/register/*

          [DEBUG] 19:35 (ActionServlet.java:addServletMapping:490)
          Process servletName=register, urlPattern=/passwordHint/*

          [DEBUG] 19:35 (ActionServlet.java:addServletMapping:490)
          Process servletName=login, urlPattern=/security/authorize/*

          [DEBUG] 19:36 (ActionServlet.java:initServlet:1151)
          Mapping for servlet 'action' = '*.do'

          [DEBUG] 19:36 (ActionServlet.java:initModuleConfig:683)
          Initializing module path '' configuration from '/WEB-INF/struts-config.xml'

          [DEBUG] 19:36 (ActionServlet.java:initModuleMessageResources:905)
          Initializing module path '' message resources from 'ApplicationResources'

          [DEBUG] 19:36 (ActionServlet.java:initModuleDataSources:794)
          Initializing module path '' data sources

          [DEBUG] 19:36 (ActionServlet.java:initModulePlugIns:844)
          Initializing module path '' plug ins

          [DEBUG] 19:37 (ActionServlet.java:initModuleConfig:683)
          Initializing module path '/upload' configuration from '/WEB-INF/struts-upload.xm
          l'

          [DEBUG] 19:37 (ActionServlet.java:initModuleMessageResources:905)
          Initializing module path '/upload' message resources from 'UploadResources'

          [DEBUG] 19:37 (ActionServlet.java:initModuleDataSources:794)
          Initializing module path '/upload' data sources

          [DEBUG] 19:37 (ActionServlet.java:initModulePlugIns:844)
          Initializing module path '/upload' plug ins

          [ INFO] 19:37 (Log4jLogger.java:log:149)
          StandardWrapper[/express:invoker]: Loading container servlet invoker

          [DEBUG] 19:37 (EmbeddedTomcatService.java:performDeploy:310)
          Initialized: {WebApplication: /C:/tools/jboss-3.2.3/server/default/deploy/expres
          s.war/, URL: file:/C:/tools/jboss-3.2.3/server/default/deploy/express.war/, clas
          sLoader: java.net.FactoryURLClassLoader@2465e5:2385381}

          [DEBUG] 19:37 (AbstractWebContainer.java:init:276)
          Begin init

          [DEBUG] 19:37 (AbstractWebContainer.java:init:353)
          End init

          [DEBUG] 19:37 (AbstractWebContainer.java:start:418)
          webContext: null

          [DEBUG] 19:37 (AbstractWebContainer.java:start:419)
          warURL: file:/C:/tools/jboss-3.2.3/server/default/deploy/jmx-console.war/

          [DEBUG] 19:37 (AbstractWebContainer.java:start:420)
          webAppParser: org.jboss.web.AbstractWebContainer$DescriptorParser@16091de

          [ INFO] 19:37 (EmbeddedTomcatService.java:performDeploy:306)
          deploy, ctxPath=/jmx-console, warUrl=file:/C:/tools/jboss-3.2.3/server/default/d
          eploy/jmx-console.war/

          [DEBUG] 19:37 (EmbeddedTomcatService.java:createWebContext:521)
          Using session cookies default setting

          [DEBUG] 19:37 (AbstractWebContainer.java:parseWebAppDescriptors:555)
          AbstractWebContainer.parseWebAppDescriptors, Begin

          [DEBUG] 19:37 (AbstractWebContainer.java:parseWebAppDescriptors:563)
          Creating ENC using ClassLoader: java.net.FactoryURLClassLoader@108b095

          [DEBUG] 19:37 (AbstractWebContainer.java:parseWebAppDescriptors:567)
          ..org.jboss.mx.loading.UnifiedClassLoader3@1743be{ url=file:/C:/tools/jboss-3.2.
          3/server/default/deploy/jmx-console.war/ ,addedOrder=36}

          [DEBUG] 19:37 (AbstractWebContainer.java:parseWebAppDescriptors:567)
          ..org.jboss.system.server.NoAnnotationURLClassLoader@13f3045

          [DEBUG] 19:37 (AbstractWebContainer.java:parseWebAppDescriptors:567)
          ..sun.misc.Launcher$AppClassLoader@e80a59

          [DEBUG] 19:37 (AbstractWebContainer.java:parseWebAppDescriptors:567)
          ..sun.misc.Launcher$ExtClassLoader@1ff5ea7

          [DEBUG] 19:37 (AbstractWebContainer.java:parseWebAppDescriptors:576)
          Linked java:comp/UserTransaction to JNDI name: UserTransaction

          [DEBUG] 19:37 (AbstractWebContainer.java:parseWebAppDescriptors:585)
          addEnvEntries

          [DEBUG] 19:37 (AbstractWebContainer.java:parseWebAppDescriptors:588)
          linkResourceEnvRefs

          [DEBUG] 19:37 (AbstractWebContainer.java:parseWebAppDescriptors:591)
          linkResourceRefs

          [DEBUG] 19:37 (AbstractWebContainer.java:parseWebAppDescriptors:594)
          linkEjbRefs

          [DEBUG] 19:37 (AbstractWebContainer.java:parseWebAppDescriptors:597)
          linkEjbLocalRefs

          [DEBUG] 19:37 (AbstractWebContainer.java:parseWebAppDescriptors:600)
          linkSecurityDomain

          [DEBUG] 19:37 (AbstractWebContainer.java:linkSecurityDomain:779)
          Binding security/securityMgr to NullSecurityManager

          [DEBUG] 19:37 (AbstractWebContainer.java:parseWebAppDescriptors:602)
          AbstractWebContainer.parseWebAppDescriptors, End

          [ INFO] 19:37 (Log4jLogger.java:log:149)
          SingleSignOnContextConfig[/jmx-console]: Added certificates -> request attribute
          Valve

          [DEBUG] 19:37 (EmbeddedTomcatService.java:lifecycleEvent:536)
          Context.lifecycleEvent, event=org.apache.catalina.LifecycleEvent[source=Standard
          Engine[MainEngine].StandardHost[localhost].StandardContext[/jmx-console]]

          [ WARN] 19:37 (EmbeddedTomcatService.java:contextInit:637)
          Unable to invoke setDelegate on class loader:org.jboss.web.tomcat.tc4.WebCtxLoad
          er$ENCLoader@1219b8c

          [ INFO] 19:37 (Log4jLogger.java:log:149)
          StandardManager[/jmx-console]: Seeding random number generator class java.securi
          ty.SecureRandom

          [ INFO] 19:37 (Log4jLogger.java:log:149)
          StandardManager[/jmx-console]: Seeding of random number generator has been compl
          eted

          [ INFO] 19:37 (Log4jLogger.java:log:149)
          StandardWrapper[/jmx-console:default]: Loading container servlet default

          [ INFO] 19:37 (Log4jLogger.java:log:149)
          StandardWrapper[/jmx-console:invoker]: Loading container servlet invoker

          [DEBUG] 19:37 (EmbeddedTomcatService.java:performDeploy:310)
          Initialized: {WebApplication: /C:/tools/jboss-3.2.3/server/default/deploy/jmx-co
          nsole.war/, URL: file:/C:/tools/jboss-3.2.3/server/default/deploy/jmx-console.wa
          r/, classLoader: java.net.FactoryURLClassLoader@108b095:17346709}

          [DEBUG] 19:37 (AbstractWebContainer.java:init:276)
          Begin init

          [DEBUG] 19:37 (AbstractWebContainer.java:init:299)
          Unpacking war to: C:\tools\jboss-3.2.3\server\default\tmp\deploy\tmp10693web-con
          sole.war

          [DEBUG] 19:38 (AbstractWebContainer.java:init:303)
          Replaced war with unpacked contents

          [DEBUG] 19:38 (AbstractWebContainer.java:init:307)
          Deleted war archive

          [DEBUG] 19:38 (AbstractWebContainer.java:init:353)
          End init

          [DEBUG] 19:38 (AbstractWebContainer.java:start:418)
          webContext: null

          [DEBUG] 19:38 (AbstractWebContainer.java:start:419)
          warURL: file:/C:/tools/jboss-3.2.3/server/default/tmp/deploy/tmp10693web-console
          .war/

          [DEBUG] 19:38 (AbstractWebContainer.java:start:420)
          webAppParser: org.jboss.web.AbstractWebContainer$DescriptorParser@5ec940

          [ INFO] 19:38 (EmbeddedTomcatService.java:performDeploy:306)
          deploy, ctxPath=/web-console, warUrl=file:/C:/tools/jboss-3.2.3/server/default/t
          mp/deploy/tmp10693web-console.war/

          [DEBUG] 19:38 (EmbeddedTomcatService.java:createWebContext:521)
          Using session cookies default setting

          [DEBUG] 19:38 (AbstractWebContainer.java:parseWebAppDescriptors:555)
          AbstractWebContainer.parseWebAppDescriptors, Begin

          [DEBUG] 19:38 (AbstractWebContainer.java:parseWebAppDescriptors:563)
          Creating ENC using ClassLoader: java.net.FactoryURLClassLoader@eeb406

          [DEBUG] 19:38 (AbstractWebContainer.java:parseWebAppDescriptors:567)
          ..org.jboss.mx.loading.UnifiedClassLoader3@551ee3{ url=file:/C:/tools/jboss-3.2.
          3/server/default/tmp/deploy/tmp10693web-console.war/ ,addedOrder=37}

          [DEBUG] 19:38 (AbstractWebContainer.java:parseWebAppDescriptors:567)
          ..org.jboss.system.server.NoAnnotationURLClassLoader@13f3045

          [DEBUG] 19:38 (AbstractWebContainer.java:parseWebAppDescriptors:567)
          ..sun.misc.Launcher$AppClassLoader@e80a59

          [DEBUG] 19:38 (AbstractWebContainer.java:parseWebAppDescriptors:567)
          ..sun.misc.Launcher$ExtClassLoader@1ff5ea7

          [DEBUG] 19:38 (AbstractWebContainer.java:parseWebAppDescriptors:576)
          Linked java:comp/UserTransaction to JNDI name: UserTransaction

          [DEBUG] 19:38 (AbstractWebContainer.java:parseWebAppDescriptors:585)
          addEnvEntries

          [DEBUG] 19:38 (AbstractWebContainer.java:parseWebAppDescriptors:588)
          linkResourceEnvRefs

          [DEBUG] 19:38 (AbstractWebContainer.java:parseWebAppDescriptors:591)
          linkResourceRefs

          [DEBUG] 19:38 (AbstractWebContainer.java:parseWebAppDescriptors:594)
          linkEjbRefs

          [DEBUG] 19:38 (AbstractWebContainer.java:parseWebAppDescriptors:597)
          linkEjbLocalRefs

          [DEBUG] 19:38 (AbstractWebContainer.java:parseWebAppDescriptors:600)
          linkSecurityDomain

          [DEBUG] 19:38 (AbstractWebContainer.java:linkSecurityDomain:779)
          Binding security/securityMgr to NullSecurityManager

          [DEBUG] 19:38 (AbstractWebContainer.java:parseWebAppDescriptors:602)
          AbstractWebContainer.parseWebAppDescriptors, End

          [ INFO] 19:38 (Log4jLogger.java:log:149)
          SingleSignOnContextConfig[/web-console]: Added certificates -> request attribute
          Valve

          [DEBUG] 19:38 (EmbeddedTomcatService.java:lifecycleEvent:536)
          Context.lifecycleEvent, event=org.apache.catalina.LifecycleEvent[source=Standard
          Engine[MainEngine].StandardHost[localhost].StandardContext[/web-console]]

          [ WARN] 19:38 (EmbeddedTomcatService.java:contextInit:637)
          Unable to invoke setDelegate on class loader:org.jboss.web.tomcat.tc4.WebCtxLoad
          er$ENCLoader@1ee4dbe

          [ INFO] 19:38 (Log4jLogger.java:log:149)
          StandardManager[/web-console]: Seeding random number generator class java.securi
          ty.SecureRandom

          [ INFO] 19:38 (Log4jLogger.java:log:149)
          StandardManager[/web-console]: Seeding of random number generator has been compl
          eted

          [ INFO] 19:38 (Log4jLogger.java:log:149)
          StandardWrapper[/web-console:default]: Loading container servlet default

          [ INFO] 19:39 (Log4jLogger.java:log:149)
          StandardWrapper[/web-console:invoker]: Loading container servlet invoker

          [DEBUG] 19:39 (EmbeddedTomcatService.java:performDeploy:310)
          Initialized: {WebApplication: /C:/tools/jboss-3.2.3/server/default/tmp/deploy/tm
          p10693web-console.war/, URL: file:/C:/tools/jboss-3.2.3/server/default/tmp/deplo
          y/tmp10693web-console.war/, classLoader: java.net.FactoryURLClassLoader@eeb406:1
          5643654}

          • 2. 3820629
            jcrume

            As a start to the discussion of how to unify the invocation and interceptor layers used in the aop, jmx, remoting and server frameworks, here are the some base classes derived from the current aop layer. We need to come to a consenus on what the comment layer should look like. This layer should be in the jmx module.


            /** Pretty basic common interface
            */
            public interface Interceptor
            {
             public String getName();
             public Object invoke(Invocation invocation) throws Throwable;
            }
            


            /** An encapsulation of the response: (value or exception) + attributes
            */
            public class InvocationResponse
             implements java.io.Externalizable
            {
             // Constants -----------------------------------------------------
             static final long serialVersionUID = -718723094688127810L;
            
             // The Map of methods used by this Invocation
             protected HashMap contextInfo = null;
             protected Object response = null;
             protected Throwable responseThrowable;
            
             public HashMap getContextInfo()
             {
             return contextInfo;
             }
             public void setContextInfo(HashMap contextInfo)
             {
             this.contextInfo = contextInfo;
             }
            
            
             // Constructors --------------------------------------------------
             public InvocationResponse()
             {
             }
             public InvocationResponse(Object obj)
             {
             this.response = obj;
             }
            
             public Object getResponse()
             {
             return response;
             }
             public void setResponse(Object obj)
             {
             this.response = obj;
             }
            
             public Throwable getResponseThrowable
             {
             return responseThrowable;
             }
             public void setResponseThrowable(Throwable cause)
             {
             this.responseThrowable = cause;
             }
            
             public void addAttachment(Object key, Object val)
             {
             if (contextInfo == null) contextInfo = new HashMap(1);
             contextInfo.put(key, val);
             }
            
             public Object getAttachment(Object key)
             {
             if (contextInfo == null) return null;
             return contextInfo.get(key);
             }
            
             // Externalizable implementation ---------------------------------
             public void writeExternal(java.io.ObjectOutput out)
             throws IOException
             {
             ...
             }
            
             public void readExternal(java.io.ObjectInput in)
             throws IOException, ClassNotFoundException
             {
             ...
             }
            }
            


            /** This class varies significantly... Here is a variation from
            the aop layer.
            */
            public class Invocation implements java.io.Serializable
            {
             protected InvocationType type;
             protected MetaData metadata = null;
             protected transient int currentInterceptor = 0;
             protected transient Interceptor[] interceptors = null;
             protected transient Object targetObject = null;
             protected transient InvocationResponse response;
            
             public Invocation(InvocationType type, Interceptor[] interceptors)
             {
             this(type, interceptors, null);
             }
            
             public Invocation(InvocationType type, Interceptor[] interceptors, MetaData meta)
             {
             this.interceptors = interceptors;
             this.type = type;
             this.metadata = meta;
             }
            
             public Invocation(Invocation invocation)
             {
             this.type = invocation.getType();
             this.interceptors = invocation.getInterceptors();
             targetObject = invocation.targetObject;
             }
            
             public final InvocationType getType()
             {
             return type;
             }
            
            
             public Object getTarget()
             {
             return targetObject;
             }
             public void setTarget(Object target)
             {
             this.targetObject = target;
             }
            
             public final InvocationResponse getResponse()
             {
             if( response == null )
             response = new InvocationResponse();
             return response;
             }
            
            
             public final void addResponseAttachment(Object key, Object val)
             {
             getResponse().addAttachment(key, val);
             }
             public final Object getResponseAttachment(Object key)
             {
             Object val = getResponse().getAttachment(key);
             return val;
             }
            
            
             /**
             * Return all the contextual data attached to this invocation
             */
             public final MetaData getMetaData()
             {
             if (metadata == null) metadata = new SimpleMetaData();
             return metadata;
             }
             /**
             * Set all the contextual data attached to this invocation
             */
             public final void setMetaData(MetaData data)
             {
             this.metadata = data;
             }
            
             /**
             * Invoke on the next interceptor in the chain. If this is already
             * the end of the chain, reflection will call the constructor, field, or
             * method you are invoking on.
             */
             public final Object invokeNext() throws Throwable
             {
             try
             {
             return interceptors[currentInterceptor++].invoke(this);
             }
             finally
             {
             // so that interceptors like clustering can reinvoke down the chain
             currentInterceptor--;
             }
             }
            
             /** Is this useful?
             *
             */
             public final Object invokeNext(org.jboss.aop.advice.Interceptor[] newInterceptors) throws Throwable
             {
             // Save the old stack position
             org.jboss.aop.advice.Interceptor[] oldInterceptors = interceptors;
             int oldCurrentInterceptor = currentInterceptor;
            
             // Start the new stack
             interceptors = newInterceptors;
             currentInterceptor = 0;
            
             // Invoke the new stack
             try
             {
             return invokeNext();
             }
             finally
             {
             // Restore the old stack
             interceptors = oldInterceptors;
             currentInterceptor = oldCurrentInterceptor;
             }
             }
            
             public final Interceptor[] getInterceptors()
             {
             return interceptors;
             }
            
            
             public final void setInterceptors(Interceptor[] interceptors)
             {
             this.interceptors = interceptors;
             }
            
            
             /**
             * This method resolves metadata based on the context of the invocation.
             * It iterates through its list of MetaDataResolvers to find out the
             * value of the metadata desired. Can't these be embedded in the metadata?
             *
             */
             public Object getMetaData(Object group, Object attr)
             {
             Object val = null;
             if (this.metadata != null)
             {
             val = this.metadata.resolve(this, group, attr);
             if (val != null) return val;
             }
            
             return null;
             }
            }
            


            /** Why should MetaData know how to resolve which meta data is needed for a
             a given invocation?
             */
            public class SimpleMetaData implements MetaDataResolver, java.io.Serializable
            {
             protected HashMap metaData = new HashMap();
            
             public static class MetaDataValue implements java.io.Serializable
             {
            
             public final PayloadKey type; // One of "TRANSIENT", "AS_IS", "MARSHALLED"
             public final Object value;
            
             public MetaDataValue(PayloadKey type, Object value)
             {
             this.type = type;
             this.value = value;
             }
            
             public Object get()
             throws IOException, ClassNotFoundException
             {
             if (value instanceof MarshalledValue)
             {
             return ((MarshalledValue)value).get();
             }
             return value;
             }
            
             }
            
             public synchronized HashSet groups()
             {
             return new HashSet(metaData.keySet());
             }
            
             public synchronized HashMap group(String name)
             {
             HashMap map = (HashMap)metaData.get(name);
             if (map == null) return null;
             return (HashMap)map.clone();
             }
            
             public synchronized boolean hasGroup(String name)
             {
             return metaData.get(name) != null;
             }
            
            
             public void addMetaData(Object group, Object attr, Object value)
             {
             addMetaData(group, attr, value, PayloadKey.MARSHALLED);
             }
            
             public synchronized void addMetaData(Object group, Object attr, Object value, PayloadKey type)
             {
             HashMap groupData = (HashMap)metaData.get(group);
             if (groupData == null)
             {
             groupData = new HashMap();
             metaData.put(group, groupData);
             }
             MetaDataValue val = new MetaDataValue(type, value);
             groupData.put(attr, val);
             }
            
             public synchronized Object getMetaData(Object group, Object attr)
             {
             try
             {
             HashMap groupData = (HashMap)metaData.get(group);
             if (groupData == null) return null;
             MetaDataValue val = (MetaDataValue)groupData.get(attr);
             if (val == null) return null;
             return val.get();
             }
             catch (IOException ioex)
             {
             throw new RuntimeException("failed on MarshalledValue", ioex);
             }
             catch (ClassNotFoundException ex)
             {
             throw new RuntimeException("failed on MarshalledValue", ex);
             }
             }
            
             public synchronized void removeMetaData(Object group, Object attr)
             {
             HashMap groupData = (HashMap)metaData.get(group);
             if (groupData != null)
             {
             groupData.remove(attr);
             }
             }
            
             public synchronized void removeGroupData(Object group)
             {
             metaData.remove(group);
             }
            
             public synchronized void clear()
             {
             metaData.clear();
             }
            
             /**
             * merges incoming data. Incoming data overrides existing data
             */
             public synchronized void mergeIn(SimpleMetaData data)
             {
             Iterator it = data.metaData.keySet().iterator();
             while (it.hasNext())
             {
             Object group = it.next();
             HashMap attrs = (HashMap)data.metaData.get(group);
             HashMap map = (HashMap)metaData.get(group);
             if (map == null)
             {
             map = new HashMap();
             this.metaData.put(group, map);
             }
             map.putAll(attrs);
             }
             }
            
             public synchronized Object resolve(Invocation invocation, Object group, Object attr)
             {
             return getMetaData(group, attr);
             }
            
             public SimpleMetaData getAllMetaData(Invocation invocation)
             {
             return this;
             }
            
             public void writeExternal(java.io.ObjectOutput out)
             throws IOException
             {
             ...
             }
            
             public void readExternal(java.io.ObjectInput in)
             throws IOException, ClassNotFoundException
             {
             ...
             }
            
            }
            


            public abstract class Dispatcher
            {
             HashMap targetMap = new HashMap();
            
            
             public boolean isRegistered(Object oid)
             {
             synchronized (targetMap)
             {
             return targetMap.containsKey(oid);
             }
             }
             /**
             * Register an Object ID with an actual target object
             */
             public void registerTarget(Object oid, Object target)
             {
             synchronized (targetMap)
             {
             targetMap.put(oid, target);
             }
             }
            
             public void unregisterTarget(Object oid)
             {
             synchronized (targetMap)
             {
             targetMap.remove(oid);
             }
             }
            
             public Object getRegistered(Object oid)
             {
             synchronized (targetMap)
             {
             return targetMap.get(oid);
             }
             }
            
             public InvocationResponse invoke(Invocation invocation) throws Throwable
             {
             Invocation invocation = processInvocation();
             InvocationReponse response;
             try
             {
             Object target = findTarget(invocation);
             invocation.setTarget(target);
             Object result = dispatch(invocation);
             response = invocation.getOrCreateResponse();
             response.setResult(result);
             }
             catch (Throwable t)
             {
             response = invocation.getOrCreateResponse();
             response.setThrowable(t)
             }
             return response;
             }
            
             public abstract Invocation processInvocation();
             public abstract Object findTarget(Invocation inv, Dispatcher d);
             public abstract Object dispatch(Invocation inv) throws Throwable;
            }
            


            • 3. Re: Remote Session Bean calling other remote session bean &
              bill.burke

              This is a known bug and fixed in CVS.

              • 4. Re: Remote Session Bean calling other remote session bean &
                bill.burke

                Actually, the way you can fix it is as follows:

                Edit ejb3-interceptors-aop.xml

                Change this XML from:

                
                 <stack name="SessionBeanClientInterceptors">
                 <interceptor-ref name="org.jboss.aspects.security.SecurityClientInterceptor"/>
                 <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/>
                 <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/>
                 </stack>
                
                


                To this. Adding the IsLocalInterceptor to the stack:

                
                 <interceptor class="org.jboss.aspects.remoting.IsLocalInterceptor" scope="PER_VM"/>
                
                 <stack name="SessionBeanClientInterceptors">
                 <interceptor-ref name="org.jboss.aspects.remoting.IsLocalInterceptor"/>
                 <interceptor-ref name="org.jboss.aspects.security.SecurityClientInterceptor"/>
                 <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/>
                 <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/>
                 </stack>
                
                
                


                • 5. Re: Remote Session Bean calling other remote session bean &
                  jcrume

                  Bill,

                  I have tried making the change to the xml as you suggested, but then get the following exception on startup:

                  22:18:45,370 ERROR [STDERR] [error] unable to resolve interceptor-ref: org.jboss
                  .aspects.remoting.IsLocalInterceptor file:/C:/jboss-4.0.1RC1/server/all/tmp/depl
                  oy/tmp5908ejb3-interceptors-aop.xml
                  22:18:45,370 ERROR [STDERR] java.lang.RuntimeException: java.lang.RuntimeExcepti
                  on: unable to resolve interceptor-ref: org.jboss.aspects.remoting.IsLocalInterce
                  ptor
                  22:18:45,370 ERROR [STDERR] at org.jboss.aop.AspectXmlLoader.deployXML(Aspec
                  tXmlLoader.java:804)
                  22:18:45,370 ERROR [STDERR] at org.jboss.aop.AspectXmlLoader.deployXML(Aspec
                  tXmlLoader.java:885)
                  22:18:45,370 ERROR [STDERR] at org.jboss.aop.deployment.AspectDeployer.creat
                  e(AspectDeployer.java:136)
                  22:18:45,370 ERROR [STDERR] at org.jboss.deployment.MainDeployer.create(Main
                  Deployer.java:898)
                  22:18:45,380 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(Main
                  Deployer.java:754)
                  22:18:45,380 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(Main
                  Deployer.java:718)
                  22:18:45,380 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(
                  Native Method)
                  22:18:45,380 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(N
                  ativeMethodAccessorImpl.java:39)
                  22:18:45,380 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invo
                  ke(DelegatingMethodAccessorImpl.java:25)
                  22:18:45,380 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:5
                  85)
                  22:18:45,390 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.
                  invoke(ReflectedDispatcher.java:144)
                  22:18:45,390 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invoc
                  ation.java:80)
                  22:18:45,390 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.
                  invoke(AbstractInterceptor.java:122)
                  22:18:45,390 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocat
                  ion.java:74)
                  22:18:45,390 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationI
                  nterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
                  22:18:45,390 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocat
                  ion.java:74)
                  22:18:45,390 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invo
                  ke(AbstractMBeanInvoker.java:249)
                  22:18:45,390 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MB
                  eanServerImpl.java:642)
                  22:18:45,390 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanP
                  roxyExt.java:175)
                  22:18:45,400 ERROR [STDERR] at $Proxy8.deploy(Unknown Source)
                  22:18:45,400 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentSca
                  nner.deploy(URLDeploymentScanner.java:305)
                  22:18:45,400 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentSca
                  nner.scan(URLDeploymentScanner.java:481)
                  22:18:45,400 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeployme
                  ntScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
                  22:18:45,400 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeployme
                  ntScanner.startService(AbstractDeploymentScanner.java:277)
                  22:18:45,400 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInt
                  ernalStart(ServiceMBeanSupport.java:272)
                  22:18:45,400 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInt
                  ernalLifecycle(ServiceMBeanSupport.java:222)
                  22:18:45,400 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor2.invoke(U
                  nknown Source)
                  22:18:45,400 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invo
                  ke(DelegatingMethodAccessorImpl.java:25)
                  22:18:45,400 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:5
                  85)
                  22:18:45,410 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.
                  invoke(ReflectedDispatcher.java:144)
                  22:18:45,410 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invoc
                  ation.java:80)
                  22:18:45,410 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocat
                  ion.java:72)
                  22:18:45,410 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invo
                  ke(AbstractMBeanInvoker.java:249)
                  22:18:45,410 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MB
                  eanServerImpl.java:642)
                  22:18:45,410 ERROR [STDERR] at org.jboss.system.ServiceController$ServicePro
                  xy.invoke(ServiceController.java:891)
                  22:18:45,410 ERROR [STDERR] at $Proxy0.start(Unknown Source)
                  22:18:45,410 ERROR [STDERR] at org.jboss.system.ServiceController.start(Serv
                  iceController.java:416)
                  22:18:45,410 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor5.invoke(U
                  nknown Source)
                  22:18:45,410 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invo
                  ke(DelegatingMethodAccessorImpl.java:25)
                  22:18:45,410 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:5
                  85)
                  22:18:45,410 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.
                  invoke(ReflectedDispatcher.java:144)
                  22:18:45,410 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invoc
                  ation.java:80)
                  22:18:45,410 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocat
                  ion.java:72)
                  22:18:45,410 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invo
                  ke(AbstractMBeanInvoker.java:249)
                  22:18:45,410 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MB
                  eanServerImpl.java:642)
                  22:18:45,410 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanP
                  roxyExt.java:175)
                  22:18:45,410 ERROR [STDERR] at $Proxy4.start(Unknown Source)
                  22:18:45,410 ERROR [STDERR] at org.jboss.deployment.SARDeployer.start(SARDep
                  loyer.java:261)
                  22:18:45,410 ERROR [STDERR] at org.jboss.deployment.MainDeployer.start(MainD
                  eployer.java:944)
                  22:18:45,410 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(Main
                  Deployer.java:755)
                  22:18:45,410 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(Main
                  Deployer.java:718)
                  22:18:45,410 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(Main
                  Deployer.java:702)
                  22:18:45,410 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(
                  Native Method)
                  22:18:45,410 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(N
                  ativeMethodAccessorImpl.java:39)
                  22:18:45,410 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invo
                  ke(DelegatingMethodAccessorImpl.java:25)
                  22:18:45,410 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:5
                  85)
                  22:18:45,410 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.
                  invoke(ReflectedDispatcher.java:144)
                  22:18:45,420 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invoc
                  ation.java:80)
                  22:18:45,420 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.
                  invoke(AbstractInterceptor.java:122)
                  22:18:45,420 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocat
                  ion.java:74)
                  22:18:45,420 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationI
                  nterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
                  22:18:45,420 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocat
                  ion.java:74)
                  22:18:45,420 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invo
                  ke(AbstractMBeanInvoker.java:249)
                  22:18:45,420 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MB
                  eanServerImpl.java:642)
                  22:18:45,420 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanP
                  roxyExt.java:175)
                  22:18:45,420 ERROR [STDERR] at $Proxy5.deploy(Unknown Source)
                  22:18:45,420 ERROR [STDERR] at org.jboss.system.server.ServerImpl.doStart(Se
                  rverImpl.java:413)
                  22:18:45,420 ERROR [STDERR] at org.jboss.system.server.ServerImpl.start(Serv
                  erImpl.java:310)
                  22:18:45,420 ERROR [STDERR] at org.jboss.Main.boot(Main.java:151)
                  22:18:45,420 ERROR [STDERR] at org.jboss.Main$1.run(Main.java:405)
                  22:18:45,420 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
                  22:18:45,420 ERROR [STDERR] Caused by: java.lang.RuntimeException: unable to res
                  olve interceptor-ref: org.jboss.aspects.remoting.IsLocalInterceptor
                  22:18:45,420 ERROR [STDERR] at org.jboss.aop.AspectXmlLoader.loadInterceptor
                  s(AspectXmlLoader.java:260)
                  22:18:45,420 ERROR [STDERR] at org.jboss.aop.AspectXmlLoader.deployIntercept
                  orStack(AspectXmlLoader.java:395)
                  22:18:45,420 ERROR [STDERR] at org.jboss.aop.AspectXmlLoader.deployXML(Aspec
                  tXmlLoader.java:755)
                  22:18:45,420 ERROR [STDERR] ... 70 more
                  22:18:45,430 ERROR [MainDeployer] could not create deployment: file:/C:/jboss-4.
                  0.1RC1/server/all/deploy/ejb3-interceptors-aop.xml
                  org.jboss.deployment.DeploymentException: java.lang.RuntimeException: unable to
                  resolve interceptor-ref: org.jboss.aspects.remoting.IsLocalInterceptor; - nested
                  throwable: (java.lang.RuntimeException: java.lang.RuntimeException: unable to r
                  esolve interceptor-ref: org.jboss.aspects.remoting.IsLocalInterceptor)
                  at org.jboss.aop.deployment.AspectDeployer.create(AspectDeployer.java:14
                  3)
                  at org.jboss.deployment.MainDeployer.create(MainDeployer.java:898)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:754)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:718)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
                  java:39)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:585)
                  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
                  er.java:144)
                  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                  at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
                  or.java:122)
                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                  at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
                  BeanOperationInterceptor.java:131)
                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
                  java:249)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:175)
                  at $Proxy8.deploy(Unknown Source)
                  at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
                  tScanner.java:305)
                  at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
                  canner.java:481)
                  at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
                  doScan(AbstractDeploymentScanner.java:204)
                  at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
                  bstractDeploymentScanner.java:277)
                  at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
                  upport.java:272)
                  at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
                  eanSupport.java:222)
                  at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:585)
                  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
                  er.java:144)
                  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
                  java:249)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                  at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
                  ler.java:891)
                  at $Proxy0.start(Unknown Source)
                  at org.jboss.system.ServiceController.start(ServiceController.java:416)
                  at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:585)
                  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
                  er.java:144)
                  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
                  java:249)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:175)
                  at $Proxy4.start(Unknown Source)
                  at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
                  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:944)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:718)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:702)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
                  java:39)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:585)
                  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
                  er.java:144)
                  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                  at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
                  or.java:122)
                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                  at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
                  BeanOperationInterceptor.java:131)
                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
                  java:249)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:175)
                  at $Proxy5.deploy(Unknown Source)
                  at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:413)
                  at org.jboss.system.server.ServerImpl.start(ServerImpl.java:310)
                  at org.jboss.Main.boot(Main.java:151)
                  at org.jboss.Main$1.run(Main.java:405)
                  at java.lang.Thread.run(Thread.java:595)
                  Caused by: java.lang.RuntimeException: java.lang.RuntimeException: unable to res
                  olve interceptor-ref: org.jboss.aspects.remoting.IsLocalInterceptor
                  at org.jboss.aop.AspectXmlLoader.deployXML(AspectXmlLoader.java:804)
                  at org.jboss.aop.AspectXmlLoader.deployXML(AspectXmlLoader.java:885)
                  at org.jboss.aop.deployment.AspectDeployer.create(AspectDeployer.java:13
                  6)
                  ... 68 more
                  Caused by: java.lang.RuntimeException: unable to resolve interceptor-ref: org.jb
                  oss.aspects.remoting.IsLocalInterceptor
                  at org.jboss.aop.AspectXmlLoader.loadInterceptors(AspectXmlLoader.java:2
                  60)
                  at org.jboss.aop.AspectXmlLoader.deployInterceptorStack(AspectXmlLoader.
                  java:395)
                  at org.jboss.aop.AspectXmlLoader.deployXML(AspectXmlLoader.java:755)
                  ... 70 more
                  22:18:50,648 INFO [EjbModule] Deploying ClusteredHTTPSession
                  22:18:51,088 INFO [EJBDeployer] Deployed: file:/C:/jboss-4.0.1RC1/server/all/de
                  ploy/jbossha-httpsession.sar/ClusteredHttpSessionEB.jar/
                  22:18:55,224 INFO [Embedded] Catalina naming disabled
                  22:18:57,017 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0
                  -8080
                  22:18:57,117 INFO [Catalina] Initialization processed in 1753 ms
                  22:18:57,117 INFO [StandardService] Starting service jboss.web


                  I also tried to inject a reference to the second bean using an @Resouce, and I get the original problem in this thread. I would like to be able to reference one bean from another. Do you have any suggestions?

                  Thanks!

                  Jim

                  • 6. Re: Remote Session Bean calling other remote session bean &
                    jcrume

                    Bill,

                    FYI, I'm using JBoss 4.0.1 RC1 (because there are problems with RC2 and EJB 3.0) and EJB 3.0. JDK is 1.5.0.

                    Thanks!

                    Jim

                    • 7. Re: Remote Session Bean calling other remote session bean &
                      bill.burke

                      did you forget the first interceptor definition?

                      Are you sure you copied the entire XML stated above?

                      • 8. Re: Remote Session Bean calling other remote session bean &
                        nick.hynes

                         

                        "Guest" wrote:

                        Question 2: How do I reference an EJB without using InitialContext. Some have suggested various ways. The following is what I have tried and have been unsuccessful:


                        FYI: If you are wanting to get a local or remote interface to the current EJB (i.e. this), then you can use its session context.

                        We do this to make sure the bean's methods are being invoked inside a container managed transaction.

                        E.g.
                         ((SSessionBeanLocalIntf) this.getSessionContext().getLocalEJBObject()).requiresNewTransMethod()