Yeah zk uses a lookup which is not standard to get the beanmanager :(
Le 2 sept. 2012 11:37, "Luca Merolla" <[email protected]> a écrit :

> I have tried the CDI Variable Resolver but I get
>
> javax.naming.NameNotFoundException: Name [BeanManager] is not bound in this
> Context. Unable to find [BeanManager].
> org.apache.naming.NamingContext.lookup(NamingContext.java:820)
> org.apache.naming.NamingContext.lookup(NamingContext.java:154)
> org.apache.naming.NamingContext.lookup(NamingContext.java:831)
> org.apache.naming.NamingContext.lookup(NamingContext.java:154)
> org.apache.naming.NamingContext.lookup(NamingContext.java:831)
> org.apache.naming.NamingContext.lookup(NamingContext.java:168)
> org.apache.naming.SelectorContext.lookup(SelectorContext.java:158)
> javax.naming.InitialContext.lookup(InitialContext.java:392)
> org.zkoss.zkplus.cdi.CDIUtil.getBeanManager(CDIUtil.java:52)
> ...
>
> in Tomcat6 + Weld there are some steps to configure
>
> http://blog.zkoss.org/index.php/2010/01/07/integrate-zk-and-jsr-299weld/
>
> I guess there is an eqiuvalent for OpenWebBeans for that
>
> <Resource name="BeanManager" auth="Container"
>         type="javax.enterprise.inject.spi.BeanManager"
>         factory="org.jboss.weld.resources.ManagerObjectFactory"/>
>
>
>
> On Sun, Sep 2, 2012 at 9:26 AM, Romain Manni-Bucau <[email protected]
> >wrote:
>
> >
> >
> http://grepcode.com/file_/repo1.maven.org/maven2/org.zkoss.zk/zkplus/5.0.9/org/zkoss/zkplus/jndi/JndiVariableResolver.java/?v=source
> >
> > Seems the web.xml is not important and that the convention is not the
> > standard or tomee one.
> >
> > The cdiutil class doesn't use the standard too.
> >
> > IMO the faster will be to write a custom resolver.
> >
> > Wdyt?
> > Le 2 sept. 2012 09:19, "Romain Manni-Bucau" <[email protected]> a
> > écrit :
> >
> > > Hmm should work (maybe the bound name is comp/env/accountbeanlocal).
> > >
> > > But why dont you use the cdi variable resolver?
> > >
> > > This way no need of any config in web.xml
> > >
> > > - Romain
> > > Le 2 sept. 2012 01:24, "Luca Merolla" <[email protected]> a
> écrit :
> > >
> > >> Hi,
> > >>
> > >> I have a web application that is using Zkoss framework and the MVVM
> > >> pattern.
> > >> Basically the ViewModel classes (which are pojos)  needs to call some
> > EJBs
> > >> which are inside the same EAR folder.
> > >> In JBoss 7.1 I have configured the application in this way and it's
> > >> working
> > >>
> > >> In web.xml I have all the ejbs declared in this way:
> > >>  <ejb-local-ref>
> > >>     <ejb-ref-name>accountBean</ejb-ref-name>
> > >>     <ejb-ref-type>Session</ejb-ref-type>
> > >>
> <local-home>org.test.common.bean.local.AccountBeanLocal</local-home>
> > >>     <local>org.test.common.bean.local.AccountBeanLocal</local>
> > >>   </ejb-local-ref>
> > >>
> > >> And in the ViewModel classes I use the @WireVariable annotation (from
> ZK
> > >> framework) by simply matching the name and the EJB is bounded
> > >>
> > >> @WireVariable private AccountBeanLocal accountBean;
> > >>
> > >> With the latest TomEE snapshot the EJB is not bounded. I believe
> > >> ejb-local-ref are ignored or simply it does not work in the same way
> as
> > >> JBoss.
> > >> Do you have any advice or alternative solution to this problem?
> > >>
> > >> Thanks in advance,
> > >> Luca
> > >>
> > >
> >
>
>
>
> --
>    *Luca Merolla*
> Management, Business & Technology Consultant
>
>
>  <http://maps.google.com/maps?q=&hl=en>  *Mobile:* +393774569974
> *Email:* [email protected]
>  *http://nl.linkedin.com/in/lucamerolla*
> *Blog <http://lucamerolla.wordpress.com>*
>
>
> Merolla Consulting Limited
>

Reply via email to