Discussions

EJB programming & troubleshooting: Question about EJB on Websphere 4.0

  1. Question about EJB on Websphere 4.0 (2 messages)

    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.
  2. Re: Question about EJB on Websphere 4.0[ Go to top ]

    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
  3. Re: Question about EJB on Websphere 4.0[ Go to top ]

    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.