##########
// JSF 1.2 backing bean
@org.ajax4jsf.model.KeepAlive
public class TripManagerBean {
@EJB(name="earName/TripBean/local")
private TripLocal tripBean;
public TripManagerBean() {
...
}
##########
earName is foo if the EAR is called foo.ear.
##########
// EJB3 bean
@Stateless
public class TripBean implements TripLocal {
@PersistenceContext
private EntityManager em;
...
}
##########
##########
// EJB3 bean local interface
public interface TripLocal {
...
}
##########
thanks to this page about jndi bindings in ejb3
and here's how to lookup an ejb3 stateless session bean using jndi from the backing bean.
IT, computer and programming tutorials and tips that i couldnt find anywhere else using google, from my daily work as a Senior Developer of solutions using Java and Linux.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment