Re: T5: newbie question about tap5 ejb
I thing it is something related to EJB3 configuration, you should check your JNDI tree and try to get the interface by using InitialContext = new InitialContext instead of @EJB annotattion, because exception means something is going wrong during initialization InitialContext. 2007/10/7, Pavel Volkovitskiy [EMAIL PROTECTED]: Hello! i'm trying to use ejb3 beans from my tap5 app right now i'm doing: mtx/racer/pages/contract/AddContract.java: ... @EJB private SellerFacadeLocal sellerFacade; and then public StreamResponse onSubmit() { ... Seller s = sellerFacade.getSeller(code, dealer, comment); there Seller - entity, sellerFacade - stateless bean and sellerFacadeLocal - interface but this doesn't work, i'm getting javax.naming.NotContextException: geronimo/env/mtx.racer.beans.SellerFacade/entityManager so, i'm doing something wrong... any tips or tap5ejb3 examples? -- Pavel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: newbie question about tap5 ejb
I think it is something related to EJB3 realization in Geronimo, you should check your JNDI tree and try to get the interface by using InitialContext = new InitialContext instead of @EJB annotattion, because exception means something is going wrong during initialization InitialContext. 2007/10/7, Pavel Volkovitskiy [EMAIL PROTECTED]: Hello! i'm trying to use ejb3 beans from my tap5 app right now i'm doing: mtx/racer/pages/contract/AddContract.java: ... @EJB private SellerFacadeLocal sellerFacade; and then public StreamResponse onSubmit() { ... Seller s = sellerFacade.getSeller(code, dealer, comment); there Seller - entity, sellerFacade - stateless bean and sellerFacadeLocal - interface but this doesn't work, i'm getting javax.naming.NotContextException: geronimo/env/mtx.racer.beans.SellerFacade/entityManager so, i'm doing something wrong... any tips or tap5ejb3 examples? -- Pavel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: newbie question about tap5 ejb
AFAIK, You can't use the @EJB annotation outside of an actual bean or class managed by the EJB framework (Tapestry is not). You need to bind to the using a JNDI context - I think the Quickstart example has a good example of using a Tapestry ASO (BeanLocator) for that. Pavel Volkovitskiy wrote: Hello! i'm trying to use ejb3 beans from my tap5 app right now i'm doing: mtx/racer/pages/contract/AddContract.java: ... @EJB private SellerFacadeLocal sellerFacade; and then public StreamResponse onSubmit() { ... Seller s = sellerFacade.getSeller(code, dealer, comment); there Seller - entity, sellerFacade - stateless bean and sellerFacadeLocal - interface but this doesn't work, i'm getting javax.naming.NotContextException: geronimo/env/mtx.racer.beans.SellerFacade/entityManager so, i'm doing something wrong... any tips or tap5ejb3 examples? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: newbie question about tap5 ejb
Yann Ramin wrote: AFAIK, You can't use the @EJB annotation outside of an actual bean or class managed by the EJB framework (Tapestry is not). You need to bind to the using a JNDI context - I think the Quickstart example has a good example of using a Tapestry ASO (BeanLocator) for that. Ok, i'm tried to use it: AddContract.java: SellerFacadeLocal sellerFacade = null; try { InitialContext ctx = new InitialContext(); sellerFacade = (SellerFacadeLocal)ctx.lookup(java:comp/geronimo/env/mtx.racer.beans.SellerFacade); } catch (NamingException e) { return new TextStreamResponse(text/plain, e.toString()); } and i get: javax.naming.NotContextException: geronimo/env/mtx.racer.beans.SellerFacade in geronimo console: Enterprise Applications default/Racer/1191755539379/car EJBModule RacerEJB.jar SessionBeans SellerFacade java:comp/geronimo/env/mtx.racer.beans.SellerFacade/entityManager Pavel Volkovitskiy wrote: Hello! i'm trying to use ejb3 beans from my tap5 app right now i'm doing: mtx/racer/pages/contract/AddContract.java: ... @EJB private SellerFacadeLocal sellerFacade; and then public StreamResponse onSubmit() { ... Seller s = sellerFacade.getSeller(code, dealer, comment); there Seller - entity, sellerFacade - stateless bean and sellerFacadeLocal - interface but this doesn't work, i'm getting javax.naming.NotContextException: geronimo/env/mtx.racer.beans.SellerFacade/entityManager so, i'm doing something wrong... any tips or tap5ejb3 examples?
Re: T5: newbie question about tap5 ejb
Yann Ramin wrote: AFAIK, You can't use the @EJB annotation outside of an actual bean or class managed by the EJB framework (Tapestry is not). You need to bind to the using a JNDI context - I think the Quickstart example has a good example of using a Tapestry ASO (BeanLocator) for that. Ok, i'm tried to use it: AddContract.java: SellerFacadeLocal sellerFacade = null; try { InitialContext ctx = new InitialContext(); sellerFacade = (SellerFacadeLocal)ctx.lookup(java:comp/geronimo/env/mtx.racer.beans.SellerFacade); } catch (NamingException e) { return new TextStreamResponse(text/plain, e.toString()); } and i get: javax.naming.NotContextException: geronimo/env/mtx.racer.beans.SellerFacade in geronimo console: Enterprise Applications default/Racer/1191755539379/car EJBModule RacerEJB.jar SessionBeans SellerFacade java:comp/geronimo/env/mtx.racer.beans.SellerFacade/entityManager Pavel Volkovitskiy wrote: Hello! i'm trying to use ejb3 beans from my tap5 app right now i'm doing: mtx/racer/pages/contract/AddContract.java: ... @EJB private SellerFacadeLocal sellerFacade; and then public StreamResponse onSubmit() { ... Seller s = sellerFacade.getSeller(code, dealer, comment); there Seller - entity, sellerFacade - stateless bean and sellerFacadeLocal - interface but this doesn't work, i'm getting javax.naming.NotContextException: geronimo/env/mtx.racer.beans.SellerFacade/entityManager so, i'm doing something wrong... any tips or tap5ejb3 examples?