Alwyn Schoeman wrote:
> My application consists of a MDB that calls different Session
> Beans for different transactions, based on JNDI information
> provided in the request.
> 
> In order to make this possible I'm trying to get into a
> situation where I can do this:
> 
> BaseTransactionLocalHome bth = (BaseTransactionLocalHome)
> ctx.lookup("whatever the JNDINAME is"); BaseTransactionLocal
> bthl = bth.create();
> bthl.process();       // where process is a method defined in
> an interface the base class implements.
> bthl.remove();
> 
> Is there anyway that one can make this work or am I just
> trying to force java in a direction it won't go?

I haven't tried this, but in theory it should work. The furthest I've
gone is having a base SLSB class that they all inherit from to supply
logging and other utility methods. However, every lookup narrows the
object to the direct remote interface -- not the base class. However, I
think it should work. Note that since you're using local interfaces
there is no narrowing, so I figure if your SLSBs extend BTL you should
be okay.

David Harkness
Sr. Software Engineer
Sony Pictures Digital Networks
(310) 482-4756


-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to