On 23 Aug 00, at 17:25, Rickard �berg wrote:
> Hi!
>
> marc fleury wrote:
> > > able to deploy with several protocols at once. Just don't see how it
> > > could work)
> >
> > Again I don't see a fundamental problem. It can be all modeled as
> > contextual information that travels with the MethodInvocation...
>
> No. When you call getEJBObject() you get one object back. That should be
> used to communicate with the container. This object can only support one
> protocol to talk to the container. You're saying "use the contextual
> information". And just what would that "contextual information be"? The
> name of the protocol used by the "client"? That won't give you much
> though. For example, client X may call session A through protocol Foo,
> which calls session B through protocol Bar, which in turn calls
> getEJBObject. The "client" in this case used Bar, so lets return an
> EJBObject using the Bar protocol. So now B returns it to A which returns
> it to X. But X can't use the EJBObject since it doesn't know how to do
> the Bar protocol.
Hi Rickard,
We know which protocol each client in the chain uses. Why can't
we substitute the correct EJBObject (based on the protocol) at
each stage? For instance, we know that session A uses protocol
Bar to access session B, so we return a bar-protocol EJBObject
to session A. Now when session A returns this EJBObject to the
client, we again know that the client uses protocol Foo, so we
substitute the correct foo-protocol EJBObject as the returned
object. It seems to me that this would be possible to implement
using, for instance, the serialization replacement mechanism.
When we serialize an EJBObject we check the protocol that the
destination uses and substitute the correct instance. (Obviously
this method wouldn't work with the pass-by-reference optimization,
and the deployer would need to be aware of this and use
consistent protocols for beans using this optimization.)
Just a thought...
-Dan
>
> And that is the problem. If beans couldn't call beans it would be much
> simpler, because then the above wouldn't happen.
>
> I suggest that you also spend some "considerable thought" on this before
> call it "not a fundamental problem". Which it is. :-/
>
> /Rickard
>
> --
> Rickard �berg
>
> Email: [EMAIL PROTECTED]
> http://www.telkel.com
> http://www.jboss.org
> http://www.dreambean.com
>