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

On 27 Jul 2009, at 15:34, Denis Forveille wrote:

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

Agreed, can you add this?

OK.
 


- 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,

Like?

jboss-common-core.jar  and concurrent.jar


there are specific lines for OC4J at various places etc..)

Sure, if you look at the readme, you'll see that it tells you to uncomment certain lines to add dependencies needed by other app servers. At the end of the day, no app server can run an app "unmodified".

Sure.


- 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.

Yes, I personally prefer this approach.

What do others think?

OK. I will provides entries commented in the files and describe what to remove/uncomment to have the app works with WAS v7


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...

Well, I would suggest including instructions for getting it working with minimal changes in the readme. You can add a comment to the specifc file like <!-- Not required in WAS 7 -->, and write in the ref guide that you don't need these (but they don't hurt) etc.

But as this sample is likely the application people start with, IMHO it would be better to have an application that shows the "best way to run  Seam on your AS".
eg, in the doc I will describe three ways to configure the application to let Seam smoothy find the beans in the JNDI WAS namespace. If I give instructions to modify the sample app "with minimal changes" (see your comment below) to run on WAS, it will use the worse way (IMO) to do it (ie maintain the ejb3 ref in the config files) and people will build their apps on this without any real sample app that will use the best approach.
If you are OK with it, for WAS, I will give instructions to build the booking application and get the "best way to run Seam on WAS v7", this will include a few extra steps (like remove the ejb-ref 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..

Exactly, that is the scheme.



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...

Right, if we change, IMO it should be to the jpa scheme.



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.

Ok, can you update this?

OK.