6 Replies Latest reply on Jan 5, 2012 1:57 PM by matukituki

    Session EJB and MDB Configuration

    kyle.bober

      JBoss 5.1.0.GA

      I am attempting to configure my Stateless MDB via the instrcutions provided at the following link : http://www.jboss.org/file-access/default/members/jbossejb3/freezone/docs/reference/1.0.7/html/SessionBean_and_MDB_configuration.html

      Here is my mydoamin-aop.xml :

      <?xml version="1.0" encoding="UTF-8"?>
      <aop xmlns="urn:jboss:aop-beans:1.0">
       <domain name="Strictly Pooled Message Driven Bean" extends="Message Driven Bean" inheritBindings="true">
       <annotation expr="!class(@org.jboss.ejb3.annotation.Pool)">
       @org.jboss.ejb3.annotation.Pool (value="StrictMaxPool", maxSize=2, timeout=10000)
       </annotation>
       </domain>
      </aop>
      


      Here is my jboss.xml :

      <?xml version="1.0" encoding="utf-8"?>
      <jboss xmlns:xs="http://www.jboss.org/j2ee/schema"
       xs:schemaLocation="http://www.jboss.org/j2ee/schema jboss_5_1.xsd"
       version="5.1">
      
       <enterprise-beans>
       <message-driven>
       <ejb-name>KATReportTopicListener</ejb-name>
       <destination-jndi-name>topic/KATReportTopic</destination-jndi-name>
       <aop-domain-name>Strictly Pooled Message Driven Bean</aop-domain-name>
       </message-driven>
       </enterprise-beans>
      </jboss>
      
      


      Both of these are included in my ejbname-ejb.jar file in the META-INF folder. My EJB Jar file is included in my EAR file which I can deploy to JBoss. When I start up the application server I receive the following exception:

      16:43:20,765 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/C:/ApplicationServers/jboss-5.1.0.GA/server/default/deploy/svc-kat0.0.1--SNAPSHOT.ear/ state=PreReal mode=Manual requiredState=Real
      org.jboss.deployers.spi.DeploymentException: Error deploying service-kat-ejb-0.0.1-SNAPSHOT.jar: No container configured with name 'Strictly Pooled Message Driven Bean''
      at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:196)
      at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:99)
      at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internalDeploy(AbstractVFSRealDeployer.java:45)
      at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
      at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
      at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
      at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
      at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
      at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
      at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
      at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
      at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
      at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
      at org.jboss.Main.boot(Main.java:221)
      at org.jboss.Main$1.run(Main.java:556)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: java.lang.RuntimeException: No container configured with name 'Strictly Pooled Message Driven Bean''
      at org.jboss.ejb3.Ejb3AnnotationHandler.getMDB(Ejb3AnnotationHandler.java:333)
      at org.jboss.ejb3.Ejb3DescriptorHandler.getMDB(Ejb3DescriptorHandler.java:602)
      at org.jboss.ejb3.Ejb3AnnotationHandler.getContainers(Ejb3AnnotationHandler.java:215)
      at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:718)
      at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:669)
      at org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:651)
      at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:614)
      at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:491)
      at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:182)
      ... 34 more
      16:43:20,812 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

      DEPLOYMENTS IN ERROR:
      Deployment "vfszip:/C:/ApplicationServers/jboss-5.1.0.GA/server/default/deploy/svc-kat0.0.1--SNAPSHOT.ear/" is in error due to the following reason(s): java.lang.RuntimeException: No container configured with name 'Strictly Pooled Message Driven Bean''

        • 1. Re: Session EJB and MDB Configuration
          jaikiran

           

          Both of these are included in my ejbname-ejb.jar file in the META-INF folder


          Are you sure the mydomain-aop.xml is included in the META-INF of the ejb jar?

          Please post the output of

          jar -tf service-kat-ejb-0.0.1-SNAPSHOT.jar


          • 2. Re: Session EJB and MDB Configuration
            kyle.bober

            Yup, the mydomain-aop.xml file is definetly present in the META-INF directory. Here is the contents of the jar as you requested.

            META-INF/
            META-INF/MANIFEST.MF
            com/
            com/thesearchagency/
            com/thesearchagency/service/
            com/thesearchagency/service/kat/
            com/thesearchagency/service/kat/adapter/
            com/thesearchagency/service/kat/impl/
            com/thesearchagency/service/kat/jmx/
            com/thesearchagency/service/kat/mdb/
            com/thesearchagency/service/kat/model/
            com/thesearchagency/service/kat/report/
            com/thesearchagency/service/kat/util/
            com/thesearchagency/service/kat/util/manager/
            com/thesearchagency/service/kat/util/parser/
            com/thesearchagency/service/kat/validator/
            com/thesearchagency/service/kat/adapter/IKATDataServiceAdapter.class
            com/thesearchagency/service/kat/adapter/KATDataWSAdapter.class
            com/thesearchagency/service/kat/adapter/KATDataWSAdapterException.class
            com/thesearchagency/service/kat/IKATReportDeleteTimerService.class
            com/thesearchagency/service/kat/IKATReportLocal.class
            com/thesearchagency/service/kat/IKATReportProcessTimerService.class
            com/thesearchagency/service/kat/IKATReportRemote.class
            com/thesearchagency/service/kat/IKATReportWS.class
            com/thesearchagency/service/kat/impl/KATReportDeleteTimerService.class
            com/thesearchagency/service/kat/impl/KATReportEJB.class
            com/thesearchagency/service/kat/impl/KATReportProcessTimerService.class
            com/thesearchagency/service/kat/impl/KATReportWS.class
            com/thesearchagency/service/kat/jmx/IKATReportServiceJMX.class
            com/thesearchagency/service/kat/jmx/KATReportServiceJMX.class
            com/thesearchagency/service/kat/jmx/KATReportServiceJMXException.class
            com/thesearchagency/service/kat/KATReportServiceException.class
            com/thesearchagency/service/kat/mdb/KATReportTopicCourier.class
            com/thesearchagency/service/kat/mdb/KATReportTopicException.class
            com/thesearchagency/service/kat/mdb/KATReportTopicListener.class
            com/thesearchagency/service/kat/model/KATReportDeleteTimer.class
            com/thesearchagency/service/kat/model/KATReportProcessTimer.class
            com/thesearchagency/service/kat/model/KeywordAnalysisDeleteCriteria.class
            com/thesearchagency/service/kat/report/KATExactMatchReport.class
            com/thesearchagency/service/kat/TransactionException.class
            com/thesearchagency/service/kat/TSABaseEJB.class
            com/thesearchagency/service/kat/TSABaseWS.class
            com/thesearchagency/service/kat/util/manager/ExcelPOIManager.class
            com/thesearchagency/service/kat/util/manager/JTAManager.class
            com/thesearchagency/service/kat/util/manager/KATReportManager.class
            com/thesearchagency/service/kat/util/manager/KATReportManagerException.class
            com/thesearchagency/service/kat/util/manager/KATReportMappingManager.class
            com/thesearchagency/service/kat/util/manager/KATReportPersistenceManager.class
            com/thesearchagency/service/kat/util/manager/KATReportPersistentManagerException.class
            com/thesearchagency/service/kat/util/parser/KATReportExcelDOMParser.class
            com/thesearchagency/service/kat/util/parser/KATReportExcelDOMParserException.class
            com/thesearchagency/service/kat/util/PropertyLoader.class
            com/thesearchagency/service/kat/util/ServiceLocator.class
            com/thesearchagency/service/kat/ValidationException.class
            com/thesearchagency/service/kat/validator/AnnotationValidator.class
            dozerBeanMapping.xml
            META-INF/jboss.xml
            META-INF/mydomain-aop.xml
            web-services.properties
            META-INF/maven/
            META-INF/maven/com.thesearchagency.service/
            META-INF/maven/com.thesearchagency.service/service-kat-ejb/
            META-INF/maven/com.thesearchagency.service/service-kat-ejb/pom.xml
            META-INF/maven/com.thesearchagency.service/service-kat-ejb/pom.properties

            • 3. Re: Session EJB and MDB Configuration
              kyle.bober

              Not sure if this is anything but I also noticed an extra ' single quote in the logging output of the container name. Is it possible there is a bug adding an extra ' single quote to the container name? Just a thought.

              DEPLOYMENTS IN ERROR:
              Deployment "vfszip:/C:/ApplicationServers/jboss-5.1.0.GA/server/default/deploy/svc-kat0.0.1--SNAPSHOT.ear/" is in error due to the following reason(s): java.lang.RuntimeException: No container configured with name 'Strictly Pooled Message Driven Bean''

              • 4. Re: Session EJB and MDB Configuration
                jaikiran

                 

                "kyle.bober" wrote:
                Not sure if this is anything but I also noticed an extra ' single quote in the logging output of the container name. Is it possible there is a bug adding an extra ' single quote to the container name? Just a thought.


                You can ignore the extra single quote in the log output. That's actually a typo in the log message.

                As for the issue you are running into, i have tried this using the "mdb" tutorial that we have on that page and it's working fine locally. Can you post the entire logs that you see on the console (not server.log)? Maybe that will give a hint.

                While posting logs or xml content or code, please remember to wrap it in a code block by using the Code button in the message editor window. Please use the Preview button to ensure that your post is correctly formatted.


                • 5. Re: Session EJB and MDB Configuration
                  simoncigoj

                  I have the same problem any solution to this?

                  • 6. Re: Session EJB and MDB Configuration
                    matukituki

                    I was looking for this question and read some posts, but I haven't found answer so, I will put here how did it work for me, if this can help somebody.

                     

                    Delete the mydomain-aop.xml file from the ejb jars META-INF folder, as it was ignored when the application is deployed. Edit the ejb3-interceptors-aop.xml file in the deploy folder, copy the domain called Message Driven Bean with another name (My Message Driven Bean), then reference this domain from the jboss.xml file inside the ejb jar.