Get a remote interface from a local instance

hi,I want to construct a bean locally on a server and then I want to pass the remote interface for that constructed bean back to a client. Is this possible?Thanks
[183 byte] By [Planmana] at [2007-10-3 6:18:39]
# 1

Yes. Take a look at SessionContext class. You can't construct a bean yourself, as its life is managed by container.

/**

* Obtain an object that can be used to invoke the current bean through

* the given business interface.

*

* @param businessInterface One of the local business interfaces

*or remote business interfaces for this session bean.

*

* @return The business object corresponding to the given business

* interface.

*

* @exception IllegalStateException Thrown if this method is invoked

* with an invalid business interface for the current bean.

*/

<T> T getBusinessObject(Class<T> businessInterface) throws IllegalStateException;

cheng-fanga at 2007-7-15 1:03:32 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...