Hi,
I had this kind of problem with local EJB sessions.
COMP_NAME ( java:Comp/env ... ) doesn't work for me, I'm using only the JNDI
name.
/**
* Retourne l'interface LocalHome du bean ApolloDataBean.
* @see ApolloDataBean
* @return ApolloDataLocalHome
* @throws Exception
*/
protected ApolloDataLocalHome getHome() throws Exception {
Context ctx = new InitialContext();
Object o = ctx.lookup(ApolloDataLocalHome.JNDI_NAME);
/* ApolloDataLocalHome.JNDI_NAME = "ejb/ApolloDataLocal */
ApolloDataLocalHome intf = (ApolloDataLocalHome)
PortableRemoteObject.narrow(o, ApolloDataLocalHome.class);
return intf;
}
/**
* Evalue les contraintes sur le portefeuille passé en paramètre.
* @param pfCode
*/
public void evaluateMopPortfolio(int pfCode) throws ConstraintException
{
ApolloDataLocal dataBeanLocal;
try {
dataBeanLocal = this.home.create();
Portefeuille ptf =
(Portefeuille)dataBeanLocal.getEntity(this.mapSystemProperties,
PojoClass.Portefeuille.fullName(), pfCode);
....
dataBeanLocal.remove();
} catch(Exception e) {
logger.error("[Object]ConstraintsMgr,[method]evaluatePortfolioConstraint,[catch]Exception,[throw]ConstraintException,[Message]"
+ e.getMessage());
throw new
ConstraintException(ConstraintException.ERR_PTF);
}
this.constraintsResultat =
Math.max(this.constraintsResultat,ConstraintConstants.EVAL_CTR_RESULT_WARNING);
}
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3948327#3948327
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3948327
-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user