johnzon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: Non-CDI johnzon-jsonb jar?
Date Sat, 24 Jun 2017 12:25:06 GMT
Ok so just checked and all the cdi API usage is not mandatory at runtime so
if loading fails it is skipped making it OSGi compatible updating metadata.


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-06-24 14:18 GMT+02:00 James Carman <james@carmanconsulting.com>:

> Well, it looks like we appear to attempt to use reflection.  The
> BeanManager is typed as Object.  However, the CDIs class has a hard
> reference to the BeanManager class, so that goes right out the window. :(
>
>
> On Sat, Jun 24, 2017 at 8:14 AM Romain Manni-Bucau <rmannibucau@gmail.com>
> wrote:
>
> > Should be done by reflection - think we do for cdi 1.1 but we surefy
> didnt
> > for 1.0 - to detect it then we can have a cdi instance provider with the
> > api being optional
> >
> > Le 24 juin 2017 14:03, "James Carman" <james@carmanconsulting.com> a
> > écrit :
> >
> > > Unfortunately, the JohnzonBuilder class appears to use the CDI stuff
> > > in-line.  Merely marking it optional won't work I don't think (so much
> > for
> > > my PR). :(
> > >
> > > On Sat, Jun 24, 2017 at 3:21 AM Romain Manni-Bucau <
> > rmannibucau@gmail.com>
> > > wrote:
> > >
> > > > We can just make it optional in the manifest. We shouldnt have cdi
> > being
> > > > mandatory even for the standalone case.
> > > >
> > > > Le 24 juin 2017 06:48, "James Carman" <james@carmanconsulting.com>
a
> > > > écrit :
> > > >
> > > > > I noticed in the MANIFEST.MF file for johnzon-jsonb that we have:
> > > > >
> > > > > Import-Package:
> > > > > javax.enterprise.context.spi;version="[1.0,2)",javax.
> > > > > enterprise.event;version="[1.0,2)",javax.enterprise.inject.
> > > > > spi;version="[1.0,2)"...
> > > > >
> > > > > While it's nice that it supports CDI and all, I think that's too
> > > > > heavy-handed for general purpose usage.  I don't want to have to
> load
> > > up
> > > > > CDI just to be able to load Johnzon into my OSGi container.
> Perhaps
> > we
> > > > can
> > > > > break the CDI support into a separate jar?
> > > > >
> > > > > James
> > > > >
> > > >
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message