[seam-dev] Issue resolved with JBoss AS 7 CR1 and Seam Social

Mark Struberg struberg at yahoo.de
Tue Jul 5 03:48:43 EDT 2011


JSR-299 section 12.1

> A directory in the JVM classpath is a bean archive if it has a 
> file named beans.xml in the META-INF directory.

And since WEB-INF/classes of a WAR is a JVM classpath directory...

LieGrue,
strub


--- On Tue, 7/5/11, Jaikiran Pai <jpai at redhat.com> wrote:

> From: Jaikiran Pai <jpai at redhat.com>
> Subject: Re: [seam-dev] Issue resolved with JBoss AS 7 CR1 and Seam Social
> To: "Mark Struberg" <struberg at yahoo.de>
> Cc: seam-dev at lists.jboss.org
> Date: Tuesday, July 5, 2011, 7:39 AM
> On Tuesday 05 July 2011 01:04 PM,
> Mark Struberg wrote:
> > Jaikiran, _why_ should WEB-INF/classes/META-INF be an
> invalid directory?
> >
> > WEB-INF/classes is definitely a valid class filepath.
> Thus a META-INF inside is valid. This works in every spec
> and on every EE server I know.
> Except for the JPA spec, none of the other specs mention
> that as a 
> metadata location. May be I'm missing some spec? Which
> other spec uses 
> this location? I agree that WEB-INF/classes is a valid
> class filepath, 
> but that doesn't mean that META-INF inside it should be
> valid, does it?
> 
> -Jaikiran
> >
> > LieGrue,
> > strub
> >
> > --- On Tue, 7/5/11, Jaikiran Pai<jpai at redhat.com> wrote:
> >
> >> From: Jaikiran Pai<jpai at redhat.com>
> >> Subject: Re: [seam-dev] Issue resolved with JBoss
> AS 7 CR1 and Seam Social
> >> To: seam-dev at lists.jboss.org
> >> Date: Tuesday, July 5, 2011, 5:23 AM
> >> Indeed, WEB-INF/classes/META-INF is
> >> *not* a valid location for metadata
> >> files like this one. WEB-INF/classes/META-INF is
> meant only
> >> for
> >> persistence.xml (for some reason the JPA spec
> mandated this
> >> location).
> >> The right place for the metadata file is
> .war/META-INF. AS7
> >> infact logs
> >> a WARN message if it sees any file other than
> >> persistence.xml in the
> >> WEB-INF/classes/META-INF folder. I guess you are
> seeing
> >> that WARN in the
> >> logs/console, aren't you?
> >>
> >> -Jaikiran
> >> On Tuesday 05 July 2011 01:21 AM, Pete Muir
> wrote:
> >>> I would somewhat expect this -
> >> WEB-INF/classes/META-INF is not a valid location
> for
> >> beans.xml to activate CDI services for a war - AS6
> used to
> >> do it as a spec extension. Now, why the libraries
> are
> >> activated for the war, but the actual war isn't on
> AS7 is
> >> quite weird, and one for Stuart to take a look
> at.
> >>>
> >>> On 4 Jul 2011, at 20:32, Antoine Sabot-Durand
> wrote:
> >>>
> >>>> In /WEB-INF/classes/META-INF
> >>>>
> >>>> Antoine
> >>>>
> >>>> Le 4 juil. 2011 à 20:57, Pete Muir a
> écrit :
> >>>>
> >>>>> Sounds odd - in this case where
> exactly in
> >> beans.xml? /META-INF or
> /WEB-INF/classes/META-INF?
> >>>>>
> >>>>> But Stuart will know the exact problem
> ;-)
> >>>>>
> >>>>> On 4 Jul 2011, at 19:51, Antoine
> Sabot-Durand
> >> wrote:
> >>>>>
> >>>>>> I understand, but my question was
> : is it
> >> normal when beans.xml is in META-INF that CDI
> beans are
> >> instantiated (i.e. I see Seam Config and Seam
> Social
> >> Extensions log messages) but that those Beans are
> not
> >> available for JSF views. It looks like a bug for
> me....
> >> Should I use seam-beans.xml instead ?
> >>>>>>
> >>>>>> Antoine
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> Le 4 juil. 2011 à 20:30, Pete
> Muir a
> >> écrit :
> >>>>>>
> >>>>>>> I believe Stuart intended to
> make it
> >> work in WEB-INF, but there are a lot of issues
> with loading
> >> it from there, largely because there is no
> guarantee that
> >> the Servlet container has started when Seam Config
> is
> >> started. And Java EE itself offers to API to read
> from the
> >> web root.
> >>>>>>>
> >>>>>>> This is resolved in CDI 1.1 as
> we
> >> offer the ability to read the .xml files as an
> InputStream
> >> using the ProcessModule event on startup.
> >>>>>>>
> >>>>>>> On 4 Jul 2011, at 18:21, Jason
> Porter
> >> wrote:
> >>>>>>>
> >>>>>>>> The suggested file is
> >> sem-beans.XML in the place you put it, but in
> short, yes, I
> >> believe this is expected.
> >>>>>>>>
> >>>>>>>> Sent from my iPhone
> >>>>>>>>
> >>>>>>>> On Jul 4, 2011, at 8:20,
> Antoine
> >> Sabot-Durand<antoine at sabot-durand.net> 
> >> wrote:
> >>>>>>>>
> >>>>>>>>> Hi all,
> >>>>>>>>>
> >>>>>>>>> Just to let you know I
> managed
> >> to run social Web App example with Jboss 7-CR1.
> The trick
> >> was to have 2 beans.xml file. One in META-INF for
> >> Seam-Config to read beans configuration and one in
> WEB-INF
> >> in order to having the server exposing CDI bean
> for JSF
> >> view. I drop the Seam-Faces and its dependency
> >> Seam-International since I don't need them and
> they cashed
> >> the deployment.
> >>>>>>>>>
> >>>>>>>>> If I put config info
> in
> >> WEB-INF/beans.xml, Seam-Config doesn't read them
> and if I
> >> don't put beans.xml in WEB-INF my JSF views don't
> access CDI
> >> bean (LE doesn't trigger any code). I don't know
> if it's the
> >> expected behavior for Seam-Config to read
> beans.xml only in
> >> META-INF....
> >>>>>>>>>



More information about the seam-dev mailing list