rohit chavan

Ranch Hand
+ Follow
since Oct 08, 2010
rohit likes ...
Hibernate Java Oracle
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
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by rohit chavan


I am working on reading large MQ messages in Java and processing + writing the contents of MQ message to a file.

The code I am writing is multi-threaded and can process multiple messages in parallel.

The writing application writes (PUT) large MQ message to the queue using Segmentation+Grouping.

Now, while reading below steps take place.

1.Set appropriate values for MQGetMessageOptions.

2. Initializing MQQueue  - serverFileQueue and MQMessage - reqMessage.

3. Invoking get method for MQQueue by passing reqMessage and getGroupMsgOptions.

4. Checking the MQ message flags in a while loop to identify last segment of last message in group.

5. Write the message contents to a file using .

My question is, if the MQ message is too large, should the code be getting java.lang.OutOfMemoryError.

I am trying to understand if step 3 . would load entire MQ Message in memory? OR only segments would be loaded hence no need to worry about  java.lang.OutOfMemoryError.

Your help is much appreciated!


8 months ago
You will get different results depending on the sleep intervals you keep.

Also, the position of

Is there any specific check you are intending to do here?
3 years ago
What would be the tokens here?
Can you please state your problem with a bit more detail?
3 years ago
Would there be free entry to Scotland for UK Citizens/Residents?
3 years ago
You can define a hashmap where you have in-memory status of the analyzer.

(I am guessing there can be more than one users.)

1. In you analyzer component, you can set the status as "running" for "Analyzer1" and so on, when the user takes action on it.

2. Then whenever user wants to query the status you can get it from the map.

3. Update the status as complete when the report is generated (i.e. the analyzer component /method call ends)

Check if you can use split , a method in String Class.

3 years ago
which line in the code, are you getting this exception at?
3 years ago
Hi Alexander,

This code won't compile.

Please check once again.


Following code will compile fine.

4 years ago
you can use union operation as an option.

Before that if you can, please put here sample rows from table A and B both, and rephrase what result you are looking for.

ok, first thing first.

What did you get? a YES or a NO?
4 years ago
Apart form the answer ,
using two iterators over one ArrayList, is not a good practise.
4 years ago
IMO it would be possible using JApplet. (obviously, if it is allowed) .
4 years ago

Answer to a) would be, sleep is being called on the Thread to avoid repetitive calls to get the prices. You put a and the current thread execution will be halted for 5 seconds. During this time the scheduler may choose any thread for execution according to the type/protocol of the scheduler.

b) Can you please explain it a bit more.
The answer lies in your question itself - "Socket".

Have you written any code/steps as in how you would achieve it?

4 years ago
As mentioned by Peter,
Hibernate already does that.
4 years ago