My taste tells me to throw JBoss-specific object not found exception and
handle it according to the invocation type in the place get() was
called.

Another way would be to add getLocal() method to InstanceCache
(implementation) that would throw NoSuchObjectLocalException. But it's
not nice because as you wrote the cache should not be aware of this.

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Adrian Brock
> Sent: Monday, January 05, 2004 3:28 PM
> To: [EMAIL PROTECTED]
> Subject: [JBoss-dev] InstanceCache - NoSuchObjectException
> 
> The interface org.jboss.ejb.plugins.InstanceCache
> mandates NoSuchObjectException for bean not found.
> 
> This is incorrect for local invocations and leads to an 
> EJBException wrapping the exception.
> 
> Since the cache knows nothing about local/remote the obvious 
> fix is to "unwrap" the NoSuchObjectException and recreate it 
> as a NoSuchObjectLocalException wherever get() is used.
> 
> Anybody see another way of doing this?
> 
> Regards,
> Adrian
> --
> xxxxxxxxxxxxxxxxxxxxxxxx
> Adrian Brock
> Director of Support
> Back Office
> JBoss Group, LLC
> xxxxxxxxxxxxxxxxxxxxxxxx 



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to