[JBoss Messaging] - Re: Message redistribution
by timfox
"martin.wickus" wrote : Precondition: JBM cluster consisting of two nodes posting messages to a clustered queue. The JBM cluster is formed across JBoss nodes.
|
| Step1. Start up a plain java process (configured with JBM client libraries and patched JBoss Remoting lib) which looks up a ClusteredConnectionFactory from the JBoss/JBM partition via JNDI, creates a connection then registers a MessageListener to receive messages. Let's say the resulting connection is attached to node 1 of the JBM cluster.
|
| Step2. Send a message from node 1 of the JBM cluster to the clustered queue. The message is immediately received by the message listener.
|
| Step3. Send a message from node 2 of the JBM cluster. The message is not received by the message listener.
|
That should certainly work (it's the simplest possible redistribution scenario). Things to check:
1) You have deployed your queue as clustered
2) ClusterPullConnectionFactory is specified in the server peer config and is deployed
3) Something is wrong in your JGroups config.
Most likely is 3)
Take a look at the JGroups site for some tips on how to work out whether the nodes are seeing each other etc.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130048#4130048
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130048
18 years, 2 months
[JBoss jBPM] - jbpm 3.2.2
by manjula_athani
Hi all,
I'm using jboss jbpm 3.2.2. using graphical tool created my application in which I want embed an action on a particular event/ transition. when that action class is invoked I get this exception :
Error signalling token: An exception of type "org.jbpm.graph.def.DelegationException" was thrown.
-------processdefinition.xml-----------
<process-definition xmlns="" name="Hello2">
<start-state name="start">
</start-state>
<task-node name="process">
</task-node>
<task-node name="show sum">
</task-node>
<end-state name="end"></end-state>
</process-definition>
--------------------------------------------------------
MyAction is available in the same package as that of processDefinition.xml
MyAction.java
_______________
import org.jbpm.context.exe.ContextInstance;
import org.jbpm.graph.def.ActionHandler;
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.graph.exe.ExecutionContext;
import org.jbpm.graph.exe.ProcessInstance;
public class MyAction implements ActionHandler {
private static final long serialVersionUID = 1L;
public void execute(ExecutionContext executionContext) throws Exception {
// TODO Auto-generated method stub
ProcessDefinition processDefinition = ProcessDefinition.parseXmlString("processdefinition.xml");
ProcessInstance processInstance = new ProcessInstance(processDefinition);
ContextInstance contextInstance = processInstance.getContextInstance();
String getnum1 = (String)contextInstance.getVariable("num1");
String getnum2 = (String) contextInstance.getVariable("num2");
String sum = getnum1 + getnum2;
contextInstance.setVariable("sum",sum);
}
}
________________
kindly help.
Manjula
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130047#4130047
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130047
18 years, 2 months
[JBoss jBPM] - jbpm 3.2.2
by manjula_athani
Hi all,
I'm using jboss jbpm 3.2.2. using graphical tool created my application in which I want embed an action on a particular event/ transition. when that action class is invoked I get this exception :
Error signalling token: An exception of type "org.jbpm.graph.def.DelegationException" was thrown.
-------processdefinition.xml-----------
<process-definition xmlns="" name="Hello2">
<start-state name="start">
</start-state>
<task-node name="process">
</task-node>
<task-node name="show sum">
</task-node>
<end-state name="end"></end-state>
</process-definition>
--------------------------------------------------------
MyAction is available in the same package as that of processDefinition.xml
MyAction.java
_______________
import org.jbpm.context.exe.ContextInstance;
import org.jbpm.graph.def.ActionHandler;
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.graph.exe.ExecutionContext;
import org.jbpm.graph.exe.ProcessInstance;
public class MyAction implements ActionHandler {
private static final long serialVersionUID = 1L;
public void execute(ExecutionContext executionContext) throws Exception {
// TODO Auto-generated method stub
ProcessDefinition processDefinition = ProcessDefinition.parseXmlString("processdefinition.xml");
ProcessInstance processInstance = new ProcessInstance(processDefinition);
ContextInstance contextInstance = processInstance.getContextInstance();
String getnum1 = (String)contextInstance.getVariable("num1");
String getnum2 = (String) contextInstance.getVariable("num2");
String sum = getnum1 + getnum2;
contextInstance.setVariable("sum",sum);
}
}
________________
kindly help.
Manjula
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130045#4130045
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130045
18 years, 2 months
[JBoss Messaging] - Re: Message redistribution
by martin.wickus
Precondition: JBM cluster consisting of two nodes posting messages to a clustered queue. The JBM cluster is formed across JBoss nodes.
Step1. Start up a plain java process (configured with JBM client libraries and patched JBoss Remoting lib) which looks up a ClusteredConnectionFactory from the JBoss/JBM partition via JNDI, creates a connection then registers a MessageListener to receive messages. Let's say the resulting connection is attached to node 1 of the JBM cluster.
Step2. Send a message from node 1 of the JBM cluster to the clustered queue. The message is immediately received by the message listener.
Step3. Send a message from node 2 of the JBM cluster. The message is not received by the message listener.
Step4. Kill the external java process hosting the MessageListener.
Step5. Start the external java process hosting the MessageListener. This is a repeat of Step1, but this time my connection is to node 2. Backlog of messages sent from node 2 are immediately received.
Step6. Send a message from node 2 of the JBM cluster to the clustered queue. The message is immediately received by the message listener.
Step7. Send a message from node 1 of the JBM cluster. The message is not received by the message listener.
Red Hat JBoss support has let me know that a consumer on node 1 is able to consume messages on the same distributed queue hosted on node 2. However, the messages will not be "sucked" over until the local queue is empty. So, for example, if Consumer A is connected to node 1, messages in the distributed queue on node 2 will not be moved to node 1 until Consumer A has exhausted all messages in the queue on node 1. That is, messages queued to node 1 would have precedence over messages queued to node 2 for Consumer A.
Two things from this then:
1. I am not seeing the behavior described by Red Hat (messages seem to stay stuck in their original node).
2. The behavior described by Red Hat would mean that if any activity is generated by node 1 (eg. even just 1 message on the distributed queue for node 1) then none of the messages on node 2 will get delivered since they won't be sucked over to node 1.
I'd prefer being able to look at the distributed queue as a single virtual queue from which my consumer can take messages without having to worry from where a message originated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130044#4130044
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130044
18 years, 2 months
[Persistence, JBoss/CMP, Hibernate, Database] - 400 Queries generated for one page !!
by yj4jboss
Hi All,
We have a relatively simple web application running on
- jboss seam 2.0.0GA,
- jboss-4.2.2.GA
- Hibernate (the version that comes with Seam 2.0.0.GA)
- Rich faces 3.1.3.GA
- Mysql
We always had complaints about the application being slow and have been trying to sort out the problem. As such, we have tried to verify the number of queries generated for one of the pages by using logs for mysql using Mysql Administrator.
And on the first page we tested, around 400 queries were generated for this page only.
Below is our persistence.xml file
|
| <?xml version="1.0" encoding="UTF-8" ?>
| - <!-- Persistence deployment descriptor for dev profile
| -->
| - <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">
| - <persistence-unit name="aewa">
| <provider>org.hibernate.ejb.HibernatePersistence</provider>
| <jta-data-source>java:/SeamAppDS</jta-data-source>
| - <properties>
| <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect" />
| - <!-- <property name="hibernate.hbm2ddl.auto" value="validate"/>
| <property name="hibernate.show_sql" value="false"/>
| <property name="hibernate.format_sql" value="true"/>
|
| -->
| <property name="jboss.entity.manager.factory.jndi.name" value="java:/aewaEntityManagerFactory" />
| - <!-- aewa modifications
| -->
| <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup" />
| <property name="hibernate.transaction.flush_before_completion" value="true" />
| <property name="hibernate.cache.use_query_cache" value="true" />
| <property name="hibernate.jdbc.wrap_result_sets" value="true" />
| <property name="transaction.auto_close_session" value="true" />
| <property name="hibernate.show_sql" value="false" />
| - <!-- End of aewa modifications
| -->
| </properties>
| </persistence-unit>
| </persistence>
|
|
|
Can someone please help us on how to improve the performance of the application, especially by limiting the number of queries generated.
Thnx
Yogesh
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130042#4130042
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130042
18 years, 2 months
[JBoss Seam] - Problem with several Seam based jars during startup
by yure
Hi,
I have spited my application to 2 separated projects (to reuse in future).
After splitting I built 2 jars. Every parts has own configuration in META-INF folder:
components.xml
ejb-jar.xml
jboss-beans.xml
persistence.xml
to access different databases and have different entities.
Now I'm trying to start my application. During startup I see in logs that first part is deployed without problems. But for second one I get such error:
2008-02-17 23:43:42,060 [Thread-1] INFO - starting up: ejbTEST2
2008-02-17 23:43:42,060 [Thread-1] INFO - starting the embedded EJB container
2008-02-17 23:43:42,091 [Thread-1] ERROR - Error installing to Start: name=TransactionManagerInitializer state=Create
javax.naming.NameAlreadyBoundException
at org.jnp.server.NamingServer.bind(NamingServer.java:144)
I used in components.xml such lines to init first part:
<core:init debug="true" jndi-pattern="#{ejbName}/local"/>
<core:ejb name="ejbTEST" installed="true"/>
For second I used only one this line:
<core:ejb name="ejbTEST2" installed="true"/>
Please, help me to resolve this issue.
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130039#4130039
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130039
18 years, 2 months
[JBoss jBPM] - re-assign actorId in task-assign event...
by sgrassie
Is there a better way to do this? I'm trying to assign the actor in a task-assign event in an ActionHandler, as so:
1. Set the group of pooled actors using a swimlane. (Uses our custom expression assignment handler to fetch the users from LDAP).
2. Create a process variable which contains a string containing the actorId to be assigned.
3. On 'task-assign', go to the custom action handler and check that the actor id in the process variable exists in the group of pooled actors, and if so, set the actorId on the task instance.
My problem here is that this then fires another 'task-assign' event, which then goes into the action handler again and sets the actorId again, and then... recursively does this until we stack overflow.
I have tried using the 'task-create' event, however it seems that this gets fired before the expression assignment handler (so LDAP isn't queried for the pooled actors).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130035#4130035
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130035
18 years, 2 months
[Installation, Configuration & DEPLOYMENT] - Re: Restart own application after error
by ReKie
Hi jaikiran,
thank you for your quick response. I know about the deployment of exploded and zipped archives, and we use zipped archives to deploy.
But deployment was not exactly what I meant, sorry for not communicating this close enough.
Maybe an example makes it more clear: If a client (browser) selects a page and some parts of this page can not be displayed (eg: a picture is not found, or there is some mistake in the icefaces treefiew...) this is bad for the person wanting that information, but the application is still able to serve other requestes. But if the application throws an error in the backend (eg: an serialisation error or a JNDI lookup fails (thx to your latest blog-entry this is going to happpen far less in future ;) ) the application does not serve any more requests. For that case it would be nice to have a mechanism that puts back the application into a state where it can work as expacted again (like it does right after startup/deployment) WITHOUT having to redeploy the applicatin or restart the server.
It can very well be that I am asking a realy stupid question here, and if ther is no way to do what I am asking for, just tell me that there is no thing as an "perpetuum mobile" and I will keep redeploying the application or restarting the server.
Thank you very much
Reinhard
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130034#4130034
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130034
18 years, 2 months