Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

subhash uppalapati

+ Follow
since Nov 03, 2005
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 subhash uppalapati

Where is the "string given below"?
10 years ago
Hi Guys,
Thank you for all your replies. Today I came to know that I am using DLQ as the default queue, which is a blunder. That's why the message is getting delivered again and again causing infinite loop.
Now I moved to using my own queue and all problems are solved. Thank you to all of you.
I am getting the following exception if I add the Transaction not supported attribute.

Please find the error log messages that I am getting below.
OutOfMemory occurs not in Java but because in less time, the transaction manager or somebody tries to persist this again and again increasing the logs. The log file size grows beyond the allowed file system size. It causes the server to lack resources to write new logs and in turn bringing down the server which is trying to persist the entity which it cannot because of SQL exception.

Following logs repeats.....

I am trying to cache the results of my query using query result caching technique by following this URL:
I am using JBOSS 4.2.2 and EJB3.

As mentioned I have done the following:
1) Added the following properties to persistence.xml

2) Modified the entity by adding following lines:

3) Modified the ejb3-entity-cache-service.xml by adding following lines:

It is only caching the results but the eviction is not happening. Please let me know if I am missing anything.


11 years ago
The message are going to the DB for sure and getting stored in JMS_MESSAGES table. The MDB is getting called again and again for the same message. I could not find any issue with the client.
The problem is whent he MDB tries to persist the entity, it cannot due to SQL exception and the same MDB is getting called and trying the same persist again and again.
Please let me know .

The issue that I am trying to solve is:
1) I am getting the following exception

2) After that following warning appears

3) This goes into infinite loop inturn increasing the size of the log file and the server runs out of memory.
Let me explain my problem again..
1) I am sending message which is an entity

2) The MDB receives the message and tries to persist using

3) The persistance fails because the table structure in the DB is not the same as the entity. Also happens when there is bad data in the entity which cannot be inserted in the DB.
4) JBOSSMQ tries to deliver the message again and again causing the server to kneel down.

Things tried:
1) Setting the redelivered to false

2) Catching the exception in the MDB onMessage method
3) Chaging the redelivery limit by adding following line to jbossmq-service.xml mbean DLQ.

4) Also changed the value in the standardjboss.xml file

Please let me know if there is anything else that I can try. Please let me know if you have any ideas/suggestions.
I am not at all using this method to set redeliverlimit.
How can I use this? I tried to find out if there is any method like this for Objectmessage but I could not find it.
Thanks Reza for your reply.
I checked my code again and the problem seems to be I am not properly catching the right exception.
I am using EJB 3 with JBOSS. I am using the default JMS provider JBOSSMQ.
When the session bean delivers a message(entity) to the JMS destination, the MDB receives the object in its onMessage() method. If I have a problem with the insert query in the onMessage method, because of the redelivery feature the same message is getting delivered multiple times and in turn creating duplicate records in the DB for other entities.
Is making the number of redelivery attempts in standardjboss.xml to 1 a solution? Is there any other way to avoid the redelivery?

Note: I have logic to catch the exception, if any occurs, in the onMessage method.

Instead of synchronizing the whole onMessage method, you can use block synchronization to only that particular code which calls the session bean.
But from the posts below I understand that the synchronization won't help.
So reducing the size of the MDB pool is the only option.
CMS could be one of the solution for this kind of designs. For example Joomla, which is a CMS takes the users input content and displays in the same format. It has predefined templates.
The user just needs to give the names for the corresponding content and enter their content.
11 years ago
I am sorry.. What I wanted to ask was that we will give different names for URL patterns and the actual file name. We conceal the identity by naming it something different in the web.xml file. What exactly we are gaining by doing this instead we can have the same name like below:

Instead of this

Why we do this?

11 years ago