1 2 Previous Next 17 Replies Latest reply on Apr 22, 2008 12:48 PM by Clebert Suconic

    Jboss Messaging How To

    analyst@8 java_analyst Newbie

      I am trying to learn jboss messaging.


      I am using jboss-4.2.2.GA Application Server and jboss-messaging-1.4.0.SP3.

      How to bring these two as one, I have to copy "jboss-4.2.2.GA" folder under Jboss Home?

      And how to create connection factory , topic and queue to experiment with jboss messaging ?

      ---------------
      -Sudheer

        • 2. Re: Jboss Messaging How To
          analyst@8 java_analyst Newbie

          i am able to bring these to as one, i mean i am able to install jboss messaging.
          [

          by going to cd util and running ant -f release-admin.xml
          ]

          but still i am not clear how to create connection factory , topic and queue to experiment with jboss messaging ?

          can any one help to me ?

          ------------
          -Sudheer

          • 3. Re: Jboss Messaging How To
            Andy Taylor Master

            read the manual. Chapter 6 in the user manual will tell you how to configure destinations and connection factories.
            http://www.jboss.org/file-access/default/members/jbossmessaging/freezone/docs/userguide-1.4.0.SP3/html/configuration.html#conf.destination

            • 4. Re: Jboss Messaging How To
              analyst@8 java_analyst Newbie

              thanks for your reply.

              I created connection factory as given here
              http://www.jboss.org/file-access/default/members/jbossmessaging/freezone/docs/userguide-1.4.0.SP3/html/configuration.html#conf.destination

              but when I run my program , i am getting error as
              -----------------
              Exception in thread "main" javax.naming.NameNotFoundException: MyConnectionFactory not bound
              at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
              --------------

              but when I start server

              I tried by running as fallows


              C:\myjboss-4.2.2\jboss-4.2.2.GA\bin>run -c messaging


              =====================================================
              18:57:42,078 INFO [TransactionManagerService] Setting up property manager MBean
              and JMX layer
              18:57:42,312 INFO [TransactionManagerService] Starting recovery manager
              18:57:42,421 INFO [TransactionManagerService] Recovery manager started
              18:57:42,421 INFO [TransactionManagerService] Binding TransactionManager JNDI R
              eference
              18:57:46,062 INFO [EJB3Deployer] Starting java:comp multiplexer
              18:57:47,515 INFO [STDOUT] no object for null
              18:57:47,531 INFO [STDOUT] no object for null
              18:57:47,562 INFO [STDOUT] no object for null
              18:57:47,593 INFO [STDOUT] no object for {urn:jboss:bean-deployer}supplyType
              18:57:47,609 INFO [STDOUT] no object for {urn:jboss:bean-deployer}dependsType
              18:57:50,437 INFO [NativeServerConfig] JBoss Web Services - Native
              18:57:50,437 INFO [NativeServerConfig] jbossws-native-2.0.1.SP2 (build=20071021
              0837)
              18:57:51,062 INFO [ServiceConfigurator] Problem configuring service jboss.messa
              ging.connectionfactory:service=MyConnectionFactory
              org.jboss.deployment.DeploymentException: Exception setting attribute javax.mana
              gement.Attribute@1b94ea2 on mbean jboss.messaging.connectionfactory:service=MyCo
              nnectionFactory; - nested throwable: (javax.management.AttributeNotFoundExceptio
              n: Attribute 'ClientID' is not writable)
              at org.jboss.system.ServiceConfigurator.setAttribute(ServiceConfigurator
              .java:707)
              at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.ja
              va:332)
              at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigura
              tor.java:462)
              at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java
              :157)
              at org.jboss.system.ServiceController.install(ServiceController.java:226
              )
              at sun.reflect.GeneratedMethodAccessor19.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:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
              java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
              at $Proxy4.install(Unknown Source)
              at org.jboss.deployment.SARDeployer.create(SARDeployer.java:249)
              at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
              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:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
              or.java:133)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
              BeanOperationInterceptor.java:142)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
              java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
              at $Proxy9.deploy(Unknown Source)
              at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
              tScanner.java:421)
              at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
              canner.java:634)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
              doScan(AbstractDeploymentScanner.java:263)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
              bstractDeploymentScanner.java:336)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
              upport.java:289)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
              eanSupport.java:245)
              at sun.reflect.GeneratedMethodAccessor4.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:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
              java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
              ler.java:978)
              at $Proxy0.start(Unknown Source)
              at org.jboss.system.ServiceController.start(ServiceController.java:417)
              at sun.reflect.GeneratedMethodAccessor9.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:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
              java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
              at $Proxy4.start(Unknown Source)
              at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
              at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
              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:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
              or.java:133)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
              BeanOperationInterceptor.java:142)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
              java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
              at $Proxy5.deploy(Unknown Source)
              at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
              at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
              at org.jboss.Main.boot(Main.java:200)
              at org.jboss.Main$1.run(Main.java:508)
              at java.lang.Thread.run(Thread.java:595)
              Caused by: javax.management.AttributeNotFoundException: Attribute 'ClientID' is
              not writable
              at org.jboss.mx.server.AbstractMBeanInvoker.setAttribute(AbstractMBeanIn
              voker.java:431)
              at org.jboss.mx.server.MBeanServerImpl.setAttribute(MBeanServerImpl.java
              :608)
              at org.jboss.system.ServiceConfigurator.setAttribute(ServiceConfigurator
              .java:703)
              ... 83 more
              18:57:52,015 INFO [Embedded] Catalina naming disabled
              18:57:52,234 INFO [AprLifecycleListener] The Apache Tomcat Native library which
              allows optimal performance in production environments was not found on the java
              .library.path: C:\Program Files\Java\jdk1.5.0_11\bin;.;C:\WINDOWS\system32;C:\WI
              NDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\bea\weblogic81\
              server\lib;C:\bea\weblogic81\server\bin;D:\Work\apache-ant-1.6.5\bin;C:\Program
              Files\Java\jdk1.5.0_11\bin;C:\Program Files\Java\jdk1.5.0_11\jre\bin;
              18:57:52,343 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-127.0.0
              .1-8080
              18:57:52,343 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-127.0.0.1-80
              09
              18:57:52,343 INFO [Catalina] Initialization processed in 330 ms
              18:57:52,359 INFO [StandardService] Starting service jboss.web
              18:57:52,359 INFO [StandardEngine] Starting Servlet Engine: JBossWeb/2.0.1.GA
              18:57:52,421 INFO [Catalina] Server startup in 77 ms
              18:57:52,578 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jboss-w
              eb.deployer/ROOT.war/
              18:57:53,281 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/
              http-invoker.sar/invoker.war/
              18:57:53,656 INFO [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../deploy/
              jbossws.sar/jbossws-context.war/
              18:57:54,015 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../dep
              loy/management/console-mgr.sar/web-console.war/
              18:57:54,578 INFO [MailService] Mail Service bound to java:/Mail
              18:57:54,812 INFO [RARDeployment] Required license terms exist, view META-INF/r
              a.xml in .../deploy/jboss-ha-local-jdbc.rar
              18:57:54,875 INFO [RARDeployment] Required license terms exist, view META-INF/r
              a.xml in .../deploy/jboss-ha-xa-jdbc.rar
              18:57:54,921 INFO [RARDeployment] Required license terms exist, view META-INF/r
              a.xml in .../deploy/jboss-local-jdbc.rar
              18:57:54,968 INFO [RARDeployment] Required license terms exist, view META-INF/r
              a.xml in .../deploy/jboss-xa-jdbc.rar
              18:57:55,031 INFO [RARDeployment] Required license terms exist, view META-INF/r
              a.xml in .../deploy/jms-ra.rar
              18:57:55,078 INFO [RARDeployment] Required license terms exist, view META-INF/r
              a.xml in .../deploy/mail-ra.rar
              18:57:55,140 INFO [RARDeployment] Required license terms exist, view META-INF/r
              a.xml in .../deploy/quartz-ra.rar
              18:57:55,140 INFO [QuartzResourceAdapter] start quartz!!!
              18:57:55,218 INFO [SimpleThreadPool] Job execution threads will use class loade
              r of thread: main
              18:57:55,265 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
              18:57:55,265 INFO [RAMJobStore] RAMJobStore initialized.
              18:57:55,265 INFO [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzSchedule
              r' initialized from default resource file in Quartz package: 'quartz.properties'

              18:57:55,281 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
              18:57:55,281 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUS
              TERED started.
              18:57:55,984 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jb
              oss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
              18:57:56,671 WARN [SecurityMetadataStore] WARNING! POTENTIAL SECURITY RISK. It
              has been detected that the MessageSucker component which sucks messages from one
              node to another has not had its password changed from the installation default.
              Please see the JBoss Messaging user guide for instructions on how to do this.
              18:57:56,687 INFO [ServerPeer] JBoss Messaging 1.4.0.SP3 server [0] started
              18:57:57,078 INFO [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has l
              easing enabled, lease period 10000 milliseconds
              18:57:57,078 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.Co
              nnectionFactory@1f49969 started
              18:57:57,078 WARN [ConnectionFactoryJNDIMapper] supportsFailover attribute is t
              rue on connection factory: jboss.messaging.connectionfactory:service=ClusteredCo
              nnectionFactory but post office is non clustered. So connection factory will *no
              t* support failover
              18:57:57,093 WARN [ConnectionFactoryJNDIMapper] supportsLoadBalancing attribute
              is true on connection factory: jboss.messaging.connectionfactory:service=Cluste
              redConnectionFactory but post office is non clustered. So connection factory wil
              l *not* support load balancing
              18:57:57,093 INFO [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has l
              easing enabled, lease period 10000 milliseconds
              18:57:57,093 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.Co
              nnectionFactory@fa97f started
              18:57:57,093 INFO [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has l
              easing enabled, lease period 10000 milliseconds
              18:57:57,093 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.Co
              nnectionFactory@862041 started
              18:57:57,125 INFO [QueueService] Queue[/queue/DLQ] started, fullSize=200000, pa
              geSize=2000, downCacheSize=2000
              18:57:57,125 INFO [QueueService] Queue[/queue/ExpiryQueue] started, fullSize=20
              0000, pageSize=2000, downCacheSize=2000
              18:57:57,125 INFO [TopicService] Topic[/topic/testTopic] started, fullSize=2000
              00, pageSize=2000, downCacheSize=2000
              18:57:57,125 INFO [TopicService] Topic[/topic/securedTopic] started, fullSize=2
              00000, pageSize=2000, downCacheSize=2000
              18:57:57,125 INFO [TopicService] Topic[/topic/testDurableTopic] started, fullSi
              ze=200000, pageSize=2000, downCacheSize=2000
              18:57:57,140 INFO [QueueService] Queue[/queue/testQueue] started, fullSize=2000
              00, pageSize=2000, downCacheSize=2000
              18:57:57,140 INFO [QueueService] Queue[/queue/A] started, fullSize=200000, page
              Size=2000, downCacheSize=2000
              18:57:57,140 INFO [QueueService] Queue[/queue/B] started, fullSize=200000, page
              Size=2000, downCacheSize=2000
              18:57:57,140 INFO [QueueService] Queue[/queue/C] started, fullSize=200000, page
              Size=2000, downCacheSize=2000
              18:57:57,156 INFO [QueueService] Queue[/queue/D] started, fullSize=200000, page
              Size=2000, downCacheSize=2000
              18:57:57,156 INFO [QueueService] Queue[/queue/ex] started, fullSize=200000, pag
              eSize=2000, downCacheSize=2000
              18:57:57,156 INFO [QueueService] Queue[/queue/PrivateDLQ] started, fullSize=200
              000, pageSize=2000, downCacheSize=2000
              18:57:57,156 INFO [QueueService] Queue[/queue/PrivateExpiryQueue] started, full
              Size=200000, pageSize=2000, downCacheSize=2000
              18:57:57,171 INFO [QueueService] Queue[/queue/QueueWithOwnDLQAndExpiryQueue] st
              arted, fullSize=200000, pageSize=2000, downCacheSize=2000
              18:57:57,171 INFO [TopicService] Topic[/topic/TopicWithOwnDLQAndExpiryQueue] st
              arted, fullSize=200000, pageSize=2000, downCacheSize=2000
              18:57:57,171 INFO [QueueService] Queue[/queue/QueueWithOwnRedeliveryDelay] star
              ted, fullSize=200000, pageSize=2000, downCacheSize=2000
              18:57:57,171 INFO [TopicService] Topic[/topic/TopicWithOwnRedeliveryDelay] star
              ted, fullSize=200000, pageSize=2000, downCacheSize=2000
              18:57:57,171 INFO [QueueService] Queue[/queue/testDistributedQueue] started, fu
              llSize=200000, pageSize=2000, downCacheSize=2000
              18:57:57,187 INFO [TopicService] Topic[/topic/testDistributedTopic] started, fu
              llSize=200000, pageSize=2000, downCacheSize=2000
              18:57:57,187 INFO [TopicService] Topic[/topic/myTopic] started, fullSize=200000
              , pageSize=2000, downCacheSize=2000
              18:57:57,375 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jb
              oss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
              18:57:57,406 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../dep
              loy/jmx-console.war/
              18:57:57,531 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

              --- MBeans waiting for other MBeans ---
              ObjectName: jboss.messaging.connectionfactory:service=MyConnectionFactory
              State: FAILED
              Reason: org.jboss.deployment.DeploymentException: Exception setting attribute
              javax.management.Attribute@1b94ea2 on mbean jboss.messaging.connectionfactory:se
              rvice=MyConnectionFactory; - nested throwable: (javax.management.AttributeNotFou
              ndException: Attribute 'ClientID' is not writable)
              I Depend On:
              jboss.messaging:service=ServerPeer
              jboss.messaging:service=Connector,transport=bisocket
              jboss.messaging:service=PostOffice

              --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
              ObjectName: jboss.messaging.connectionfactory:service=MyConnectionFactory
              State: FAILED
              Reason: org.jboss.deployment.DeploymentException: Exception setting attribute
              javax.management.Attribute@1b94ea2 on mbean jboss.messaging.connectionfactory:se
              rvice=MyConnectionFactory; - nested throwable: (javax.management.AttributeNotFou
              ndException: Attribute 'ClientID' is not writable)
              I Depend On:
              jboss.messaging:service=ServerPeer
              jboss.messaging:service=Connector,transport=bisocket
              jboss.messaging:service=PostOffice

              18:57:57,671 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8
              080
              18:57:57,703 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
              18:57:57,718 INFO [Server] JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBos
              s_4_2_2_GA date=200710221139)] Started in 19s:672ms

              ===========================

              i created file connection-factories-service.xml(content is same as in url ) and placed C:\myjboss-4.2.2\jboss-4.2.2.GA\server\messaging\deploy

              I have to create any entries in any other xml file (or) any thing i need to do for clinet id , etc... ?

              Please help me


              • 5. Re: Jboss Messaging How To
                analyst@8 java_analyst Newbie

                 

                "sudheer_java26" wrote:
                thanks for your reply.

                I created connection factory as given here
                http://www.jboss.org/file-access/default/members/jbossmessaging/freezone/docs/userguide-1.4.0.SP3/html/configuration.html#conf.destination

                but when I run my program , i am getting error as
                -----------------
                Exception in thread "main" javax.naming.NameNotFoundException: MyConnectionFactory not bound
                at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
                --------------

                but when I start server

                I tried by running as fallows


                C:\myjboss-4.2.2\jboss-4.2.2.GA\bin>run -c messaging (i did not change anything while installing so , my messaging path is as default)
                =====================================================
                18:57:42,078 INFO [TransactionManagerService] Setting up property manager MBean
                and JMX layer
                18:57:42,312 INFO [TransactionManagerService] Starting recovery manager
                18:57:42,421 INFO [TransactionManagerService] Recovery manager started
                18:57:42,421 INFO [TransactionManagerService] Binding TransactionManager JNDI R
                eference
                18:57:46,062 INFO [EJB3Deployer] Starting java:comp multiplexer
                18:57:47,515 INFO [STDOUT] no object for null
                18:57:47,531 INFO [STDOUT] no object for null
                18:57:47,562 INFO [STDOUT] no object for null
                18:57:47,593 INFO [STDOUT] no object for {urn:jboss:bean-deployer}supplyType
                18:57:47,609 INFO [STDOUT] no object for {urn:jboss:bean-deployer}dependsType
                18:57:50,437 INFO [NativeServerConfig] JBoss Web Services - Native
                18:57:50,437 INFO [NativeServerConfig] jbossws-native-2.0.1.SP2 (build=20071021
                0837)
                18:57:51,062 INFO [ServiceConfigurator] Problem configuring service jboss.messa
                ging.connectionfactory:service=MyConnectionFactory
                org.jboss.deployment.DeploymentException: Exception setting attribute javax.mana
                gement.Attribute@1b94ea2 on mbean jboss.messaging.connectionfactory:service=MyCo
                nnectionFactory; - nested throwable: (javax.management.AttributeNotFoundExceptio
                n: Attribute 'ClientID' is not writable)
                at org.jboss.system.ServiceConfigurator.setAttribute(ServiceConfigurator
                .java:707)
                at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.ja
                va:332)
                at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigura
                tor.java:462)
                at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java
                :157)
                at org.jboss.system.ServiceController.install(ServiceController.java:226
                )
                at sun.reflect.GeneratedMethodAccessor19.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:155)
                at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
                java:264)
                at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                at $Proxy4.install(Unknown Source)
                at org.jboss.deployment.SARDeployer.create(SARDeployer.java:249)
                at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
                at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
                at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                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:155)
                at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
                or.java:133)
                at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
                BeanOperationInterceptor.java:142)
                at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
                java:264)
                at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                at $Proxy9.deploy(Unknown Source)
                at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
                tScanner.java:421)
                at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
                canner.java:634)
                at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
                doScan(AbstractDeploymentScanner.java:263)
                at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
                bstractDeploymentScanner.java:336)
                at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
                upport.java:289)
                at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
                eanSupport.java:245)
                at sun.reflect.GeneratedMethodAccessor4.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:155)
                at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
                java:264)
                at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
                ler.java:978)
                at $Proxy0.start(Unknown Source)
                at org.jboss.system.ServiceController.start(ServiceController.java:417)
                at sun.reflect.GeneratedMethodAccessor9.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:155)
                at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
                java:264)
                at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                at $Proxy4.start(Unknown Source)
                at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
                at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
                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:155)
                at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
                or.java:133)
                at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
                BeanOperationInterceptor.java:142)
                at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
                java:264)
                at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                at $Proxy5.deploy(Unknown Source)
                at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
                at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
                at org.jboss.Main.boot(Main.java:200)
                at org.jboss.Main$1.run(Main.java:508)
                at java.lang.Thread.run(Thread.java:595)
                Caused by: javax.management.AttributeNotFoundException: Attribute 'ClientID' is
                not writable
                at org.jboss.mx.server.AbstractMBeanInvoker.setAttribute(AbstractMBeanIn
                voker.java:431)
                at org.jboss.mx.server.MBeanServerImpl.setAttribute(MBeanServerImpl.java
                :608)
                at org.jboss.system.ServiceConfigurator.setAttribute(ServiceConfigurator
                .java:703)
                ... 83 more
                18:57:52,015 INFO [Embedded] Catalina naming disabled
                18:57:52,234 INFO [AprLifecycleListener] The Apache Tomcat Native library which
                allows optimal performance in production environments was not found on the java
                .library.path: C:\Program Files\Java\jdk1.5.0_11\bin;.;C:\WINDOWS\system32;C:\WI
                NDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\bea\weblogic81\
                server\lib;C:\bea\weblogic81\server\bin;D:\Work\apache-ant-1.6.5\bin;C:\Program
                Files\Java\jdk1.5.0_11\bin;C:\Program Files\Java\jdk1.5.0_11\jre\bin;
                18:57:52,343 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-127.0.0
                .1-8080
                18:57:52,343 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-127.0.0.1-80
                09
                18:57:52,343 INFO [Catalina] Initialization processed in 330 ms
                18:57:52,359 INFO [StandardService] Starting service jboss.web
                18:57:52,359 INFO [StandardEngine] Starting Servlet Engine: JBossWeb/2.0.1.GA
                18:57:52,421 INFO [Catalina] Server startup in 77 ms
                18:57:52,578 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jboss-w
                eb.deployer/ROOT.war/
                18:57:53,281 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/
                http-invoker.sar/invoker.war/
                18:57:53,656 INFO [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../deploy/
                jbossws.sar/jbossws-context.war/
                18:57:54,015 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../dep
                loy/management/console-mgr.sar/web-console.war/
                18:57:54,578 INFO [MailService] Mail Service bound to java:/Mail
                18:57:54,812 INFO [RARDeployment] Required license terms exist, view META-INF/r
                a.xml in .../deploy/jboss-ha-local-jdbc.rar
                18:57:54,875 INFO [RARDeployment] Required license terms exist, view META-INF/r
                a.xml in .../deploy/jboss-ha-xa-jdbc.rar
                18:57:54,921 INFO [RARDeployment] Required license terms exist, view META-INF/r
                a.xml in .../deploy/jboss-local-jdbc.rar
                18:57:54,968 INFO [RARDeployment] Required license terms exist, view META-INF/r
                a.xml in .../deploy/jboss-xa-jdbc.rar
                18:57:55,031 INFO [RARDeployment] Required license terms exist, view META-INF/r
                a.xml in .../deploy/jms-ra.rar
                18:57:55,078 INFO [RARDeployment] Required license terms exist, view META-INF/r
                a.xml in .../deploy/mail-ra.rar
                18:57:55,140 INFO [RARDeployment] Required license terms exist, view META-INF/r
                a.xml in .../deploy/quartz-ra.rar
                18:57:55,140 INFO [QuartzResourceAdapter] start quartz!!!
                18:57:55,218 INFO [SimpleThreadPool] Job execution threads will use class loade
                r of thread: main
                18:57:55,265 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
                18:57:55,265 INFO [RAMJobStore] RAMJobStore initialized.
                18:57:55,265 INFO [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzSchedule
                r' initialized from default resource file in Quartz package: 'quartz.properties'

                18:57:55,281 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
                18:57:55,281 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUS
                TERED started.
                18:57:55,984 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jb
                oss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
                18:57:56,671 WARN [SecurityMetadataStore] WARNING! POTENTIAL SECURITY RISK. It
                has been detected that the MessageSucker component which sucks messages from one
                node to another has not had its password changed from the installation default.
                Please see the JBoss Messaging user guide for instructions on how to do this.
                18:57:56,687 INFO [ServerPeer] JBoss Messaging 1.4.0.SP3 server [0] started
                18:57:57,078 INFO [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has l
                easing enabled, lease period 10000 milliseconds
                18:57:57,078 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.Co
                nnectionFactory@1f49969 started
                18:57:57,078 WARN [ConnectionFactoryJNDIMapper] supportsFailover attribute is t
                rue on connection factory: jboss.messaging.connectionfactory:service=ClusteredCo
                nnectionFactory but post office is non clustered. So connection factory will *no
                t* support failover
                18:57:57,093 WARN [ConnectionFactoryJNDIMapper] supportsLoadBalancing attribute
                is true on connection factory: jboss.messaging.connectionfactory:service=Cluste
                redConnectionFactory but post office is non clustered. So connection factory wil
                l *not* support load balancing
                18:57:57,093 INFO [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has l
                easing enabled, lease period 10000 milliseconds
                18:57:57,093 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.Co
                nnectionFactory@fa97f started
                18:57:57,093 INFO [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has l
                easing enabled, lease period 10000 milliseconds
                18:57:57,093 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.Co
                nnectionFactory@862041 started
                18:57:57,125 INFO [QueueService] Queue[/queue/DLQ] started, fullSize=200000, pa
                geSize=2000, downCacheSize=2000
                18:57:57,125 INFO [QueueService] Queue[/queue/ExpiryQueue] started, fullSize=20
                0000, pageSize=2000, downCacheSize=2000
                18:57:57,125 INFO [TopicService] Topic[/topic/testTopic] started, fullSize=2000
                00, pageSize=2000, downCacheSize=2000
                18:57:57,125 INFO [TopicService] Topic[/topic/securedTopic] started, fullSize=2
                00000, pageSize=2000, downCacheSize=2000
                18:57:57,125 INFO [TopicService] Topic[/topic/testDurableTopic] started, fullSi
                ze=200000, pageSize=2000, downCacheSize=2000
                18:57:57,140 INFO [QueueService] Queue[/queue/testQueue] started, fullSize=2000
                00, pageSize=2000, downCacheSize=2000
                18:57:57,140 INFO [QueueService] Queue[/queue/A] started, fullSize=200000, page
                Size=2000, downCacheSize=2000
                18:57:57,140 INFO [QueueService] Queue[/queue/B] started, fullSize=200000, page
                Size=2000, downCacheSize=2000
                18:57:57,140 INFO [QueueService] Queue[/queue/C] started, fullSize=200000, page
                Size=2000, downCacheSize=2000
                18:57:57,156 INFO [QueueService] Queue[/queue/D] started, fullSize=200000, page
                Size=2000, downCacheSize=2000
                18:57:57,156 INFO [QueueService] Queue[/queue/ex] started, fullSize=200000, pag
                eSize=2000, downCacheSize=2000
                18:57:57,156 INFO [QueueService] Queue[/queue/PrivateDLQ] started, fullSize=200
                000, pageSize=2000, downCacheSize=2000
                18:57:57,156 INFO [QueueService] Queue[/queue/PrivateExpiryQueue] started, full
                Size=200000, pageSize=2000, downCacheSize=2000
                18:57:57,171 INFO [QueueService] Queue[/queue/QueueWithOwnDLQAndExpiryQueue] st
                arted, fullSize=200000, pageSize=2000, downCacheSize=2000
                18:57:57,171 INFO [TopicService] Topic[/topic/TopicWithOwnDLQAndExpiryQueue] st
                arted, fullSize=200000, pageSize=2000, downCacheSize=2000
                18:57:57,171 INFO [QueueService] Queue[/queue/QueueWithOwnRedeliveryDelay] star
                ted, fullSize=200000, pageSize=2000, downCacheSize=2000
                18:57:57,171 INFO [TopicService] Topic[/topic/TopicWithOwnRedeliveryDelay] star
                ted, fullSize=200000, pageSize=2000, downCacheSize=2000
                18:57:57,171 INFO [QueueService] Queue[/queue/testDistributedQueue] started, fu
                llSize=200000, pageSize=2000, downCacheSize=2000
                18:57:57,187 INFO [TopicService] Topic[/topic/testDistributedTopic] started, fu
                llSize=200000, pageSize=2000, downCacheSize=2000
                18:57:57,187 INFO [TopicService] Topic[/topic/myTopic] started, fullSize=200000
                , pageSize=2000, downCacheSize=2000
                18:57:57,375 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jb
                oss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
                18:57:57,406 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../dep
                loy/jmx-console.war/
                18:57:57,531 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

                --- MBeans waiting for other MBeans ---
                ObjectName: jboss.messaging.connectionfactory:service=MyConnectionFactory
                State: FAILED
                Reason: org.jboss.deployment.DeploymentException: Exception setting attribute
                javax.management.Attribute@1b94ea2 on mbean jboss.messaging.connectionfactory:se
                rvice=MyConnectionFactory; - nested throwable: (javax.management.AttributeNotFou
                ndException: Attribute 'ClientID' is not writable)
                I Depend On:
                jboss.messaging:service=ServerPeer
                jboss.messaging:service=Connector,transport=bisocket
                jboss.messaging:service=PostOffice

                --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
                ObjectName: jboss.messaging.connectionfactory:service=MyConnectionFactory
                State: FAILED
                Reason: org.jboss.deployment.DeploymentException: Exception setting attribute
                javax.management.Attribute@1b94ea2 on mbean jboss.messaging.connectionfactory:se
                rvice=MyConnectionFactory; - nested throwable: (javax.management.AttributeNotFou
                ndException: Attribute 'ClientID' is not writable)
                I Depend On:
                jboss.messaging:service=ServerPeer
                jboss.messaging:service=Connector,transport=bisocket
                jboss.messaging:service=PostOffice

                18:57:57,671 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8
                080
                18:57:57,703 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
                18:57:57,718 INFO [Server] JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBos
                s_4_2_2_GA date=200710221139)] Started in 19s:672ms

                ===========================

                i created file connection-factories-service.xml(content is same as in url ) and placed C:\myjboss-4.2.2\jboss-4.2.2.GA\server\messaging\deploy

                I have to create any entries in any other xml file (or) any thing i need to do for clinet id , etc... ?

                Please help me




                • 6. Re: Jboss Messaging How To
                  Andy Taylor Master

                  looks like the docs are out of date, the clientid is now set via a constructor.

                  I would start with a simple connection factory like:

                  <mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
                   name="jboss.messaging.connectionfactory:service=ConnectionFactory"
                   xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml">
                   <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
                   <depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=bisocket</depends>
                   <depends>jboss.messaging:service=PostOffice</depends>
                  
                   <attribute name="JNDIBindings">
                   <bindings>
                   <binding>/ConnectionFactory</binding>
                   <binding>/XAConnectionFactory</binding>
                   <binding>java:/ConnectionFactory</binding>
                   <binding>java:/XAConnectionFactory</binding>
                   </bindings>
                   </attribute>
                   </mbean>


                  here are all the configurable attributes

                  <mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
                   name="jboss.messaging.connectionfactory:service=MyExampleConnectionFactory"
                   xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml">
                  
                   <constructor>
                  
                   <!- - You can specify the default Client ID to use for connections created using this factory - ->
                  
                   <arg type="java.lang.String" value="MyClientID"/>
                  
                   </constructor>
                  
                   <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
                  
                   <!- - The transport to use - can be bisocket, sslbisocket or http - ->
                  
                   <depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=http</depends>
                  
                   <depends>jboss.messaging:service=PostOffice</depends>
                  
                   <!- - PrefetchSize determines the approximate maximum number of messages the client consumer will buffer locally - ->
                  
                   <attribute name="PrefetchSize">150</attribute>
                  
                   <!- - Paging params to be used for temporary queues - ->
                  
                   <attribute name="DefaultTempQueueFullSize">200000</attribute>
                  
                   <attribute name="DefaultTempQueuePageSizeSize">2000</attribute>
                  
                   <attribute name="DefaultTempQueueDownCacheSize">2000</attribute>
                  
                   <!- - The batch size to use when using the DUPS_OK_ACKNOWLEDGE acknowledgement mode - ->
                  
                   <attribute name="DupsOKBatchSize">5000</attribute>
                  
                   <!- - Does this connection factory support automatic failover? - ->
                  
                   <attribute name="SupportsFailover">false</attribute>
                  
                   <!- - Does this connection factory support automatic client side load balancing? - ->
                  
                   <attribute name="SupportsLoadBalancing">false</attribute>
                  
                   <!- - The class name of the factory used to create the load balancing policy to use on the client side - ->
                  
                   <attribute name="LoadBalancingFactory">org.jboss.jms.client.plugin.RoundRobinLoadBalancingFactory</attribute>
                  
                   <!- - Whether we should be strict TCK compliant, i.e. how we deal with foreign messages, defaults to false- ->
                  
                   <attribute name="StrictTck">true</attribute>
                  
                   <!- - Disable JBoss Remoting Connector sanity checks - There is rarely a good reason to set this to true - ->
                  
                   <attribute name="DisableRemotingChecks">false</attribute>
                  
                   <!- - The connection factory will be bound in the following places in JNDI - ->
                  
                   <attribute name="JNDIBindings">
                  
                   <bindings>
                  
                   <binding>/acme/MyExampleConnectionFactory</binding>
                  
                   <binding>/acme/MyExampleConnectionFactoryDupe</binding>
                  
                   <binding>java:/xyz/CF1</binding>
                  
                   <binding>java:/connectionfactories/acme/connection_factory</binding>
                  
                   </bindings>
                  
                   </attribute>
                  
                   </mbean>


                  • 7. Re: Jboss Messaging How To
                    analyst@8 java_analyst Newbie

                    As u suggested I created "my-factories-service.xml" and kept under
                    "C:\myjboss-4.2.2\jboss-4.2.2.GA\server\messaging\deploy\"


                    Content of "my-factories-service.xml"
                    ---------

                    <mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
                     name="jboss.messaging.connectionfactory:service=MyExampleConnectionFactory"
                     xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml">
                     <constructor>
                     <arg type="java.lang.String" value="MyClientID"/>
                     </constructor>
                     <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
                     <depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=http</depends>
                     <depends>jboss.messaging:service=PostOffice</depends>
                     <attribute name="PrefetchSize">150</attribute>
                     <attribute name="DefaultTempQueueFullSize">200000</attribute>
                     <attribute name="DefaultTempQueuePageSize">2000</attribute>
                     <attribute name="DefaultTempQueueDownCacheSize">2000</attribute>
                     <attribute name="DupsOKBatchSize">5000</attribute>
                     <attribute name="SupportsFailover">false</attribute>
                     <attribute name="SupportsLoadBalancing">false</attribute>
                     <attribute name="LoadBalancingFactory">org.jboss.jms.client.plugin.RoundRobinLoadBalancingFactory</attribute> <attribute name="StrictTck">true</attribute>
                     <attribute name="DisableRemotingChecks">false</attribute>
                     <attribute name="JNDIBindings">
                     <bindings>
                     <binding>/acme/MyExampleConnectionFactory</binding>
                     <binding>/acme/MyExampleConnectionFactoryDupe</binding>
                     <binding>java:/xyz/CF1</binding>
                     <binding>java:/connectionfactories/acme/connection_factory</binding>
                     </bindings>
                     </attribute>
                     </mbean>

                    -----------





                    I am using eclipse IDE, I took jars as fallows

                    Jboss-j2ee.jar [JbossDIR] \server\messaging\lib
                    jpnserver.jar [JbossDIR] \server\messaging\lib
                    jbossmq.jar [JbossDIR]\server\default\lib\
                    jboss-common.jar [JbossDIR]\lib\
                    concurrent.jar [JbossDIR]\lib\




                    Source code is
                    =======================
                    import java.util.Properties;
                    
                    import javax.jms.JMSException;
                    import javax.jms.TextMessage;
                    import javax.jms.Topic;
                    import javax.jms.TopicConnection;
                    import javax.jms.TopicConnectionFactory;
                    import javax.jms.TopicPublisher;
                    import javax.jms.TopicSession;
                    import javax.naming.Context;
                    import javax.naming.InitialContext;
                    import javax.naming.NamingException;
                    
                    
                    
                    public class Sender {
                    
                    String url_;
                    String name_;
                    TopicConnection conn = null;
                    TopicSession session = null;
                    Topic topic = null;
                    
                    public Sender(String url, String name) throws JMSException, NamingException {
                    
                    url_ = url;
                    name_ = name;
                    
                    this.initializeSender();
                    
                    }
                    
                    private void initializeSender() throws JMSException, NamingException {
                    
                    
                    Properties props = new Properties();
                    props.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
                    props.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming");
                    props.setProperty("java.naming.provider.url", url_);
                    
                    Context context = new InitialContext(props);
                    
                    TopicConnectionFactory tcf = (TopicConnectionFactory) context.lookup("ConnectionFactory");
                    conn = tcf.createTopicConnection();
                    topic = (Topic) context.lookup(name_);
                    
                    session = conn.createTopicSession(false, TopicSession.AUTO_ACKNOWLEDGE);
                    conn.start();
                    
                    }
                    
                    public void send(String text) throws JMSException , NamingException {
                    
                    // Send a text msg
                    TopicPublisher send = session.createPublisher(topic);
                    TextMessage tm = session.createTextMessage(text);
                    send.publish(tm);
                    send.close();
                    }
                    
                    
                    public void disconnect() throws JMSException {
                    if(conn != null) {
                    conn.stop();
                    }
                    
                    if(session != null) {
                    session.close();
                    }
                    
                    if(conn != null) {
                    conn.close();
                    }
                    }
                    
                    public String getTopicName() {
                    return name_;
                    }
                    
                    public String getTopicURL() {
                    return url_;
                    }
                    
                    public static void main(String args[]) throws Exception {
                    
                    System.out.println("Starting JMS Example Sender");
                    
                    Sender sender = new Sender("localhost:1099", "topic/testTopic");
                    
                    System.out.println("Sending list of Adam Sandler Movies");
                    
                    sender.send("deepak");
                    sender.send("mehir");
                    sender.send("ravi");
                    sender.send("test");
                    sender.send("Mr.Deeds 2002");
                    sender.send("Eight Crazy Nights 2002");
                    sender.send("Anger Management 2003");
                    
                    sender.disconnect();
                    
                    System.out.println("JMS Example Sender Complete - list sent");
                    
                    }
                    
                    }

                    -------



                    After running server as

                    C:\myjboss-4.2.2\jboss-4.2.2.GA\bin>run -c messaging

                    i am getting fallowing msg in dos window
                    ---------------------
                    .
                    .
                    .
                    
                    15:13:51,890 INFO [TopicService] Topic[/topic/TopicWithOwnDLQAndExpiryQueue] st
                    arted, fullSize=200000, pageSize=2000, downCacheSize=2000
                    15:13:51,890 INFO [QueueService] Queue[/queue/QueueWithOwnRedeliveryDelay] star
                    ted, fullSize=200000, pageSize=2000, downCacheSize=2000
                    15:13:51,890 INFO [TopicService] Topic[/topic/TopicWithOwnRedeliveryDelay] star
                    ted, fullSize=200000, pageSize=2000, downCacheSize=2000
                    15:13:51,890 INFO [QueueService] Queue[/queue/testDistributedQueue] started, fu
                    llSize=200000, pageSize=2000, downCacheSize=2000
                    15:13:51,890 INFO [TopicService] Topic[/topic/testDistributedTopic] started, fu
                    llSize=200000, pageSize=2000, downCacheSize=2000
                    15:13:51,890 INFO [TopicService] Topic[/topic/myTopic] started, fullSize=200000
                    , pageSize=2000, downCacheSize=2000
                    15:13:52,062 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jb
                    oss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
                    15:13:52,093 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../dep
                    loy/jmx-console.war/
                    15:13:52,234 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
                    
                    --- MBeans waiting for other MBeans ---
                    ObjectName: jboss.messaging.connectionfactory:service=MyExampleConnectionFactory
                    
                     State: CONFIGURED
                     I Depend On:
                     jboss.messaging:service=ServerPeer
                     jboss.messaging:service=Connector,transport=http
                     jboss.messaging:service=PostOffice
                    
                    --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
                    ObjectName: jboss.messaging:service=Connector,transport=http
                     State: NOTYETINSTALLED
                     Depends On Me:
                     jboss.messaging.connectionfactory:service=MyExampleConnectionFactory
                    
                    
                    15:13:52,359 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8
                    080
                    15:13:52,390 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
                    15:13:52,390 INFO [Server] JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBos
                    s_4_2_2_GA date=200710221139)] Started in 17s:937ms
                    ------------------------------------


                    and when I run Sender.java, I am getting

                    Starting JMS Example Sender
                    Exception in thread "main" javax.naming.NameNotFoundException: MyExampleConnectionFactory not bound
                    
                    at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
                    at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)



                    This above example i am able to execute correctly using
                    default connection factory i.e "ConnectionFactory"
                    and using testTopic as destination.
                    *** When i start server by clicking "C:\myjboss-4.2.2\jboss-4.2.2.GA\bin\run.bat"



                    Please help me in this, what will be the mistake here ?


                    ---------
                    -Sudheer

                    • 8. Re: Jboss Messaging How To
                      Andy Taylor Master

                      are you using http because you have the following line in your connection factory deployment:

                      <depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=http</depends>

                      this should probably be
                      <depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=bisocket</depends>


                      • 9. Re: Jboss Messaging How To
                        analyst@8 java_analyst Newbie

                         

                        the clientid is now set via a constructor.


                        I did not changed any thing for client id (in you'r example you given "MyClientID") , is it ok ?

                        • 10. Re: Jboss Messaging How To
                          Andy Taylor Master

                          its was just an example to show you the available attributes that can be set. You obviously need to change them accordingly. An explanation of the attributes is in the manual.

                          • 11. Re: Jboss Messaging How To
                            analyst@8 java_analyst Newbie

                            Thanks for your quick reply

                            I am able to see,

                            ------

                            16:00:03,390 INFO [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has l
                            easing enabled, lease period 10000 milliseconds
                            16:00:03,390 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.Co
                            nnectionFactory@d6a0e0 started
                            -------

                            So I guess I successfully created connection factory


                            But I am getting fallowing error, my above jar entries are ok ? I need to take any more jar files ????

                            Fallowing error I am getting when I run Sender.java
                            ====================

                            Starting JMS Example Sender
                            Exception in thread "main" javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: org.jboss.jms.client.JBossConnectionFactory (no security manager: RMI class loader disabled)]
                             at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:786)
                             at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
                             at javax.naming.InitialContext.lookup(Unknown Source)
                             at Sender.initializeSender(Sender.java:43)
                             at Sender.<init>(Sender.java:29)
                             at Sender.main(Sender.java:88)
                            Caused by: java.lang.ClassNotFoundException: org.jboss.jms.client.JBossConnectionFactory (no security manager: RMI class loader disabled)
                             at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
                             at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
                             at java.rmi.server.RMIClassLoader$2.loadClass(Unknown Source)
                             at java.rmi.server.RMIClassLoader.loadClass(Unknown Source)
                             at sun.rmi.server.MarshalInputStream.resolveClass(Unknown Source)
                             at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
                             at java.io.ObjectInputStream.readClassDesc(Unknown Source)
                             at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
                             at java.io.ObjectInputStream.readObject0(Unknown Source)
                             at java.io.ObjectInputStream.readObject(Unknown Source)
                             at java.rmi.MarshalledObject.get(Unknown Source)
                             at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72)
                             at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:710)
                             ... 5 more
                            

                            =====================


                            what will be the issue here ?

                            ---------
                            -Sudheer


                            • 12. Re: Jboss Messaging How To
                              Andy Taylor Master

                              make sure the messaging client jar is in you're classpath

                              • 13. Re: Jboss Messaging How To
                                analyst@8 java_analyst Newbie

                                Thanks, I am able to execute the above example.

                                now my .classpath file entries in eclipse are

                                <?xml version="1.0" encoding="UTF-8"?>
                                <classpath>
                                 <classpathentry kind="src" path=""/>
                                 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
                                 <classpathentry kind="lib" path="C:/myjboss-4.2.2/jboss-4.2.2.GA/server/messaging/lib/jboss-j2ee.jar"/>
                                 <classpathentry kind="lib" path="C:/myjboss-4.2.2/jboss-4.2.2.GA/server/messaging/lib/jboss-messaging.jar"/>
                                 <classpathentry kind="lib" path="C:/myjboss-4.2.2/jboss-4.2.2.GA/server/messaging/lib/jboss-remoting.jar"/>
                                 <classpathentry kind="lib" path="C:/myjboss-4.2.2/jboss-4.2.2.GA/server/messaging/jboss-messaging-client.jar"/>
                                 <classpathentry kind="output" path=""/>
                                </classpath>


                                -----------
                                -Sudheer

                                • 14. Re: Jboss Messaging How To
                                  analyst@8 java_analyst Newbie

                                  Please tell me how to create durable topic in jboss messaging ?

                                  when i changed method

                                  before
                                  
                                  TopicSubscriber recv = session.createSubscriber(topic);
                                  
                                  after
                                  
                                  TopicSubscriber recv = session.createDurableSubscriber(topic,"My Durable Exp....");


                                  even after stop sending my sender.java program my lister is able to listen the messages ? i gusss this is unlike JBOSSMQ.

                                  Listener.java code
                                  ============

                                  import java.util.Properties;
                                  
                                  import javax.jms.JMSException;
                                  import javax.jms.Message;
                                  import javax.jms.MessageListener;
                                  import javax.jms.TextMessage;
                                  import javax.jms.Topic;
                                  import javax.jms.TopicConnection;
                                  import javax.jms.TopicConnectionFactory;
                                  import javax.jms.TopicSession;
                                  import javax.jms.TopicSubscriber;
                                  import javax.naming.Context;
                                  import javax.naming.InitialContext;
                                  import javax.naming.NamingException;
                                  
                                  public class Listener implements MessageListener {
                                  
                                   String url_;
                                   String name_;
                                   TopicConnection conn = null;
                                   TopicSession session = null;
                                   Topic topic = null;
                                  
                                   public Listener(String url, String name) {
                                   super();
                                  
                                   url_ = url;
                                   name_ = name;
                                  
                                   try {
                                   this.initializeListener();
                                   } catch (Exception e) {
                                   System.out.println("Error creating listener: " + e);
                                   e.printStackTrace();
                                   }
                                  
                                   }
                                  
                                   public void onMessage(Message msg) {
                                  
                                   TextMessage tm = (TextMessage) msg;
                                  
                                   try {
                                   System.out.println("Incoming message: " + tm.getText());
                                   } catch (Exception e) {
                                   e.printStackTrace();
                                   }
                                   }
                                  
                                   private void initializeListener() throws JMSException, NamingException {
                                  
                                   Properties props = new Properties();
                                   props.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
                                   props.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming");
                                   props.setProperty("java.naming.provider.url", url_);
                                  
                                   Context context = new InitialContext(props);
                                   System.out.println("performing lookup...");
                                  
                                   Object tmp = context.lookup("MyExampleConnectionFactory");
                                   System.out.println("lookup completed, making topic");
                                  
                                   TopicConnectionFactory tcf = (TopicConnectionFactory) tmp;
                                   conn = tcf.createTopicConnection();
                                   topic = (Topic) context.lookup(name_);
                                  
                                   session = conn.createTopicSession(false, TopicSession.AUTO_ACKNOWLEDGE);
                                   conn.start();
                                  
                                   //TopicSubscriber recv = session.createSubscriber(topic);
                                  
                                   TopicSubscriber recv = session.createDurableSubscriber(topic,"My Durable Exp....");
                                   recv.setMessageListener(this);
                                   }
                                  
                                  
                                   public void disconnect() throws JMSException {
                                   if(conn != null) {
                                   conn.stop();
                                   }
                                  
                                   if(session != null) {
                                   session.close();
                                   }
                                  
                                   if(conn != null) {
                                   conn.close();
                                   }
                                   }
                                  
                                   public static void main(String args[]) {
                                  
                                   System.out.println("Starting JMS Example Listener");
                                   System.out.println("Program will be active for 1 minute.");
                                  
                                   //change these values to your situtation:
                                   Listener listener = new Listener("localhost:1099", "topic/myTopic3");
                                  
                                  
                                   //leave it open for 2 minutes:
                                   try {
                                   Thread.sleep(5000);
                                   } catch(Exception e) {
                                   System.out.println("Error sleeping: " + e);
                                   e.printStackTrace();
                                   }
                                  
                                   try {
                                   listener.disconnect();
                                   } catch(Exception e) {
                                   System.out.println("Error terminating listener JMS objects: " + e);
                                   e.printStackTrace();
                                   }
                                  
                                   System.out.println("Done listening");
                                   }
                                  
                                  }



                                  I guess to create "durable topic" we need to create user, role for durable.

                                  i referred the docs but i did't found prper information .

                                  please help me

                                  -----------
                                  -Sudheer

                                  1 2 Previous Next