-
Question about EJB on Websphere 4.0 (2 messages)
- Posted by: Ken Li
- Posted on: February 04 2009 17:41 EST
Hi All, I am doing a project migrating an enterprise application from WAS4.0 to WAS6.1. The existing EJB was written in EJB1.1. As there were no LocalHome interface and Local interface within EJB1.1, in order to get ejb out of a collection following code should be legal. ... Enumeration myEntities = MyEntityHome.findAll(); while (myEntities.hasMoreElements()){ MyEntity myEntity = (MyEntity)PortableRemoteObject.narrow(myEntities.nextElement(), MyEntity.class); ... But in the existing code (deployed on WAS4), instead of the above method, direct class casting was used vastly, something like below, ... MyEntity myEntity = (MyEntity)myEntities.nextElememt(); ... The problem is it works fine in WAS4.0, but it throws ClassCastException on WAS6.1. So my question: was it specific optimization in WAS 4.0 (the direct class cast for EJB invocation)? If so, how can we use the same on WAS6.1? Thanks in advance.Threaded Messages (2)
- Re: Question about EJB on Websphere 4.0 by guddu sk on February 12 2009 07:57 EST
- Re: Question about EJB on Websphere 4.0 by Ken Li on February 13 2009 00:42 EST
-
Re: Question about EJB on Websphere 4.0[ Go to top ]
- Posted by: guddu sk
- Posted on: February 12 2009 07:57 EST
- in response to Ken Li
I think, there is some properties that makes the call EJB by reference. I am not sure how to do this, may be this is being used, I guess. I am not sure if this helps. Thanks, Sharing understanding http://www.interview-questions-tips-forum.net -
Re: Question about EJB on Websphere 4.0[ Go to top ]
- Posted by: Ken Li
- Posted on: February 13 2009 00:42 EST
- in response to guddu sk
Thanks for your reply. I agree with you, and I know in weblogic there is an attribute like "enable-call-by reference" to achieve this, but how this is done in websphere? Thank you anyway.