Thanks wpoitras, do you have an example on how the MDB delegates calls to the business object?
This is how my SLSB does it:
Code:
public class AdminServiceBean extends AbstractStatelessServiceBean implements
AdminService {
private AdminService service = null;
protected void onEjbCreate() throws CreateException {
BeanFactory beanFactory = this.getBeanFactory();
this.service = (AdminService) beanFactory.getBean("adminService");
}
public AdminStatus getAdminStatus(AccessData access) throws EosException, RemoteException {
return service.getAdminStatus(access);
}
...
This way, I can have a Spring-proxied POJO that implements my AdminService business interface at the remote client, and the EJB calls are transparent to the client.
Is it possible to achieve the same result with an MDB? As only onMessage() can be called, will this reduce my business interface to a simple onMessage(), or will Spring wrap a business interface call to the client proxy in a Message and then "decode" the message the MDB receives? I cannot see any help for decoding a message in the AbstractMessageDrivenBean class, so I am a bit confused over what kind of abstraction Spring offers me here.