[Design of JBoss ESB] - Not able to create gateway/listerner for Topics on ESB
by gvnanil
My .esb deployment fails after it creates required topics by throwing the following exception:
15:48:12,718 WARN [AbstractManagedLifecycle] Unexpected exception caught while initialisation
java.lang.ClassCastException: org.jboss.mq.SpyTopic
at org.jboss.soa.esb.listeners.gateway.JmsGatewayListener.prepareMessageReceiver(JmsGatewayListener.java:366)
at org.jboss.soa.esb.listeners.gateway.JmsGatewayListener.doInitialise(JmsGatewayListener.java:102)
at org.jboss.soa.esb.listeners.lifecycle.AbstractManagedLifecycle.initialise(AbstractManagedLifecycle.java:133)
at org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController.initialiseInstances(ManagedLifecycleControlle
r.java:160)
at org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController.start(ManagedLifecycleController.java:79)
at org.jboss.soa.esb.listeners.config.JBoss4ESBDeployment.startService(JBoss4ESBDeployment.java:79)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.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(ServiceController.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(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.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 $Proxy55.start(Unknown Source)
at org.jboss.soa.esb.listeners.config.JBoss4ESBDeployer.start(JBoss4ESBDeployer.java:270)
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 sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.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(URLDeploymentScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263
)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
15:48:12,765 WARN [CourierFactory] Calling cleanup on existing couriers for identity LifecycleIdentity:8
15:48:12,765 WARN [ServiceController] Problem starting service jboss.esb:deployment=sniffer.esb
org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException: java.lang.ClassCastException: org.jboss.mq.SpyTopic
at org.jboss.soa.esb.listeners.lifecycle.AbstractManagedLifecycle.initialise(AbstractManagedLifecycle.java:145)
at org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController.initialiseInstances(ManagedLifecycleControlle
r.java:160)
at org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController.start(ManagedLifecycleController.java:79)
at org.jboss.soa.esb.listeners.config.JBoss4ESBDeployment.startService(JBoss4ESBDeployment.java:79)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.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(ServiceController.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(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.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 $Proxy55.start(Unknown Source)
at org.jboss.soa.esb.listeners.config.JBoss4ESBDeployer.start(JBoss4ESBDeployer.java:270)
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 sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.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(URLDeploymentScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263
)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
Caused by: java.lang.ClassCastException: org.jboss.mq.SpyTopic
at org.jboss.soa.esb.listeners.gateway.JmsGatewayListener.prepareMessageReceiver(JmsGatewayListener.java:366)
at org.jboss.soa.esb.listeners.gateway.JmsGatewayListener.doInitialise(JmsGatewayListener.java:102)
at org.jboss.soa.esb.listeners.lifecycle.AbstractManagedLifecycle.initialise(AbstractManagedLifecycle.java:133)
... 48 more
15:48:12,812 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
--- MBeans waiting for other MBeans ---
ObjectName: jboss.esb:deployment=sniffer.esb
State: FAILED
Reason: org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException: java.lang.ClassCastException: org.jboss.mq.Spy
Topic
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.esb:deployment=sniffer.esb
State: FAILED
Reason: org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException: java.lang.ClassCastException: org.jboss.mq.SpyTopic
HELP ME.... URGENT
my ultimate goal is to create a static router for topics
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102454#4102454
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4102454
18 years, 5 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: JMX Operations to expose to clients in JBM 2.0
by ataylor
Actually I've had a rethink. Moving all the methods form topic/queuembean into ServerPeer makes it a bit monolithic. I think creating and exposing a new interface say 'JmsServerStatistics' for these methods would be a bit more elegant.
something like
| public interface JmsServerStatistics
| {
|
|
| int getMessageCountForQueue(String queue) throws Exception;
|
| int getDeliveringCountForQueue(String queue) throws Exception;
|
| int getScheduledMessageCountForQueue(String queue) throws Exception;
|
| MessageCounter getMessageCounterForQueue(String queue);
|
| MessageStatistics getMessageStatisticsForQueue(String queue) throws Exception;
|
| int getConsumerCountForQueue(String queue) throws Exception;
|
| void resetMessageCounterForQueue(String queue);
|
| void resetMessageCounterHistoryForQueue(String queue);
|
| List listAllMessagesForQueue(String queue) throws Exception;
|
| List listAllMessagesForQueue(String queue,String selector) throws Exception;
|
| List listDurableMessagesForQueue(String queue) throws Exception;
|
| List listDurableMessagesForQueue(String queue,String selector) throws Exception;
|
| List listNonDurableMessagesForQueue(String queue) throws Exception;
|
| List listNonDurableMessagesForQueue(String queue,String selector) throws Exception;
|
| String listMessageCounterAsHTMLForQueue(String queue);
|
| String listMessageCounterHistoryAsHTMLForQueue(String queue);
|
| //topic
|
| int getAllMessageCountForTopic() throws Exception;
|
| int getDurableMessageCountForTopic() throws Exception;
|
| int getNonDurableMessageCountForTopic() throws Exception;
|
| int getAllSubscriptionsCountForTopic() throws Exception;
|
| int getDurableSubscriptionsCountForTopic() throws Exception;
|
| int getNonDurableSubscriptionsCountForTopic() throws Exception;
|
| // JMX operations
|
| void removeAllMessagesForTopic(String topic) throws Exception;
|
| List listAllSubscriptionsForTopic(String topic) throws Exception;
|
| List listDurableSubscriptionsForTopic(String topic) throws Exception;
|
| List listNonDurableSubscriptionsForTopic(String topic) throws Exception;
|
| String listAllSubscriptionsAsHTMLForTopic(String topic) throws Exception;
|
| String listDurableSubscriptionsAsHTMLForTopic(String topic) throws Exception;
|
| String listNonDurableSubscriptionsAsHTMLForTopic(String topic) throws Exception;
|
| List listAllMessagesForTopic(String topic,String subscriptionId) throws Exception;
|
| List listAllMessagesForTopic(String topic,String subscriptionId, String selector) throws Exception;
|
| List listDurableMessagesForTopic(String topic,String subscriptionId) throws Exception;
|
| List listDurableMessagesForTopic(String topic,String subscriptionId, String selector) throws Exception;
|
| List listNonDurableMessagesForTopic(String topic,String subscriptionId) throws Exception;
|
| List listNonDurableMessagesForTopic(String topic,String subscriptionId, String selector) throws Exception;
|
| List getMessageCountersForTopic(String topic) throws Exception;
| }
|
Also with very little work we could expose these to the user via an abstraction so they dont have to worry about JMX etc.
something like
|
| public void connect(InitialContext initialContext)
| {
| connect(initialContext, null, null);
| }
|
| public void connect(InitialContext initialContext, String user, String password)
| {
| this.initialContext = initialContext;
| this.user = user;
| this.password = password;
| }
|
| public JmsServer getServer()
| {
| return (JmsServer) Proxy.newProxyInstance(JmsServer.class.getClassLoader(),
| new Class[] { JmsServer.class },
| new JmsServerInvocationHandler(initialContext));
|
| }
|
| public JmsServerStatistics getServerStatistics()
| {
| return (JmsServerStatistics) Proxy.newProxyInstance(JmsServerStatistics.class.getClassLoader(),
| new Class[] { JmsServerStatistics.class },
| new JmsServerStatisticsInvocationHandler());
| }
|
| public static void main(String[] args) throws Exception
| {
| Admin admin = new Admin();
| Hashtable env = new Hashtable();
| env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
| env.put("java.naming.provider.url", "jnp://localhost:1099");
| env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
|
| InitialContext ic = new InitialContext(env);
| admin.connect(ic);
| JmsServer server = admin.getServer();
| server.getJMSMajorVersion();
| }
| }
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102439#4102439
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4102439
18 years, 5 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: Initial cut of MC integration work
by ataylor
anonymous wrote : 1) The Bridge MBean is still there
I know, its on my list. It shouldnt be to much work if we deploy it as its own definition and deployment.
anonymous wrote : 2) Are DestinationMBean/TopicMBean/QueueMBean used any more? (If not we should remove them)
Nope, they aren't needed. I was keeping them there for now for reference as i haven't implemented there JMX functionality yet.
anonymous wrote : 3) Do we really need ManagedDestination, ManagedQueue and ManagedTopic?
| ManagedTopic is only meaningful to JMS (the new core eventually won't know about topics - since this is a JMS concept).
I dont see any reason why we cant remove these. it'll be just a case of moving all the properties into Queue/Topic and new base class to replace ManagedDestination.
anonymous wrote :
| 4) Configuration:
| So far we have separate config files for
| a) serverpeer (also contains old post office config)
| b) connection factories
| c) destinations
| d) persistence manager?
| can we/should we combine these further?
|
I can move them all into one file if needed its not a biggy. As far as persistence manager goes, this is currently still only in the bean definition file. I wasn't sure how this would change with the new persistence model so i haven't done anything with it yet. Currently theres a definition for each database we support (and same for the post office), I was hoping we might move away from this if possible but i'm not sure yet how its all going to hang together, ideas?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102427#4102427
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4102427
18 years, 5 months