[jBPM Users] - Re: Entity variable
by juanignaciosl
Neat. As I read at the documentation it's likely that I should be able to save as an Hibernate entity, but Serializable is good enough for the time being.
Nevertheless, when I make it Serializable it gets stored but it can't be loaded, taskService.getVariables throws the following exception:
| org.jbpm.api.JbpmException: couldn't deserialize object
| (...)
| org.jbpm.api.JbpmException: couldn't deserialize object
| Caused by: java.lang.ClassNotFoundException
|
I'm trying to deploy the .class file inside a .bar or .jar together with the jpdl and deploying it with createDeployment() .addResourcesFromZipInputStream(zip), but the class won't get deployed.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269744#4269744
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269744
14 years, 11 months
[JBoss Messaging Users] - standalone consumer for clustered queue did not get all mess
by arminhaaf
we are currently migrating from JBoss AS 4.2.2 with MQ to a clustered JBoss AS 5.1 with messaging
We have some standalone JMS consumers to connect external systems.
The problem is that a standalone JMS consumer connects to only one node and so gets the messages from this node only.
The queue is Clustered:
<mbean code="org.jboss.jms.server.destination.QueueService"
| name="jboss.messaging.destination:service=Queue,name=TestClusteredQueue"
| xmbean-dd="xmdesc/Queue-xmbean.xml">
| <depends>jboss.messaging:service=PostOffice</depends>
| <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
| <attribute name="Clustered">true</attribute>
| </mbean>
|
A sample external consumer
| public static void main(String[] args) throws Exception {
| System.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
| System.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming");
| System.setProperty("java.naming.provider.url", "node1:1100,node2:1100");
|
|
| final InitialContext tInitialContext = new InitialContext();
| final ConnectionFactory tConnFactory = (ConnectionFactory) tInitialContext.lookup("ClusteredConnectionFactory");
| final Queue tLisaToMfcQueue = (Queue) tInitialContext.lookup("/queue/TestClusteredQueue");
|
| javax.jms.Connection jmsConnection = tConnFactory.createConnection();
|
| Session tSession = jmsConnection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
|
| System.out.println("from browser");
| Enumeration tMessages = tSession.createBrowser(tLisaToMfcQueue).getEnumeration();
| while (tMessages.hasMoreElements()) {
| Message tMessage = (Message) tMessages.nextElement();
| System.out.println(tMessage);
| }
|
| System.out.println("from consumer");
|
| final MessageConsumer tConsumer = tSession.createConsumer(tLisaToMfcQueue);
|
| tConsumer.setMessageListener(new MessageListener() {
| public void onMessage(final Message pMessage) {
| System.out.println(pMessage);
| try {
| pMessage.acknowledge();
| } catch (JMSException e) {
| e.printStackTrace();
| }
| }
| });
|
| jmsConnection.setExceptionListener(new ExceptionListener() {
|
| public void onException(final JMSException e) {
| System.out.println("got exception");
| }
| });
|
| jmsConnection.start();
|
| }
|
So how can i get a standalone consumer getting all messages from the queue
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269737#4269737
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269737
14 years, 11 months
[Spring Integration] - Re: JBoss-Spring-ActiveMQ integration issue
by katoch
--------------------------------------------------------------------------------
I am using Spring2.5.5, ActiveMQ5.3, JBoss 5.1.
I am using 10 concurrent cousumers in DefaultMessageListenerContainer
<bean id="listenerContainer" class="org.springframework.jms.listener.DefaultMes sageListenerContainer">
| <property name="connectionFactory" ref="MyCF" />
| <property name="destination" ref="MyPostQueue" />
| <property name="messageListener" ref="MyPojo" />
| <property name="sessionTransacted" value="true"/>
| <property name="concurrentConsumers" value="10"/>
| <property name="cacheLevelName" value="CACHE_CONSUMER" />
| </bean>
I have tried with "cacheLevelName" property with None,Session,Connection
The problem is that only one consumer gets invoked. I have tested it.
Can somebody help me? I want
1. if 10 messages (huge) come to my queue, the all the 10 consumers get invoked and complete the process
2. how can I increase this number as my number of messages consumers increase ,since in ActiveMQ console I am just seeing fixed number of consumers. i.e. how to pool ?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269720#4269720
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269720
14 years, 11 months