Win a copy of Emmy in the Key of Code this week in the General Computing forum!

Jes Sie

Ranch Hand
+ Follow
since Jul 24, 2001
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jes Sie


I've got this machine here running JBoss that has got about 3 GB RAM. Now, the memory doesn't seem to used agressively.

Currently, what I've got is -Xms512m -Xmx1024m

Pls let me now the exact settings so that I could increase it further, please.

PS: I was told the max the JVM could take is 2 GB.
14 years ago
Thanks David,

Your suggestions are wise.

The occasional exceptions that we've got is a NumberFormat exception. I was wondering whether is this due to java.text.NumberFormat?

Number formats are generally not synchronized. It is recommended to create separate format instances for each thread. If multiple threads access a format concurrently, it must be synchronized externally.

As it is, I think the init method (as your rightly pointed out) is bad....and as a result NumberFormat is stuffed. What do you think?
Hi folks,

A lead developer in my team mentioned that the occasional exception is caused by multi-threading issues with this piece of code. We agree with that, but I was wondering which part of the code is the problem. Pls show me.

Also, can we solve this problem by removing static and putting sync in the init method?

Originally posted by Roland Barcia:

It looks like you are throwing an exception all the way back up to the container. You should catch all possible checked Exceptions at the onMessage level to avoid it going back to the Container.

I understand what you're syaing. The interesting bit is that we have no problem running under 1 JMS Connection. The minute it's turned to more than 1, it blows up. We did suspect it's because of a multiple CPU env.
Any other hints, please?
15 years ago

Originally posted by Roland Barcia:
I need to see more of the exception. There have been a few JMS XA related eFixes after 5.0.2 that you should look for.

Oh, can you pls point me to a site that speak of the fixes?
We did turn on the Queue Connection Factory's XA. Theoritically, my system don't need it. Maybe I can try turning it off.
Here are more exceptions: -
15 years ago
Dear people,
I have encountered a strange behaviour of my WebSphere App Server 5.02. This problem is caused by an exception thrown when I increase the JMS Queue session. (I used the WebSphere's default impl of JMS queues). If I leave the default settings as '1' it works fine. Anything above '1' fails.
Somebody did hint to me that this problem could be because of multiple CPu running on the server. True enough, mine is a 4 CPU machine.
An excerpt of the exceptions: -
15 years ago
I've got a design issue.
Should I make JDBC calls on the MDBs or 'outsourced' it to a Stateless Session Beans?
You see, the code has
public void ejbCreate() throws CreateException {
try {
InitialContext ic = new InitialContext();

dataSource = (DataSource) ic.lookup(JNDI_DATASOURCE);

And the onMessage has got JDBC calls and closing the connection once done, etc.

QUESTION: Is it going to be inefficient to have such JDBC stuff for a MDBs that listens to hundreds of messages from a given Queue?
What's your have them passed on to a pool of stateless beans to handle to JDBCs?
Thank you.
Dear people,
WL seems to have a doc which claims that they could do container transaction for foreign JMS Providers (like MQ) which supports XA. Does anyone know whether MQSeries 5.2 does this?
16 years ago
Wait a minute, I think Q2 is D. What do you guys think?
I do agree A cannot be ruled out as well
EJBObject!? I thought the pattern is ideal for caching javax.ejb.EJBHome objects?
Anyway, I would suggest a MAP interface to cache EJBHome objects.

Originally posted by Kaustubh Patil:
TLD stands for Tag Libraby Descriptor. Its basically an XML document that maps the tag names to their tag handlers. i.e. the classes that handle and generate the HTML output for the tag.
Also it has the specification about the attributes for the tag.
You can find more information about this on the Jakarta project site.
[ July 30, 2003: Message edited by: Kaustubh Patil ]

OK, then the answer should C, right?
16 years ago
Dear JMS folks,
I've got this class which manages a pool of JMS Queue Sessions. The QueueConnection.start() is actually started only during the pool initialisation or when it's restarted when a session is found to be 'corrupted'.
It seems to work fine, however, I'm unsure when I should manage a QueueConnection.close() in the application. Is it when we know no one else would be using the JMS pool or is this really necessary to be managed?? I really don't think in the life span of the app when JMS would not be used.

Originally posted by Chris Mathews:
It is possible that the messages are being moved to WebSphere MQ via a separate process (this is how I do these types of things). Therefore, all the internal JMS producers are insulated from the fact that WebSphere MQ is being used.
The separate moving process could either be another MDB/JMS Listener that explicitly writes to WebSphere MQ or a WebLogic Messaging Bridge. Messaging Bridges were added to WLS in 6.1 and are used to integrate with Foreign JMS Providers (exactly your situation). For more information see: Using the WebLogic Messaging Bridge.

Not quite, the Messaging Bridge thingy is only meant for WLS 7.0 (and possibly very high SP version of 6.1).
There are other strategy documented here like using Startup class, LDAP, etc.
Foreign JMS strategies
I seem to answer my own question
I welcome more inputs and code snippets, though.
This seems like a good info. But, I'm more a less know how it's done with java client to send JMS to MDBs. I'm just wondering what would be 'additional' if MQSeries were used instead of native JMS.
I've got the MA 88....which is the wrapper for JMS for MQSeries. Just no configuration files included. The code on sending message to the MQ seems to be using the same old default connection factory, javax.jms.QueueConnectionFactory. I expected an MQSeries connection factory or something?
Somehow WebLogic is making this foreign JMS provider (MQ) local to Weblogic. How?
I've got an interesting situation here. I've just inherited a bunch of codes which (do not come with any deployment descriptors). Basically there is a working system which uses a java client to send out JMS message to an MQSeries 5.2 queue. Then, an MDB is there to listen to it.
The system is running fine, but I'm supposed to be documentating the flow of what needs to be done for any new developer point of view. I'm new to the project and know nuts about MQ and only know some JMS.
There is the MA88 Package in place. I would like to know how do we configure the MDB to 'listen' to an MQSeries queue. Is it in the deployment descriptor? (I do not have them). And, what configuration is required to be done in the app server (WebLogic) to recognise the queue factory, etc.
FYI, the app server used is WebLogic 6.1
Any hint would be nice, thank you.