rudresh kumar

Ranch Hand
+ Follow
since Jan 04, 2006
Merit badge: grant badges
For More
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 rudresh kumar

Dear All,

I would need a guidance on resolving a EJB Transaction Management.

My application is running on a websphere.

A JMS message is posted to my application by another application, the message listener picks up calls the business layer and persisted using Entity Beans 2.1.

At the end of listener, reply back to the sender by posting the response message. (End of this on message transaction)

Now the other application, immediately validates the response and sends different request (with same entity)

Again the listener picks this message and calls the business layer, now business layers looks up for same entity (using findbyPrimaryKey) which results in Finder exception (saying record is not found).

If a delay is introduced in the other application (1 min, to validate and sending another request), every thing works good.

Everything is container managed, so i am not sure on how the container is flushing the cache to Database and why there is record not found exception, when the transaction is completed successfully. Ideally the container should have released the lock if any.

I would suspect there is a delay between pushing changes in Cache to Database, which is completely managed by Container, which is causing another transaction not to view the record as entity bean synchronizes the row.

Please help in resolving this issue

Hi All,

I have a question on retrieving the entities from JPA

Consider a employee entity

Dept Entity

If i have an dept id and want to get all employees, the only option i see is

This will fire two queries, one on the dept and then on employees (lazy loading)
But i am interested only in employees, there are no options in jpa to get this even using query (as there are no dept id in employee object). The reason i am asking is, when i am interested only in Employee, why to query Dept (what if it has 100's of more attributes which are not relevant).

Kindly let me know if this is the only way to resolve.

Thanks in advance
Hi Marks,

Firstly Thanks for your reply

Can i have the example/guide for the below
"If you are using Hibernate pre 3.1 version, then the template is helpful to hide boilerplate code. If you are using 3.1 or higher it gives you no benefits at all and writing straight Hibernate/JPA code is actually better and more portable than the template."

Following are my MDB settings

EJB Code

12 years ago
Hi All,

I am trying to persist the data and post a message to MDB (let us say 'responseMDB')

The transaction is started from MDB (Let us say 'request MDB'), within the On message i do persist as well as posting the message.

It works fine but in case of any exceptions the persistance/posting message are not rolled back.

I believe my transaction configuration is not correct.

Following are the details
MDB :- Container managed transaction

Spring Configuration :-

Can i know what is it i am doing wrong
12 years ago
Hi All,

I am facing similar issue as mentioned below

Had tried with the options mentioned but still same issue. The application is running in two nodes, errors happens only in one node

Can someone suggest on how to debug

Thanks in advance
13 years ago
Hi All,

I am trying to do a Migration of projects that were built on WID 6.0.2 version to 6.2 version. I have learnt that WID 6.2 versions is similar to RAD 7.

Was able to migrate all projects except EJB components (2.1 version) (Session, Entity, MDB). Was able to compile successfully, but on Deploying EJB components, WID is giving error like, "Error in delegate, could not deploy module, Class Table is not a valid classifier".

I had tried taking an EJB export of the project from 6.0.2 version and import the same in 6.2 version, but it did not help.

Also tried the same steps with Project Interchange, same error.

I have learnt that this issue is happening even when we migrate WASD 5 version to RAD 7 versions.

Can Someone help on solving the issue

14 years ago

Hi All,

We have an web application developed which works fine (JSF/Spring/Database). Have used HibernateDAO Support for the Persistance.

Now few services needs to be exposed as WebServices. So i have created new class and hosted as webservice, internally calling the DAO class which extends the HibernateDAOSupport by context.getbean("dao").

By Doing so i am not able to get the sessionfactory/ datasource and others. While calling the webservice, the bean creation fails with error in creating the bean "dao", and it gives sessionfactory and datasource as the attributes.

I do agree that these would be loaded during application startup by the container. But how to achieve the same from Standalone client

Would request to guide on solving the above issue.

14 years ago
Hi All,

I would like to secure the EJB/JMS on websphere.

Would like to know how to configure Authentication (id/pwd) for EJB/JMS so that who ever calls the ejb or puts/reads message from queue are authenticated On websphere

also for Authorization would like to configure roles so that calling methods on ejb are restricted

I do agree that we can provide Context.SECURITY_PRINCIPAL andContext.SECURITY_CREDENTIALS on the client during JNDI lookup, but how to configure the same credentials on each ejb/jms, as i could find any options during deployment

Kindly guide on how to achieve the same.

14 years ago
Hi All,

We are facing out of memory for an application installed on a WAS 6.0 server(1GB RAM). I have got the core and heap dumps of the same.

i have tried to analyse using IBM heapanalyser, but not able to make out which is causing the issue.

Can anyone sugget on how to find the objects that are causing the issue, using the core/heap dumps

14 years ago
Hi All,

I would like to know we can compare the words other than English in Java

for example, to check if the input string equals to some particular name say "ASHOK"


what if the comparison to be done other than English, may be Korean/Chinese/Spanish..

Kindly advise

14 years ago

You can place /pages folder under WEB-INF folder.

resources under WEB-INF cannot be accessed directly

14 years ago
Hi All,

I am trying to save the data into tables using spring and hibernate following are the conf

a) i am using HibernateDaoSupport (using hibernate template for saving)

b) following conf in spring

Every thing works fine, i will be saving a master object (which in turn saves other dependent objects)which will have many one to many relations with other objects (cascades saving to all objects)

i will be saving data for 5 tables, in case there are any issues with the table (may be data mismatch/column name change), let us say for the 3rd table. Then the data gets saved to the first two tables and not for other tables.

Is it that i am missing some thing in configuration to make the entire transaction rollback,

FYI : i have checked on the tx:advice option, but this again uses AOP, which i don't want to include

Kindly guide on solving the rollback issue.

Thanks in advance

14 years ago
Hi All,

I have wsdl and i have created a java skeleton/stubs/proxy/servicelocator using eclipse/Axis, would like to know how the client code would be, which will invoke the services

i have searched thro net but found the following
Service service = new Service();
Call call = (Call) service.createCall();
then invoke..

but the above code does not use the stubs/skeletons at all which was generated in eclipse

Can i know how to invoke the webservice using the skeleton/stubs/proxy/servicelocator

Thanks in advance
14 years ago
Hi All,

i have implemented the composite key in hbm file, which is as below (child.hbm)

<key-many-to-one name="master" class="" column="MASTER_ID" ></key-many-to-one>
<key-property name="child" type="java.lang.Integer" column="CHILD_ID"></key-property>

This works fine, but i would like to convert this into a annotations and remove the hbm files. Can i know how the definition would be for the annotations on the child class ( for composite key.


Hi all,

I have a issue with populating backing bean details.

a) I have customer jsf, which is backed by customer.bean (request scope), this bean has a reference to result.bean (which has the results of the credit card validation, let us say approved (allowable yes/no).

Customer class

String name;
String userId;
Result result;

public String validateCustomer() {
//biz logic
result = new Result();
return "mapping" (result.jsf)
on the result.jsf
<h:outputFormat styleClass="outputText" value="#{msg.outputpgdisp}">
<f:param value="#{result.approved}"></f:param>

This always gives null, can i know which i am facing this issue.
both the backing bean are request scope

15 years ago