[seam-dev] Need advice on what and how to commit new build stuff for the booking sample app on WebSphere v7

Denis Forveille denis.forveille at gmail.com
Mon Jul 27 10:34:12 EDT 2009


Pete,

2009/7/27 Pete Muir <pmuir at redhat.com>

> Hi Denis,
>
> Great work :-)
>
> On 27 Jul 2009, at 09:15, Marek Novotny wrote:
>
>
>> denis.forveille at gmail.com píše v Ne 26. 07. 2009 v 22:12 -0400:
>>
>>> (This is the third try to post this messsage as it seems that the
>>> previous messages didn't go through...)
>>>
>>> Hello,
>>>
>>> In order to help people use Seam on WebSphere, I have currently ready to
>>> be committed, the artifacts to build a functional "booking" application
>>> under WebSphere v7
>>>
>>
> I think the correct place to put this work is for the jee5/booking example,
> not the plain booking example. The jee5 example is a port of the booking
> example to any jee5 server. You'll also find we have WLS, OC4J etc, GFv2
> support there.
>
>  The artifacts are grouped under a "websphere7-resources" directory that
>>> groups the files tailored for WebSphere  v7 and there is a
>>> "build-websphere7.xml" file  to build the ear file.
>>>
>>
>> thanks for that, regarding file and directory names, it should be the
>> same as we have in jpa example -> directory resources-websphere7. build
>> file name is fine.
>>
>
> The correct approach with the jee5/booking example is not to have extra
> resource directories or build scripts, but to add in any changes needed as
> comments, and describe the process in the readme. The aim of this is to show
> how to make an app work on each app server, for people to follow with their
> own application.
>

I understand the concept, but it is quite confusing for the end user:
- There is a "booking"  sample that is dedicated to JBoss. Fine. I will not
change/commit anything there. (The readme shoud state that this sample is
taylored for JBoss and if the user as another AS it should look at the
je55/booking sample instead
- there is a jee5/booking sample which is supposed to be AS "agnostic", but
in fact it's not (eg. the build process included specific JBoss libs, there
are specific lines for OC4J at various places etc..)
- the jpa sample took another approach, ie a resource-per-AS directoy +
abuild file per AS...

On your advice, I could describe what to do to get the
booking/"agnostic-like" app to build and run on WAS, but IMHO as an end user
discovering seam, it is much easier and faster to run a script that builds
the ear file ready-to-be deployed and then inspect what's in the ear to
mimic/adapt their own projects.
If not, i would have to describe the content of two files for the user to
create by hand (copy/paste from the PDF which is tedious and error prone)
and to describe the changes in half a dozen files the user haas to change by
hand (build.xml, persistence.xml etc, component.xml, web.xml etc...) and
also that the content of some files is not optimal for WAS (eg the ejb-ref
in ejb-jar.xml is not necessary for WAS  depending on  how you configure
JNDI for seam etc.., nor the ones in web.xml etc....-or i could just say
"remove those lines-). The procedure will be a list of "add this line to
that file", "remove those set of lines from those files" etc...

Also should I put the WAS specific lines in the files themself (has it has
been partially done for OC4J and GF) ? in this case the todo list would be
something like : "uncomment those lines" instead of "add those lines" but we
will still have the "remove those lines" tasks..

As a compromise, maybe we could have a specific build.xml file per AS
(that's includes all the required lib per AS) and a place to put artifact
(files specific for an AS) that the end-user could copy itself by hand at
the right place before building...but that is very close to have a full
resource-websphere7 + build-websphere7.xml files...

Another point, the je55/booking/build.xml is not up to date (missing slf4j
and still includes cglib, asm etc..) and the content of the META-INF
directory should be split in two: the thing that goes at build time in the
ear file and the files that goes into the ejb-jpa.jar file.

WDYT?

Denis


>
>
>>> With this, this it is just a matter of running the build file, declaring
>>> a connection pool in WebSphere and deploying the ear file on WebSphere
>>> to get the "booking" application running on WebSphere v7
>>>
>>> I plan also to review the section of the doc related to the usage of
>>> seam on WebSphere v7 as what is in there is over-complicated and there
>>> are may errors (and many jar are out opf date with seam 2.2 ...), and
>>> also to include a section on how to configuire JNDI name resolution for
>>> Seam with WebSphere v7 as it seems that many people have problems with
>>> this
>>>
>> Agree, one notice, the refdoc for WAS was last updated for version
>> 2.1.2.CR1.
>>
>>>
>>> Q:
>>> - is the "booking" sample the right example to proposes this kind of
>>> thing?
>>>
>> Originally booking example in jee5 directory was for interoperability
>> with Glassfish, WAS, Weblogic AS etc. Seam is now deployed into JBoss AS
>> 5, which is JEE5 certified, so there is a question if it is still
>> required to have both jee5/booking and booking examples in distribution.
>>
>> Pete and Dan, what do you think?
>>
>
> Yes, let's stick with this for Seam 2.2.
>
>
>>  - should it be better if I move my files from the "booking" sample to
>>> the "je55/booking" sampleand make this work there? what is the
>>> difference between both?
>>>
>>
> Yes, as above, use jee5/booking. The booking example is designed to run
> ootb with no changes on JBoss 5 and Tomcat 6 / embedded - lets keep the
> example simple, for people getting started.
>
>  - is the structured proposed ok? ie the websphere7-resources directory
>>> that contains the files specific to was and the build-webssphere7.xml
>>> (very similar to what is done done in the "jpa" sample app)
>>>
>> As I wrote above, please synchronize the structure with jpa example.
>>
>
> No, use the pattern i describe above for jee5 :-)
>
>
>
>>> I could commit this as soon as v2.2GA is out..
>>>
>>> Thanks
>>> Denis
>>>
>>>
>>> _______________________________________________
>>> seam-dev mailing list
>>> seam-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/seam-dev
>>>
>> --
>> Marek Novotny
>> --
>> JBoss Seam Product Lead
>>
>> Red Hat Czech s.r.o.
>> Purkynova 99
>> 612 45 Brno
>>
>> Email: mnovotny at redhat.com
>> Office phone: +420 532 294 287, ext. 82-62 087
>> mobile: +420 608 509 230
>>
>> ------------------------------------------------------
>> Looking to carve out IT costs?
>> www.europe.redhat.com/promo/carveoutcosts/
>>
>> _______________________________________________
>> seam-dev mailing list
>> seam-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/seam-dev
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/seam-dev/attachments/20090727/549d715b/attachment-0001.html 


More information about the seam-dev mailing list