in netbeans, right click on editor, "entreprise resources"->call entreprise
bean
select your ejb, remote/local depending where you add your portlet.
netbean add a method to your portlet for you... except the jndi is wrong :-)
so too call an ejb "MediaDirSessionBean", from the application project
"AC", with local interface, jndi is : "AC/MediaDirSessionBean/local"
the full function should look like this one :
private MediaDirSessionLocal lookupMediaDirSessionBean() {
try {
Context c = new InitialContext();
return (MediaDirSessionLocal) c.lookup("AC/MediaDirSessionBean/local");
} catch (NamingException ne) {
java.util.logging.Logger.getLogger(getClass().getName()).log(java.util.logging.Level.SEVERE,
"exception caught", ne);
throw new RuntimeException(ne);
}
}
A+
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4112588#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...