Ok, I'm trying to design a relatively clean view of an EJB that
is to be used in both locally and remotely.  So far I've been unable
to successfully deploy it in the J2EE reference implementation (1.3b2).
(It's been annoying as all ....)

So can what I am trying to do here be done or am I being abusive of EJB?
(I've already tossed my usage of generics since the deployment seems to
choke on the generics syntax.  Ack! I hate the bleeding edge!)

I'm trying for one view of object for simplicity at the system level.
Of course this seems to imply that all calls will have to cache the possible
RemoteException even if the object is a local object.
(The basic structure is at the bottom of this message.)


One of my questions is whether I can deploy this bean as both a local and
remote bean.  And then, once that's done, how do I access it locally vs.
remotely from client code (hmmm, seems to be a sticky point)?

Feel free to clarify my confusion if that's what it is.  What's curious to
me
is that this whole EJB 2.0 with local and remote is exactly the same issue
that we've all come to know and love with RMI and scalability, etc.  Yay.
No I get to deal with it again as I move to an EJB implementation.  Why me?
<grin>

I hesitate to ask this question: Any recommendations of an AppServer that
can at least get me close to the kinds of things I'm trying to do; and works
reasonably well with respect to the whole 'deploy' thing (gads, the j2ee
reference
implementation stuff is just h**l - including the forte4j version of it).


Thanks in advance,

Joel

----org.foo.Foo----
public interface Foo {
  public String getName() throws java.rmi.RemoteException;
  public Long getID() throws java.rmi.RemoteException;
}
----org.foo.FooHome----
public interface FooHome {
  public Foo create(String name, Long id)
    throws java.ejb.CreateException, java.rmi.RemoteException;
  public Foo findByPrimaryKey(Long id)
    throws java.ejb.CreateException, java.rmi.RemoteException;
  public Collection findByName(String name)
    throws java.ejb.CreateException, java.rmi.RemoteException;

----org.foo.impl.FooLocal----
import org.foo.Foo;
public interface FooLocal extends EJBLocalObject, Foo {}

----org.foo.impl.FooRemote----
import org.foo.Foo;
public interface FooRemote extends EJBObject, Foo {}

----org.foo.impl.FooHomeLocal----
import org.foo.FooHome;
public interface FooHomeLocal extends FooHome, EJBLocalHome {}

----org.foo.impl.FooHomeRemote----
import org.foo.FooHome;
public interface FooHomeRemote extends FooHome, EJBHome {}

----org.foo.impl.FooBean----
import org.foo.Foo;
public abstract class FooBean implements Foo, EntityBean {
 // all the normal stuff
}

===========================================================================
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