[jboss-user] [EJB 3.0 Users] - Re: java:comp/env not found in @service POJO bean
Thanks you guys all, I'm using AS5.1.0 grdzeli_kaci wrote : sorry i missed EntityManager declaration into implementation. | | | @PersistenceContext(unitName = CustomerCareOracle) | | private EntityManager oracleManager; | | This code work for me, but try to invoke some method to oracleManager, exception with raise out. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=4262579#4262579 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4262579 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: java:comp/env not found in @service POJO bean
ok, then you must update latest ejb 3 plugin. link is posted above. I use this code into my application on jboss 5.1.0.GA with have no any problem. __ Regards, Paata Lominadze. Magticom LTD. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=4262589#4262589 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4262589 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: java:comp/env not found in @service POJO bean
grdzeli_kaci, Thanks very much~ Are you sure oracleManager worked in start() method? View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=4262607#4262607 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4262607 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: java:comp/env not found in @service POJO bean
steeven wrote : grdzeli_kaci, | | Thanks very much~ | Are you sure oracleManager worked in start() method? yes of course, It is very useful pattern. Singleton service is very useful for me. I load 90 % of database table into memory, because it contains maximum 100 rows each table, these table are configuration table, i have no transaction table into memory only. i load all table in start method, and then if i change something into database, i'll make reload concrete table(s) or row. I'll be very glad that into ejb 3.1 will be singleton service, because now my projects is application server dependent, you know that @Service is jboss ejb3 extension. __ Regards, Paata Lominadze. Magticom LTD. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=4262645#4262645 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4262645 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: java:comp/env not found in @service POJO bean
Thanks very much, I'll try to ask EJB to do load data instead of invoking EnityManager directly. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=4262653#4262653 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4262653 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: java:comp/env not found in @service POJO bean
Thanks, I will try to call @EJB instead of EntityManager to avoid this problem. really appreciated. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=4262837#4262837 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4262837 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: java:comp/env not found in @service POJO bean
Please post the entire exception stacktrace and also the piece of client code which gets hold of the service. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=4262335#4262335 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4262335 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: java:comp/env not found in @service POJO bean
here is the full error stacktrace: 09:12:17,884 ERROR [AbstractKernelController] Error installing to Start: name=jboss.j2ee:ear=my.ear,jar=myserver.jar,name=MyService,service=EJB3 state=Create | java.lang.RuntimeException: java.lang.reflect.InvocationTargetException | at org.jboss.ejb3.service.ServiceContainer.invokeOptionalMethod(ServiceContainer.java:381) | at org.jboss.ejb3.service.ServiceContainer.lockedStart(ServiceContainer.java:264) | at org.jboss.ejb3.EJBContainer.start(EJBContainer.java:884) | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) | at java.lang.reflect.Method.invoke(Method.java:597) | at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59) | at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150) | at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66) | at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241) | at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47) | at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109) | at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70) | at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221) | at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54) | at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42) | at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) | at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) | at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) | at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348) | at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631) | at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934) | at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082) | at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984) | at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774) | at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540) | at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:121) | at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:51) | at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62) | at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50) | at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171) | at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439) | at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157) | at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178) | at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210) | at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098) | at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348) | at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631) | at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934) | at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082) | at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984) | at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822) | at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553) | at
[jboss-user] [EJB 3.0 Users] - Re: java:comp/env not found in @service POJO bean
Which exact version of JBoss AS is this? Use our latest EJB3 plugin http://www.jboss.org/ejb3/ejb3plugin.html against JBoss AS 5.1.0 and try it out. The latest plugin can be downloaded from here http://www.jboss.org/ejb3/downloads.html View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=4262553#4262553 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4262553 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: java:comp/env not found in @service POJO bean
which as are you using ? i can give you my full working example. 1. Management Interface: | @Management | public interface CommonServiceMan { | void create() throws SomeMyException; | void start() throws SomeMyException; | void stop() throws SomeMyException; | void destroy() throws SomeMyException; | } | 2.Remote Interface | @Remote | public interface CommonServiceInt { | public String testMethod(String name) throws SomeMyException; | } | 3.Implementation | @Remote(CommonServiceInt.class) | @Service(objectName = jboss:custom=CommonServiceBean) | public class CommonServiceBean implements CommonServiceInt, | CommonServiceMan { | public String testMethod(String name) throws SomeMyException{ | System.out.println(my test method call); | return Hello : +name; | } | public void create() throws SomeMyException { | System.out.println(Create method ) ; | } | public void start() throws SomeMyException { | System.out.println(Start method ) ; | } | public void stop() throws SomeMyException { | System.out.println(Stop method ) ; | } | public void destroy() throws SomeMyException { | System.out.println(Destroy method ) ; | } | } | | This example is working fine for me. I test it on jboss as 4.2.1, 4.2.2, 4.2.3 and 5.1.0 (i use each one for different projects.) __ Regards, Paata Lominadze. Magticom LTD. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=4262554#4262554 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4262554 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: java:comp/env not found in @service POJO bean
sorry i missed EntityManager declaration into implementation. | @PersistenceContext(unitName = CustomerCareOracle) | private EntityManager oracleManager; | View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=4262555#4262555 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4262555 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user