You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Forrest Xia <fo...@gmail.com> on 2010/04/06 05:18:31 UTC

About G3.0 Java EE 6 Samples

Hi All,

We prepared some samples regarding Jave EE 6 new features, so far including
these:
1. WebFragment
Description:
This sample demonstrate define new features of servlet 3.0 like
web-fragment.xml and use jars with web-fragment.xml
_____________________________________________________________
2. JPASample
Description:
This sample demonstrate Criteria API in JPA 2.O.
It includes CRUD operations for messages. Also provide rank query for
messages.
It's also a war-based EJB application,all EJB classes are under
WEB-INF/classes directory of the web project.
_____________________________________________________________
3. MultipartFile
Description:
This file upload system demonstrate Part attribute in servlet 3.0.
_____________________________________________________________
4. Converter
Description:
This is a simple example demonstrate JSF2.0 with AJAX.
_____________________________________________________________
5. Calculator
Description:
This is a simple example demonstrate Singleton Session Bean of EJB3.1

_____________________________________________________________
6. CustomerDB
Description:
This example demonstrate RESTful Service.
_____________________________________________________________
7. helloWorld
Description:
This example demonstrate annotations for servlets,filters and listeners in
servlet 3.0.
_____________________________________________________________
8. JSPResource
Description:
This example demonstrate a servlet 3.0 feature.Resource under
META-INF/resources of jar file can be used as they are in the root directory
if the jar file is put inside application's WEB-INF/lib directory.
_____________________________________________________________
9. Cviewer
Description:
This example demonstrate a servlet 3.0 feature.We can programmatically
register servlets,filters .
_____________________________________________________________
10. embeddedEJBTimer
Description:
This is a simple example demonstrate EJB3.1 feature:get a EJB Container from
Embedded API.
________________________________________________________________________________________________

