users@glassfish.java.net

_at_Local extends _at_Remote

From: <glassfish_at_javadesktop.org>
Date: Sat, 02 Aug 2008 15:04:20 PDT

Hi,
I am designing a new application using EJB3.
I was just wonderning if its leagal and won't have any drawback.

@Remote
public interface OrderManagerRemote
{
public void addOrder(OrderTO orderData);
public List<OrderTO> getOrders();
}

@Local
public interface OrderManagerLocal extends OrderManagerRemote
{
//Only available in local interface.
public List<OrderTO> deleteOrders(List<OrderTO> orders);
}

I have tried this in Glassfish and it's working fine but I don't know what's going inside the system.

I could try other approach i.e.

public interface OrderMethods
{
public void addOrder();
}

@Remote
public interface OrderManagerRemote extends OrderMethods
{
}

@Local
public interface OrderManagerLocal extends OrderMethods
{
}
...but I just want to reduce the number of classes I'm creating.

Thanks in Advance.
[Message sent by forum member 'jassi_saggu' (jassi_saggu)]

http://forums.java.net/jive/thread.jspa?messageID=291144