ronak rayy

Greenhorn
+ Follow
since Oct 04, 2016
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by ronak rayy

How to setup a Load balanced or clustered message queue on WAS (websphere application server)

In a clustered environment, I need to setup 3 message queues for load balancing and the client code (javax.jms.*) is as below:

7 years ago
I am connecting and sending a message to a message queue on Websphere Application Server (WAS) from my java code (javax.jms.*) and its working.
Problem: If it is a clustered environment, and there are 3 message queues for load balancing, the same java code is failing. Please help me on how to sort this problem, and suggest weather I need to change the code for something need to be configured on WAS while deploying or setting up message queues ?

The java code and message queues are deployed on WAS.

Below is the java code,

7 years ago

Tony Docherty wrote:Done.




Thank you so much team. Appreciate your prompt action.
7 years ago

ronak rayy wrote:


The above code is giving me the below error (server used is Websphere)

[28/09/16 10:04:53:121 BST] 000000d9 BusinessExcep E   CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "createRole" on bean "BeanId(XXX#XXXEJB.jar#DBQueryService, null)". Exception data: java.lang.IllegalStateException
at com.ibm.ejs.container.CMStatelessBeanO.getUserTransaction(CMStatelessBeanO.java:80)
at com.xxx.services.impl.DBQueryServiceImpl.createRole(Unknown Source)
at com.xxx.services.interfaces.EJSRemote0SLDBQueryService_eefe5a3e.createRole(EJSRemote0SLDBQueryService_eefe5a3e.java)
at com.xxx.services.interfaces._IDBQueryService_Stub.createRole(_IDBQueryService_Stub.java:1)




We managed to sort this ourselves...
The issue was with one of the configuration settings on Websphere.

Enterprise Applications >> XXX > modules >> metadata for modules  .................................. need to uncheck all the modules.
error was occurring when all the modules were checked.

Henry Wong wrote:
First, let's move this topic to the ranch office forum. And second, can you tell us what the sensitive information is?  I don't see any usernames and passwords being exposed.

Henry




I want to make the below changes, as it is showing the name of our customer-

1. in the code section, change the line below @Override to "public boolean createRole(String userId) throws Exception {"
2. in the logs section, replace them with the lines below


[28/09/16 10:04:53:121 BST] 000000d9 BusinessExcep E   CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "createRole" on bean "BeanId(XXX#XXXEJB.jar#DBQueryService, null)". Exception data: java.lang.IllegalStateException
at com.ibm.ejs.container.CMStatelessBeanO.getUserTransaction(CMStatelessBeanO.java:80)
at com.xxx.services.impl.DBQueryServiceImpl.createRole(Unknown Source)
at com.xxx.services.interfaces.EJSRemote0SLDBQueryService_eefe5a3e.createRole(EJSRemote0SLDBQueryService_eefe5a3e.java)
at com.xxx.services.interfaces._IDBQueryService_Stub.createRole(_IDBQueryService_Stub.java:1)
7 years ago
Hello Moderator, Admin-

I need to edit my post, it contains some sensitive information which i do not want to publish due to privacy policy.

https://coderanch.com/t/671101/EJB-JEE/java/unable-create-UserTransaction-EJBContext-IllegalStateException

please help me in this regard.
7 years ago



The above code is giving me the below error (server used is Websphere)

[28/09/16 10:04:53:121 BST] 000000d9 BusinessExcep E   CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "createRole" on bean "BeanId(XXX#XXXEJB.jar#DBQueryService, null)". Exception data: java.lang.IllegalStateException
at com.ibm.ejs.container.CMStatelessBeanO.getUserTransaction(CMStatelessBeanO.java:80)
at com.xxx.services.impl.DBQueryServiceImpl.createRole(Unknown Source)
at com.xxx.services.interfaces.EJSRemote0SLDBQueryService_eefe5a3e.createRole(EJSRemote0SLDBQueryService_eefe5a3e.java)
at com.xxx.services.interfaces._IDBQueryService_Stub.createRole(_IDBQueryService_Stub.java:1)