[Messaging, JMS & JBossMQ] - MDB connection to MultiHomed Remote Queue
by adogg
I have a situation where I want to connect my MDB to a remote topic on a separate, multi-homed server. The remote server has two nodes with the same IP, running on different sets of ports. The topic I am subscribing to is only deployed on one of the nodes, as is the uil2-service.xml (call it node1) file
(in /server/node1/deploy-hasingleton/jms)
I used
http://wiki.jboss.org/wiki/Wiki.jsp?page=HowDoIConfigureAnMDBToTalkToARem...
to configure the MDB. The provider URL in my jms-ds.xml jndi properties specifies the JNDI port of node1 and it works as long as node1 is started up first on the multi-homed server.
The problem is that node1 is not always started up first and I want it to work even if node1 is started up last. If the node2 is started first, I get the error that UIL2XAConnectionFactory is not bound. I think this makes sense because my MDB is connecting the JNDI port of just node1 in the remote cluster, rather than the cluster as a whole - and node1 doesn't have uil2-service.xml in its deploy dir (because node2 already does).
So, if that's the case, what is the best practice for remotely connecting to a topic on a multi-homed clustered environment? What should my JNDI properties be in the jms-ds.xml to connect in this situation?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985926#3985926
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985926
19Â years, 8Â months
[JBossWS] - Re: Problem with SAAJ Client for Webservice that receives at
by RomeuFigueira
Finally managed to fix this.
After spending the last hours dealing with JBossWS source-code, I've managed to do a small change that enabled my message to be correctly interpreted.
If you remmember I wasn't specifining in my mimeheaders, where my rootpart was. The problem was that the class MultipartRelatedDecoder wasn't computing a valid MIME boundary, the one I was getting was messy, making the code skip my text/xml part into the attachment part, thus giving out those errors.
After interpreting both InputStreams, the main difference from any of my standalone clients and the SOAPUi or the Junit test reports was that without a start part, my InputStream started in the first line, while the other started a line below.
So, in order to enable a detection of a valid boundary, I had to do the following change to MultipartRelatedDecoder.java:
old:
| try
| {
| boundary = ("\r\n--" + boundaryParameter).getBytes("US-ASCII");
| }
|
new:
| try
| {
| if(start==null)
| boundary = ("--" + boundaryParameter).getBytes("US-ASCII");
| else
| boundary = ("\r\n--" + boundaryParameter).getBytes("US-ASCII");
| }
|
This way, both systems work. IMO the old code is a little bit too hard-coded in this aspect, giving a weird error when the simple difference between files was a linefeed (which I didn't program in my code, it was introduced through the communication layer).
Perhaps this aspect could be improved.
Thanks for making this project opensource, if not it would have been almost impossible to work this out.
Regards,
Romeu
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985919#3985919
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985919
19Â years, 8Â months