just qdd InitializeAfterDeployment = true in the router definition

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-06-03 13:55 GMT+02:00 Alex Soto <[email protected]>:

> Ok I have created a resources.xml and everything works perfectly, but
> Person instance is still not injected and its value is null.
>
> Latest code is here: https://github.com/lordofthejars/multi
>
>
> El dt., 2 juny 2015 a les 16:50, Romain Manni-Bucau (<
> [email protected]>)
> va escriure:
>
> > 3 notes:
> >
> > 1. if you let hibernate use the metadata at startup then ensure you have
> a
> > default datasource or just switch it off: <property
> > name="hibernate.temp.use_jdbc_metadata_defaults"
> > value="false" />
> > 2. the injections are not working cause you use a container resource (no
> > application), use resources.xml to get it activated
> > 3. you dont need a server-jar.xml: properties.setProperty("My Router",
> > "new://Resource?class-name=com.scytl.multi.DeterminedRouter");
> >
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <http://rmannibucau.wordpress.com> | Github <
> > https://github.com/rmannibucau> |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > <http://www.tomitribe.com>
> >
> > 2015-06-02 16:35 GMT+02:00 Alex Soto <[email protected]>:
> >
> > > Yes I am using 4.7.2, but it is not working. You can try it, the
> project
> > is
> > > here: https://github.com/lordofthejars/multi
> > >
> > > El dt., 2 juny 2015 a les 16:13, Romain Manni-Bucau (<
> > > [email protected]>)
> > > va escriure:
> > >
> > > > Hi Alex
> > > >
> > > > Use 4.7.2
> > > > Le 2 juin 2015 03:16, "Alex Soto" <[email protected]> a écrit :
> > > >
> > > > > Hi I am developing a Dynamic datasource routing component. I am
> using
> > > > > OpenEJB 4.7.1 for testing and I have seen that AbstractRoutes are
> not
> > > CDI
> > > > > aware.  Basically I have tried to inject a simple POJO but the
> > instance
> > > > is
> > > > > null. I have the beans.xml in src/main/resources/META-INF so CDI is
> > > > > enabled.
> > > > >
> > > > > Maybe this inner components are no CDI by default, any ideas?
> > > > >
> > > >
> > >
> >
>

Reply via email to