[
https://issues.jboss.org/browse/JBMESSAGING-1657?page=com.atlassian.jira....
]
Raghavendra Venkatakrishnan commented on JBMESSAGING-1657:
----------------------------------------------------------
Hi Yong and Bela,
if (!rsp.wasReceived())
{
if (!rsp.wasSuspected())
{ throw new IllegalStateException(this + " response not received from " +
rsp.getSender() + " - there may be others"); }
}
Can you let me know whether the above code shall work for all the scenarios.
Received a JMS leak in JBoss jms service and when I analysed it narrowed down to the above
code in GroupMember.java.I also analysed the other jgroups related code surrounding this
issue and if you notice in Rsp.java:
public boolean wasReceived() {
66 return received;
67 }
68
69 public void setReceived(boolean received) {
70 this.received=received;
71 if(received)
72 suspected=false;
73 }
74
75 public boolean wasSuspected() {
76 return suspected;
77 }
78
79 public void setSuspected(boolean suspected) {
80 this.suspected=suspected;
81 if(suspected)
82 received=false;
83 }
In GroupRequest's execute:
public boolean execute(boolean use_anycasting, boolean block_for_results) throws
Exception {
247 if(corr == null && transport == null) {
248 if(log.isErrorEnabled()) log.error("both corr and transport are null,
cannot send group request");
249 return false;
250 }
251
252 Vector<Address> targets=null;
253 lock.lock();
254 try {
255 targets=new Vector<Address>(members);
256 for(Address suspect: suspects) { // mark all suspects in 'received'
array
257 Rsp rsp=requests.get(suspect); // rsp shall be null if this requests
map does not contain a mapped value for this address suspect or if the map is an empty one
and hence suspect shall not be set to true.
258 if(rsp != null) {
259 rsp.setSuspected(true);
260 break; // we can break here because we ensure there are no
duplicate members
261 }
262 }
263 }
IllegalStateException upon cluster fail-over
--------------------------------------------
Key: JBMESSAGING-1657
URL:
https://issues.jboss.org/browse/JBMESSAGING-1657
Project: JBoss Messaging
Issue Type: Bug
Affects Versions: 1.4.0.SP3.CP05, 1.4.0.SP3.CP07, 1.4.0.SP3.CP08
Reporter: Justin Bertram
Assignee: Yong Hao Gao
Fix For: 1.4.0.SP3.CP09, 1.4.5.GA
Attachments: 127.0.0.1.log, 127.0.0.2.log, client.log, JmsTest.java
I set up two cluster nodes like so:
1) unzipped fresh JBoss EAP 4.3 CP04
2) renamed
<JBOSS_HOME>/server/default/deploy/jboss-messaging.sar/hsqldb-persistence-service.xml
to hsqldb-persistence-service.xml.rej
3) copied <JBOSS_HOME>/docs/examples/jms/mysql-persistence-service.xml to
<JBOSS_HOME>/server/default/deploy/jboss-messaging.sar
4) Modified the "Clustered" attribute to be "true" in
<JBOSS_HOME>/server/default/deploy/jboss-messaging.sar/mysql-persistence-service.xml
5) copied <JBOSS_HOME>/docs/examples/jca/mysql-ds.xml to
<JBOSS_HOME>/server/default/deploy and changed the jndi-name to
"DefaultDS" and pointed it at my local MySQL
6) copied MySQL driver to <JBOSS_HOME>/server/default/lib
7) copied jgroups.jar from <JBOSS_HOME>/server/all/lib to
<JBOSS_HOME>/server/default/lib
8) copied <JBOSS_HOME> to <JBOSS_HOME2>
9) Start first instance with "./run.sh -c default -b 127.0.0.1
-Djboss.messaging.ServerPeerID=1"
10) Start second instance with "./run.sh -c default -b 127.0.0.2
-Djboss.messaging.ServerPeerID=2"
Then I ran the test (which is attached as JmsTest.java)
-Start test client connecting to 127.0.0.1
-Observe client log filling up with "."
-Drop JBoss running on 127.0.0.1 (using kill -9 <pid>)
-Client fails with org.jboss.jms.exception.MessagingJMSException (see log attached as
client.log)
-Observe java.lang.IllegalStateException on the 127.0.0.2 (attached as 127.0.0.2.log)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira