[JBoss Messaging] - Re: Reliable delivery
by vc123
"timfox" wrote : "vc123" wrote :
| |
| | anonymous wrote :
| | | On my tests, persistent auto-ack send was too fast ( about 3000 1K messages/s) which means that there is no auto commit. if so, it would mean that persistent message delivery is not really reliable which is a violation of the JMS spec.
| | |
| |
| | No, that's not a violation of the spec for previously mentioned reasons. I suspect you are using a non durable subscriber, in which case messages won't get persisted anyway.
| |
| | Please can you explain whether you are using a queue or topic, whether it is temporary, and if a topic, whether is durable or non durable?
|
| It turns out that the speed was so high because I used Hypersonic as the "persistent" store. When I switched to Oracle, the 1KB message production rate fell down to the expected value of about 100 messages/sec.
|
| I traced Oracle SQL statements resulting from message send/receive calls, and I saw that with persistent delivery a commit is issued once per each message in the AUTO_ACK mode and once per batch in the transactional mode as expected. So JBoss Messaging works according to the spec.
|
| However, I was rather disappointed with non_persistent delivery which was about 1700-2000 messages/s with Oracle. Apparently, even with non_persistent delivery, JM still issues quite a few SQL calls.
|
| Switching back to HSQL, in hopes to improve performance, was no joy either because on my stress test (sending-receiving 1K messages in a loop) HSQL failed repeated with the following stack:
|
| | 15:48:04,936 WARN [JDBCSupport] SQLException caught, SQLState 23000
| | code:-104- assuming deadlock detected, try:1
| | java.sql.SQLException: Violation of unique constraint SYS_PK_51:
| | duplicate value(s) for column(s) $$ in statement [INSERT INTO JBM_MSG
| | (MESSAGE_ID, RELIABLE, EXPIRATION, TIMESTAMP, PRIORITY, TYPE, HEADERS,
| | PAYLOAD) SELECT ?, ?, ?, ?, ?, ?, ?, ? FROM JBM_DUAL WHERE NOT EXISTS
| | (SELECT MESSAGE_ID FROM JBM_MSG WHERE MESSAGE_ID = ?)]
| | at org.hsqldb.jdbc.Util.throwError(Unknown Source)
| | at org.hsqldb.jdbc.jdbcPreparedStatement.executeUpdate(Unknown
| | Source)
| |
| The failure occured under JBoss 5 Beta 4 as well as Jboss 4.2.2 with SP3 Messaging.
|
| Thanks.
|
| VJ
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4128499#4128499
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4128499
18 years, 2 months
[Clustering/JBoss] - deploying applications in selected Multiple Nodes in JBOSS 4
by viswanadhvk
Hi Friends, I am working on JBoss 4.2.1
My task is to deploy an application (ear file or war file) in clustered environment.The catch here is I need to deploy the application in selected multiple nodes.
for e.g. I have 3 Nodes Node1,Node2,Node3. and I would like to deploy the application in Node1,Node3 (and not Node2).Even though all the nodes are in cluster. In the sense ,If I start the server like,
| for "all"
| run -c all
|
| for Node1
| run -c Node1
|
|
| for Node2
| run -c Node2
|
|
| for Node3
| run -c Node3
|
If we see in the console of "all" we can see that all the server(Node1.Node2,Node3) are in cluster and shows as shown below
|
| 12:14:19,649 INFO [DefaultPartition] All Members : 3 ([127.0.0.1:1099, 127.0.0.1:1200, 127.0.0.1:1299])
|
Some body told me that If we deploy the application (ear or war) in "all\deploy " , "Node1\deploy" , "Node3\deploy" and not in Node2
(since I would like to deploy the application in Node1, Node3 only and not in Node2).
then it would be deployed and those two nodes only.
I did the same as I explained above,
(1) I want to know whether this method is correct
(2) If so , How to know the Nodes are having the same application and those nodes are in cluster (Node1,Node2).
Please any body can show some light on this.
If all the above information is not correct , can any body tell me ,
(3)can we deploy the application in selected multiple Nodes are not?
(4)If so please let me know how to do that?
Thanks!
VVk
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4128495#4128495
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4128495
18 years, 2 months
[JBoss jBPM] - Re: Threads and jbpm
by jcarlos_andia
Solved. Created the timer within an ActionHandler:
First define an event on the state:
| public void createTimer(State myState){
| Delegation delegate=new Delegation("com.jotatech.vgrc.action.visual.MyActionHandler");
|
| Event myEvent=new Event(Event.EVENTTYPE_NODE_ENTER);
|
| Action myAction=new Action(delegate);
| myAction.setName("[ACTION]");
|
| myEvent.addAction(myAction);
|
| myState.setAction(myAction);
| myState.addEvent(myEvent);
| }
|
Then in the ActionHandler:
| public class MyActionHandler implements ActionHandler{
|
| private static final long serialVersionUID = -7574831777028763706L;
|
| public void execute(ExecutionContext context) throws Exception{
|
| if(context.getTimer()==null){
| System.out.println("ADDING TIMER ...");
| Calendar cal=Calendar.getInstance();
| BusinessCalendar bc=new BusinessCalendar();
| Duration duration=new Duration("20 seconds");
| Date dueDate=bc.add(cal.getTime(), duration);
|
| Timer myTimer=new Timer();
| myTimer.setName("[TIMER] "+context.getEventSource().getName());
| myTimer.setDueDate(dueDate);
| myTimer.setRepeat("20 seconds");
| myTimer.setRetries(3);
|
| myTimer.setAction(context.getAction());
|
| context.setTimer(myTimer);
|
| context.getJbpmContext().getServices().getSchedulerService().createTimer(myTimer);
| }else{
| System.out.println("EXECUTING ...");
| /* CODE YOU WANT THE TIMER TO EXECUTE */
| }
| }
|
Hope this helps anybody with the same problem. Question: how can I inject a SEAM component or a Stateful session bean in the timer? I mean: I can't do Component.getInstance("SEAMComponent") or Component.getInstance("MySFSB"). Maybe a way to merge both SEAM and JBPM Contexts? Thanks in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4128486#4128486
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4128486
18 years, 2 months