> Hi all,
>        I want to be able to switch between EJB and RMI code
> at run time.
> I have basically an interface extending Remote for RMI which
> lists the business methods to be implemented and I do the
> same thing with EJBObject for EJB.
> Does anyone here have nice design patterns for this type of problem ?
> Code samples would be appreciated.
>

EJBObject extends Remote, so by extending your existing interface and
EJBObject you get an EJBObject with the desired properties:

public interface DualEjb extends DualRemote, EJBObject {
}

At the Bean side, you could probably use a similar pattern, with the EJB
class extending the RMI server class.

You'll need a wrapper to encapsulate the different methods of getting an
object.


- Avi
--
s/\be(\w+)/e-\1/g;

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to