I would like to contribute them to G samples trunk. However, I have some
rough idea about how to deal with them in samples trunk code base:
1. Do we need to name a Java EE 6 subproject under samples directory and put
all of these into the subproject like this?
.
|-- LICENSE
|-- NOTICE
|-- buildutil
|-- geronimo-samples-archetype
|-- pom.xml
|-- samples
|   |-- DataCDInfo
|   |-- all-samples
|   |-- app-per-port
|   |-- async-http
|   |-- bank
|   |-- calculator
|   |-- csa-activemq
|   |-- customer
|   |-- dbtester
|   |-- inventory
|   |-- jaxws-calculator
|   |-- jms-mdb
|   |-- jsp-examples
|   |-- ldap-sample-app
|   |-- myphonebook
|   |-- mytime
|   |-- pom.xml
|   |-- sample-datasource
|   |-- sendmail
|   |-- servlet-examples
|   |-- timereport
*|   `--JavaEE6
|        |--Converter
|        |--...*
`-- src
    `-- site

Or just add them directly under samples? As you can see that some Java EE 6
samples are based on existing ones(such as calculator). I personally prefer
the former, since it gives user a clear view about where to look for Java EE
6 samples.

2. Shall we turn all of these samples into OSGi bundles? or just make Java
EE 6 ones as bundles and keep existing ones unchanged?

Please let me know your thoughts.

Best regards,
Forrest

Re: About G3.0 Java EE 6 Samples

Posted by Forrest Xia <fo...@gmail.com>.
On Wed, Apr 7, 2010 at 11:26 AM, Jack Cai <gr...@gmail.com> wrote:

>
>  > Or just add them directly under samples? As you can see that some Java
>>> EE 6 samples are based on existing ones(such as calculator). I personally
>>> prefer the former, since it gives user a clear view about where to look for
>>> Java EE 6 samples.
>>>
>>>
>>> Donald's list/grouping seems reasonable. Although I'm not sure that we
>>> have to provide redundant EE5 samples to demonstrate compatibility...
>>>
>>
>> Yes, agreed.
>>
>>
> Maybe we just simply state in a readme file that all Java EE 5 samples also
> work with G 3.0, instead of duplicating them?
>
OK, we shall try to avoid duplication. But for simplicity and comparation
reason, some duplications are intended to show the diff between ee 5 and 6.


> -Jack
>
>
Forrest

Re: About G3.0 Java EE 6 Samples

Posted by Jack Cai <gr...@gmail.com>.
> > Or just add them directly under samples? As you can see that some Java EE
>> 6 samples are based on existing ones(such as calculator). I personally
>> prefer the former, since it gives user a clear view about where to look for
>> Java EE 6 samples.
>>
>>
>> Donald's list/grouping seems reasonable. Although I'm not sure that we
>> have to provide redundant EE5 samples to demonstrate compatibility...
>>
>
> Yes, agreed.
>
>
Maybe we just simply state in a readme file that all Java EE 5 samples also
work with G 3.0, instead of duplicating them?

-Jack

Re: About G3.0 Java EE 6 Samples

Posted by Forrest Xia <fo...@gmail.com>.
On Tue, Apr 6, 2010 at 8:13 PM, Donald Woods <dw...@apache.org> wrote:

> How about under samples/ splitting them into the 3 major themes -
>    javaee5 - previous samples to show compatibility/migration
>    javaee6 - new samples using new EE 6 features (like JPA2, EJB 3.1
>              lite, Servlet 3.0, ....)
>    osgi - new samples showing how to use EBA and OSGi
>    daytrader - finally move Daytader back into samples :-)
>

Good suggestion, I think this layout is more reasonable than what I
proposed, and I will make that layout changes.

On Wed, Apr 7, 2010 at 12:49 AM, Kevan Miller <ke...@gmail.com>wrote:

>
> On Apr 5, 2010, at 11:18 PM, Forrest Xia wrote:
>
> > Hi All,
> >
> > We prepared some samples regarding Jave EE 6 new features, so far
> including these:
>
> Hi Forrest,
> Cool. It's not quite clear to me how much work has been done and who has
> done the work. I'm now wondering if this is significant enough that it
> should be a software grant. Perhaps you can create  Jira and post as a
> patch?
>
The list is what we are thinking and doing, frankly speaking, some of them
are almost done, some are not. Next, let's open some jiras to track the
progress.


> <snip>
>
> >
> > Or just add them directly under samples? As you can see that some Java EE
> 6 samples are based on existing ones(such as calculator). I personally
> prefer the former, since it gives user a clear view about where to look for
> Java EE 6 samples.
>
>
> Donald's list/grouping seems reasonable. Although I'm not sure that we have
> to provide redundant EE5 samples to demonstrate compatibility...
>

Yes, agreed.

>
> >
> > 2. Shall we turn all of these samples into OSGi bundles? or just make
> Java EE 6 ones as bundles and keep existing ones unchanged?
>
> We need to be clear to our users that they do not need to turn EE artifacts
> into bundles. We should also provide samples that demonstrate some of the
> advantages/alternatives of OSGi.
>
> --kevan

Yes, we shall provide some samples for OSGi support of G3.0. As for Java EE
6 samples, we won't make them as bundles.

Forrest

Re: About G3.0 Java EE 6 Samples

Posted by Kevan Miller <ke...@gmail.com>.
On Apr 5, 2010, at 11:18 PM, Forrest Xia wrote:

> Hi All,
> 
> We prepared some samples regarding Jave EE 6 new features, so far including these:

Hi Forrest,
Cool. It's not quite clear to me how much work has been done and who has done the work. I'm now wondering if this is significant enough that it should be a software grant. Perhaps you can create  Jira and post as a patch?

<snip>

> 
> Or just add them directly under samples? As you can see that some Java EE 6 samples are based on existing ones(such as calculator). I personally prefer the former, since it gives user a clear view about where to look for Java EE 6 samples.


Donald's list/grouping seems reasonable. Although I'm not sure that we have to provide redundant EE5 samples to demonstrate compatibility... 

> 
> 2. Shall we turn all of these samples into OSGi bundles? or just make Java EE 6 ones as bundles and keep existing ones unchanged?

We need to be clear to our users that they do not need to turn EE artifacts into bundles. We should also provide samples that demonstrate some of the advantages/alternatives of OSGi. 

--kevan

Re: About G3.0 Java EE 6 Samples

Posted by Forrest Xia <fo...@gmail.com>.
On Wed, Apr 7, 2010 at 1:07 PM, Forrest Xia <fo...@gmail.com> wrote:

>
>
> On Wed, Apr 7, 2010 at 11:39 AM, Jarek Gawor <jg...@gmail.com> wrote:
>
>> Personally, I think it would be nicer to have less but more
>> comprehensive samples. For example, to me 1, 3, 7, 8, and 9 could
>> probably be combined into one (or two) nice samples.
>
> Good suggestion, I will try to combine them.
>

After reconsideration of current status of Geronimo, I would prefer to
separate these samples for now, it would be easier to demo/try partially
available java ee 6 new features. One day the full java ee 6 support is
achieved, let's do the combination then.


>
>
>> I would be much
>> more interested to see all these samples as actual test suites. We
>> need more tests.
>>
> OK, I will try to turn some into the test suite.
>
>
>>
>> Jarek
>>
>>
>> Forrest
>
>

Re: About G3.0 Java EE 6 Samples

Posted by Forrest Xia <fo...@gmail.com>.
On Wed, Apr 7, 2010 at 11:39 AM, Jarek Gawor <jg...@gmail.com> wrote:

> Personally, I think it would be nicer to have less but more
> comprehensive samples. For example, to me 1, 3, 7, 8, and 9 could
> probably be combined into one (or two) nice samples.

Good suggestion, I will try to combine them.


> I would be much
> more interested to see all these samples as actual test suites. We
> need more tests.
>
OK, I will try to turn some into the test suite.


>
> Jarek
>
>
> Forrest

Re: About G3.0 Java EE 6 Samples

Posted by Jarek Gawor <jg...@gmail.com>.
Personally, I think it would be nicer to have less but more
comprehensive samples. For example, to me 1, 3, 7, 8, and 9 could
probably be combined into one (or two) nice samples. I would be much
more interested to see all these samples as actual test suites. We
need more tests.

Jarek

On Mon, Apr 5, 2010 at 11:18 PM, Forrest Xia <fo...@gmail.com> wrote:
> Hi All,
>
> We prepared some samples regarding Jave EE 6 new features, so far including
> these:
> 1. WebFragment
> Description:
> This sample demonstrate define new features of servlet 3.0 like
> web-fragment.xml and use jars with web-fragment.xml
> _____________________________________________________________
> 2. JPASample
> Description:
> This sample demonstrate Criteria API in JPA 2.O.
> It includes CRUD operations for messages. Also provide rank query for
> messages.
> It's also a war-based EJB application,all EJB classes are under
> WEB-INF/classes directory of the web project.
> _____________________________________________________________
> 3. MultipartFile
> Description:
> This file upload system demonstrate Part attribute in servlet 3.0.
> _____________________________________________________________
> 4. Converter
> Description:
> This is a simple example demonstrate JSF2.0 with AJAX.
> _____________________________________________________________
> 5. Calculator
> Description:
> This is a simple example demonstrate Singleton Session Bean of EJB3.1
>
> _____________________________________________________________
> 6. CustomerDB
> Description:
> This example demonstrate RESTful Service.
> _____________________________________________________________
> 7. helloWorld
> Description:
> This example demonstrate annotations for servlets,filters and listeners in
> servlet 3.0.
> _____________________________________________________________
> 8. JSPResource
> Description:
> This example demonstrate a servlet 3.0 feature.Resource under
> META-INF/resources of jar file can be used as they are in the root directory
> if the jar file is put inside application's WEB-INF/lib directory.
> _____________________________________________________________
> 9. Cviewer
> Description:
> This example demonstrate a servlet 3.0 feature.We can programmatically
> register servlets,filters .
> _____________________________________________________________
> 10. embeddedEJBTimer
> Description:
> This is a simple example demonstrate EJB3.1 feature:get a EJB Container from
> Embedded API.
> ________________________________________________________________________________________________
>
> I would like to contribute them to G samples trunk. However, I have some
> rough idea about how to deal with them in samples trunk code base:
> 1. Do we need to name a Java EE 6 subproject under samples directory and put
> all of these into the subproject like this?
> .
> |-- LICENSE
> |-- NOTICE
> |-- buildutil
> |-- geronimo-samples-archetype
> |-- pom.xml
> |-- samples
> |   |-- DataCDInfo
> |   |-- all-samples
> |   |-- app-per-port
> |   |-- async-http
> |   |-- bank
> |   |-- calculator
> |   |-- csa-activemq
> |   |-- customer
> |   |-- dbtester
> |   |-- inventory
> |   |-- jaxws-calculator
> |   |-- jms-mdb
> |   |-- jsp-examples
> |   |-- ldap-sample-app
> |   |-- myphonebook
> |   |-- mytime
> |   |-- pom.xml
> |   |-- sample-datasource
> |   |-- sendmail
> |   |-- servlet-examples
> |   |-- timereport
> |   `--JavaEE6
> |        |--Converter
> |        |--...
> `-- src
>     `-- site
>
> Or just add them directly under samples? As you can see that some Java EE 6
> samples are based on existing ones(such as calculator). I personally prefer
> the former, since it gives user a clear view about where to look for Java EE
> 6 samples.
>
> 2. Shall we turn all of these samples into OSGi bundles? or just make Java
> EE 6 ones as bundles and keep existing ones unchanged?
>
> Please let me know your thoughts.
>
> Best regards,
> Forrest
>

