Reputation: 1712
Is it possible to turn a Managed bean into an Enterprise Managed Bean? Would you give some example?
Upvotes: 1
Views: 301
Reputation: 236112
For turning a POJO bean class into an EJB, add the @Stateless
of @Stateful
annotation and implement the @Remote
or @Local
(or both) interfaces. Of course some additional configuration steps will be necessary, but that depends on the particular application server you're using.
Do something along these lines:
@Local
public interface ServiceLocal {
}
@Remote
public interface ServiceRemote {
}
@Stateless
public class ServiceEJB implements ServiceLocal, ServiceRemote {
}
Upvotes: 2