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

Jaikiran Pai jpai at redhat.com
Tue Jul 5 10:04:40 EDT 2011


Hi Pete,

On Tuesday 05 July 2011 04:17 PM, Pete Muir wrote:
> CDI does not support reading from war/META-INF at all.
>
> Jaikiran, where is this mentioned as a valid location for any meta data in a war?
Sorry about that typo. What I was referring to was .war/WEB-INF as a 
valid metadata location (for example, for ejb-jar.xml).

-Jaikiran




>
> On 5 Jul 2011, at 06:23, Jaikiran Pai wrote:
>
>> 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....
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Antoine SABOT-DURAND
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> seam-dev mailing list
>>>>>>>>> seam-dev at lists.jboss.org
>>>>>>>>> https://lists.jboss.org/mailman/listinfo/seam-dev
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> seam-dev mailing list
>>>>>>>> seam-dev at lists.jboss.org
>>>>>>>> https://lists.jboss.org/mailman/listinfo/seam-dev
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>>
>>> _______________________________________________
>>> seam-dev mailing list
>>> seam-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/seam-dev
>>
>> _______________________________________________
>> seam-dev mailing list
>> seam-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/seam-dev
>



More information about the seam-dev mailing list