Re: About G3.0 Java EE 6 Samples

Posted by Donald Woods <dw...@apache.org>.
How about under samples/ splitting them into the 3 major themes -
    javaee5 - previous samples to show compatibility/migration
    javaee6 - new samples using new EE 6 features (like JPA2, EJB 3.1
              lite, Servlet 3.0, ....)
    osgi - new samples showing how to use EBA and OSGi
    daytrader - finally move Daytader back into samples :-)


-Donald


On 4/5/10 11:18 PM, Forrest Xia wrote:
> Hi All,
> 
> We prepared some samples regarding Jave EE 6 new features, so far
> including these:
> 1. WebFragment
> Description:
> This sample demonstrate define new features of servlet 3.0 like
> web-fragment.xml and use jars with web-fragment.xml
> _____________________________________________________________
> 2. JPASample
> Description:
> This sample demonstrate Criteria API in JPA 2.O.
> It includes CRUD operations for messages. Also provide rank query for
> messages.
> It's also a war-based EJB application,all EJB classes are under
> WEB-INF/classes directory of the web project.
> _____________________________________________________________
> 3. MultipartFile
> Description:
> This file upload system demonstrate Part attribute in servlet 3.0.
> _____________________________________________________________
> 4. Converter
> Description:
> This is a simple example demonstrate JSF2.0 with AJAX.
> _____________________________________________________________
> 5. Calculator
> Description:
> This is a simple example demonstrate Singleton Session Bean of EJB3.1
> 
> _____________________________________________________________
> 6. CustomerDB
> Description:
> This example demonstrate RESTful Service.
> _____________________________________________________________
> 7. helloWorld
> Description:
> This example demonstrate annotations for servlets,filters and listeners
> in servlet 3.0.
> _____________________________________________________________
> 8. JSPResource
> Description:
> This example demonstrate a servlet 3.0 feature.Resource under
> META-INF/resources of jar file can be used as they are in the root
> directory if the jar file is put inside application's WEB-INF/lib directory.
> _____________________________________________________________
> 9. Cviewer
> Description:
> This example demonstrate a servlet 3.0 feature.We can programmatically
> register servlets,filters .
> _____________________________________________________________
> 10. embeddedEJBTimer
> Description:
> This is a simple example demonstrate EJB3.1 feature:get a EJB Container
> from Embedded API.
> ________________________________________________________________________________________________
> 
> I would like to contribute them to G samples trunk. However, I have some
> rough idea about how to deal with them in samples trunk code base:
> 1. Do we need to name a Java EE 6 subproject under samples directory and
> put all of these into the subproject like this?
> .
> |-- LICENSE
> |-- NOTICE
> |-- buildutil
> |-- geronimo-samples-archetype
> |-- pom.xml
> |-- samples
> |   |-- DataCDInfo
> |   |-- all-samples
> |   |-- app-per-port
> |   |-- async-http
> |   |-- bank
> |   |-- calculator
> |   |-- csa-activemq
> |   |-- customer
> |   |-- dbtester
> |   |-- inventory
> |   |-- jaxws-calculator
> |   |-- jms-mdb
> |   |-- jsp-examples
> |   |-- ldap-sample-app
> |   |-- myphonebook
> |   |-- mytime
> |   |-- pom.xml
> |   |-- sample-datasource
> |   |-- sendmail
> |   |-- servlet-examples
> |   |-- timereport
> *|   `--JavaEE6
> |        |--Converter
> |        |--...*
> `-- src
>     `-- site
> 
> Or just add them directly under samples? As you can see that some Java
> EE 6 samples are based on existing ones(such as calculator). I
> personally prefer the former, since it gives user a clear view about
> where to look for Java EE 6 samples.
> 
> 2. Shall we turn all of these samples into OSGi bundles? or just make
> Java EE 6 ones as bundles and keep existing ones unchanged?
> 
> Please let me know your thoughts.
> 
> Best regards,
> Forrest