Hi,

in the latest snapshots I have managed to use Jackson by adding
resources.xml and openejb-jar.xml in WEB-INF.

resources.xml looks like that:

<resources>
  <Service id="jsonProvider"
class-name="org.codehaus.jackson.jaxrs.JacksonJsonProvider" />
  <Service id="jaxbProvider"
class-name="org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider" />
</resources>

And openejb-jar looks like that:

<openejb-jar xmlns="http://www.openejb.org/openejb-jar/1.1";>
<pojo-deployment class-name="org.my.rest.ResourceImpl">
<properties>
cxf.jaxrs.providers = jsonProvider, jaxbProvider
</properties>
</pojo-deployment>
</openejb-jar>

On Wed, Sep 19, 2012 at 9:37 AM, Romain Manni-Bucau
<[email protected]>wrote:

> Hi,
>
> which version? the snapshot should handle it properly bu the configuration
> changed (it was too complicated to use syst prop for real apps)
>
> you need to add in your bean properties in openejb-jar.xml the property
> cxf.jaxrs.providers=jsonJackson
>
> and match the value (you can put several comma separated) in resources.xml
>
> <Resource id="jsonJackson" class-name="..." />
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau*
> *Blog: http://rmannibucau.wordpress.com*
>
>
>
>
> 2012/9/19 qmacpit <[email protected]>
>
> > Hi guys,
> >
> > I've got TomEE+ with Jackon set up as JAX-RS JSON provider. I set it up
> > like
> > this:
> > openejb.cxf.jax-rs.providers =
> > org.codehaus.jackson.jaxrs.JacksonJsonProvider
> > and put Jackson jars to Tomee lib folder
> >
> > Serialization works fine except cases where I try to use Jackson
> > annotations. I ended up with using the simplest cases like @JsonIgnore or
> > @JsonProperty just to see if they work properly. So I have a very simple
> > entity bean with simple Jackson annotations that I try to serialize. The
> > REST response is not affected by annotations at all. I tried the same
> > implementation on JBoss & RESTEasy and it works as expected.
> >
> > The only thing I managed to have working fine on TomEE is Jaxb
> > annotations(like @XmlTransient).
> >
> > Is it a configuration issue? Do I need to set up something else in order
> to
> > have it running?
> > Anyone have it working in Tomee+??? Any feedback much appreciated
> >
> > Cheers,
> > qmacpit
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://openejb.979440.n4.nabble.com/TomEE-Jackson-ignored-annotations-tp4657511.html
> > Sent from the OpenEJB User mailing list archive at Nabble.com.
> >
>

Reply via email to