jsf - EJB Injection in ManagedBean -


when button on web page pressed, controller/listener (@managedbean) creates 10 new instances in database. happen, need myclassfacade variable (with @ejb anotation) different values database , .create() method persists new instances in database.

but, apparently, not allowed inject ejb annotation variable. don't need variable available in xhtml file. need in java class controller logic.

to add confusion, projects deploys , works fine 50% of time. other 50% error :

com.sun.faces.mgbean.managedbeancreationexception: error occurred performing resource injection on managed bean chartview caused : com.sun.faces.spi.injectionproviderexception: com.sun.enterprise.container.common.spi.util.injectionexception: exception attempting inject remote ejb-ref name=ajax.chartview/ejbpulsfacade,remote 3.x interface =com.mycompany.puls.pulsfacade,ejb-link=null,lookup=,mappedname=,jndi-name=com.mycompany.puls.pulsfacade,reftype=session class ajax.chartview: lookup failed 'java:comp/env/ajax.chartview/ejbpulsfacade' in serialcontext[myenv={java.naming.factory.initial=com.sun.enterprise.naming.impl.serialinitcontextfactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.jndistatefactoryimpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} @ org.glassfish.faces.integration.glassfishinjectionprovider.inject(glassfishinjectionprovider.java:194)

maybe can somehow skip injection of @ejb variable ? should ?

edit : here similar question, solution offered : create different java class declares ejbs , extends managed bean.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -