• Post Reply Bookmark Topic Watch Topic
  • New Topic

@Local extends @Remote

 
Jas Singh
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Ranchers,
I am designing new application with 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.

[ July 31, 2008: Message edited by: Jas Singh ]
[ July 31, 2008: Message edited by: Jas Singh ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!