• Post Reply Bookmark Topic Watch Topic
  • New Topic

Container Managed Bean  RSS feed

 
Shweta Gulati
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,
I am developing the CMP using IBM Visual Age 3.5. the table to which this bean maps to uses composite primary key.the bean has been developed properly but i wish to get the values in one of the fields of the primary key for which i have specifically written the getter method both in the bean and the remote interface. but i am unable to access the method through the remote object.
Kindly let me know how to access primary key fields through the remote object .
Shweta
 
Nidhi Madan
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shweta,
i was also stuck at this position but finally i got the way out. you should use the following code in your client and i am sure that it will work out for you.
UserTransaction utx = null;
utx = (UserTransaction)context.lookup("UserTransaction");
Now before you are calling that remote method
write
utx.begin();
and after you finish calling that method write
utx.commit();
Note : context is nothing but the instance of InitialContext
I hope it woks for u
 
Rahul Mahindrakar
Ranch Hand
Posts: 1869
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shweta,
We have a forum dedicated to IBM products in the IBM Application Servers forum. This issue could be more appropriately handled in that forum. Please post your queries in appropriate forums.
Thank You.
 
Pardhsaradhi Naraparaju
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may probably need to take the advantage of TransferObject J2EE design pattern in which you will pass the object with the required values over the wire to the remote client and access them locally in a single RMI call.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!