-
1. Re: How to know if a bean instance is accessed by a local or
drabbit May 22, 2006 5:12 AM (in response to upankar)This is an interesting question, but I doubt there is a solution to it. You might want to go one step back and post what you need to know this information for. If it is merely for logging and to check if calls are local or remote, you could just write an interceptor that logs the invocation type.
dirk -
2. Re: How to know if a bean instance is accessed by a local or
upankar May 22, 2006 3:00 PM (in response to upankar)Well ! i am actually trying to simulate streaming behaviour in a session bean. As we know IO streams are not serilizable and hence can not be used in EJB method return types, I am trying to put together a generic framework which can simulate the streaming behaviour. I got pretty successful in it and got it to working. But the framework needs to identify the client type. If local, it directly returns the stream instance to client (since no serialization is done here, hence no issues), but if remote it returns the simulated stream instance to client which then retrieves data from actual underneath stream instance that resides on server. As of now, i am handling this with different create methods in local and remote home to know if the bean instance is serving a remote or local client.
But this is a redundant workaround. I would like to have some thing more concrete and generic. -
3. Re: How to know if a bean instance is accessed by a local or
bhupendra.yaduvenshi May 24, 2006 9:14 AM (in response to upankar)If ur issue is performance than plz don't worry beacaz when u deploy ur client & server on same jvm & ur ejb component is worked as a local intefcae.Only difference is in cas eof remote it is used only pass by value but no stub skeleton created.it means it will behave like a local interface.If any confision than let me know
-
4. Re: How to know if a bean instance is accessed by a local or
upankar May 25, 2006 2:37 PM (in response to upankar)Performace is definitely one thing. But more than that, i am just curious to know if there is a straightforward way to getting to know the access type (local or remote) in the bean instance.