You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@openwebbeans.apache.org by Mike Wilson <mi...@hotmail.com> on 2009/02/19 11:34:43 UTC

simple openwebbeans examples?

Hi,

I'm looking for pointers to simple examples on how to use OpenWebBeans
for "servlet only" applications (ie no full JEE stack). Any samples or 
maybe even test cases that would be interesting for me to look at? I'm 
just starting to look at WebBeans so the simpler examples, the better.

I'm considering using OWB in a project as the component layer inside a 
custom web framework, with applications typically running in servlet 
containers like Tomcat and Jetty. My alternative to OWB would be to 
hack up the component layer myself around Guice or Spring IoC.
My requirements on OWB are at the moment quite modest; basically I
would like to try out the bijection and conversation/scoping stuff.

Best regards
Mike Wilson


RE: simple openwebbeans examples?

Posted by Mike Wilson <mi...@hotmail.com>.
Gurkan Erdogdu  wrote on 19 februari 2009 12:48: 

>>The guess example looks like a fairly big example (and not
>>being so acquainted with JSF requires some additional effort
>>to grasp it), and I was looking for something smaller, but 
>>maybe there are not so many more examples of OWB?

No, the guess example is not so big, it is actually so simple. It just use
the JSF+Facelet using with OWB.  

Ah ok, I guess I was struck by all the packages. I'll look into it.

We will create more samples in the coming days. 

Great! FWIW, personally I find it useful to have (in additon to "complete
application" examples) some small examples that demonstrate single features
with just 2-3 classes. (This could also be test cases I guess.)
 
If there is anything extra needed to be done when handling requests yourself
(and not using JSF) then it would be great with an example for that.
 
Best regards
Mike

Re: simple openwebbeans examples?

Posted by Gurkan Erdogdu <gu...@yahoo.com>.
Hi Mike;

You can also download M1-release artifacts from http://apache.org/dist/incubator/openwebbeans/1.0.0-incubating-M1/ and it contains the *guess.war* for quick deployment. You could read the *README file* that is contained in the distribution that explains how to deploy it into the containers.

>>I can see the jetty profile in guess's pom.xml, but starting
>>"guess" from inside Eclipse (Debug on Server, Jetty) doesn't
>>seem to use this profile, so the needed dependencies are not
>>brought in. Do you have some advice for how to activate the
>>jetty profile inside Eclipse?

If you use Tomcat Server in the Eclipse environment, after checking-out the guess samples  , it can be run using the Eclipse "Run-->Run as ...." and using the Tomcat as the server.

>>The guess example looks like a fairly big example (and not
>>being so acquainted with JSF requires some additional effort
>>to grasp it), and I was looking for something smaller, but 
>>maybe there are not so many more examples of OWB?

No, the guess example is not so big, it is actually so simple. It just use the JSF+Facelet using with OWB. We will create more samples in the coming days.

/Gurkan




________________________________
From: Mike Wilson <mi...@hotmail.com>
To: openwebbeans-user@incubator.apache.org
Sent: Thursday, February 19, 2009 1:28:23 PM
Subject: RE: simple openwebbeans examples?

Thanks for the quick reply, Mark! 

> What version of OWB do you use? The one from SVN or the M1?

I have checked out the SVN repo and poked around a bit.

> We recently added a few things to our POMs to support the 
> standalone (JDK + ServletContainers) use case.

That's great!

> Please note that this is not covered by the JSR-299 Spec, so 
> although we try to be as close as possible, it is not an 
> 'official' use case - but it works!

Yes, at the start of my "WebBeans googling" I actually found
this JSR decision but also a comment from Gavin saying that
implementations were free to open up for JavaSE. My next 
googling turned up OWB and the statement that you will be
targeting JavaSE, which made me happy :-).

> What ServletContainer do you like to use?
> 
> Currently we got our samples/guess application running on 
> tomcat-6.0.18 and jetty-6.1-SNAPSHOT.

Those are perfect for me. Normally I use Tomcat 6.

> Are you fit with maven?

Sorry, most of it is still magic for me ;-). That said, I've
managed to import the SVN projects into Eclipse using 
m2eclipse and I now have the guess project in my workspace.

> There are 2 ways to build the sample. Either
> 
> $> mvn clean package
> for J2EE servers who have all the needed stuff already 
> packaged with them or
> 
> $> mvn -Pjetty clean package
> for ServletContainers. If enabling the 'jetty' profile, all 
> necessary dependencies will be packaged into the target/guess.war .

I can see the jetty profile in guess's pom.xml, but starting
"guess" from inside Eclipse (Debug on Server, Jetty) doesn't
seem to use this profile, so the needed dependencies are not
brought in. Do you have some advice for how to activate the
jetty profile inside Eclipse?

The guess example looks like a fairly big example (and not
being so acquainted with JSF requires some additional effort
to grasp it), and I was looking for something smaller, but 
maybe there are not so many more examples of OWB?

> Any questions and feedback is highly welcome, so we can see 
> if there is any problem left :)

Certainly! :-)

Best regards
Mike

> --- Mike Wilson <mi...@hotmail.com> schrieb am Do, 19.2.2009:
> 
> > Von: Mike Wilson <mi...@hotmail.com>
> > Betreff: simple openwebbeans examples?
> > An: openwebbeans-user@incubator.apache.org
> > Datum: Donnerstag, 19. Februar 2009, 11:34
> > Hi,
> > 
> > I'm looking for pointers to simple examples on how to
> > use OpenWebBeans
> > for "servlet only" applications (ie no full JEE
> > stack). Any samples or 
> > maybe even test cases that would be interesting for me to
> > look at? I'm 
> > just starting to look at WebBeans so the simpler examples,
> > the better.
> > 
> > I'm considering using OWB in a project as the component
> > layer inside a 
> > custom web framework, with applications typically running
> > in servlet 
> > containers like Tomcat and Jetty. My alternative to OWB
> > would be to 
> > hack up the component layer myself around Guice or Spring
> > IoC.
> > My requirements on OWB are at the moment quite modest;
> > basically I
> > would like to try out the bijection and
> > conversation/scoping stuff.
> > 
> > Best regards
> > Mike Wilson


      

RE: simple openwebbeans examples?

Posted by Mike Wilson <mi...@hotmail.com>.
Thanks for the quick reply, Mark! 

> What version of OWB do you use? The one from SVN or the M1?

I have checked out the SVN repo and poked around a bit.

> We recently added a few things to our POMs to support the 
> standalone (JDK + ServletContainers) use case.

That's great!

> Please note that this is not covered by the JSR-299 Spec, so 
> although we try to be as close as possible, it is not an 
> 'official' use case - but it works!

Yes, at the start of my "WebBeans googling" I actually found
this JSR decision but also a comment from Gavin saying that
implementations were free to open up for JavaSE. My next 
googling turned up OWB and the statement that you will be
targeting JavaSE, which made me happy :-).

> What ServletContainer do you like to use?
> 
> Currently we got our samples/guess application running on 
> tomcat-6.0.18 and jetty-6.1-SNAPSHOT.

Those are perfect for me. Normally I use Tomcat 6.

> Are you fit with maven?

Sorry, most of it is still magic for me ;-). That said, I've
managed to import the SVN projects into Eclipse using 
m2eclipse and I now have the guess project in my workspace.

> There are 2 ways to build the sample. Either
> 
> $> mvn clean package
> for J2EE servers who have all the needed stuff already 
> packaged with them or
> 
> $> mvn -Pjetty clean package
> for ServletContainers. If enabling the 'jetty' profile, all 
> necessary dependencies will be packaged into the target/guess.war .

I can see the jetty profile in guess's pom.xml, but starting
"guess" from inside Eclipse (Debug on Server, Jetty) doesn't
seem to use this profile, so the needed dependencies are not
brought in. Do you have some advice for how to activate the
jetty profile inside Eclipse?

The guess example looks like a fairly big example (and not
being so acquainted with JSF requires some additional effort
to grasp it), and I was looking for something smaller, but 
maybe there are not so many more examples of OWB?

> Any questions and feedback is highly welcome, so we can see 
> if there is any problem left :)

Certainly! :-)

Best regards
Mike

> --- Mike Wilson <mi...@hotmail.com> schrieb am Do, 19.2.2009:
> 
> > Von: Mike Wilson <mi...@hotmail.com>
> > Betreff: simple openwebbeans examples?
> > An: openwebbeans-user@incubator.apache.org
> > Datum: Donnerstag, 19. Februar 2009, 11:34
> > Hi,
> > 
> > I'm looking for pointers to simple examples on how to
> > use OpenWebBeans
> > for "servlet only" applications (ie no full JEE
> > stack). Any samples or 
> > maybe even test cases that would be interesting for me to
> > look at? I'm 
> > just starting to look at WebBeans so the simpler examples,
> > the better.
> > 
> > I'm considering using OWB in a project as the component
> > layer inside a 
> > custom web framework, with applications typically running
> > in servlet 
> > containers like Tomcat and Jetty. My alternative to OWB
> > would be to 
> > hack up the component layer myself around Guice or Spring
> > IoC.
> > My requirements on OWB are at the moment quite modest;
> > basically I
> > would like to try out the bijection and
> > conversation/scoping stuff.
> > 
> > Best regards
> > Mike Wilson


AW: simple openwebbeans examples?

Posted by Mark Struberg <st...@yahoo.de>.
hi and welcome mike!

What version of OWB do you use? The one from SVN or the M1?
We recently added a few things to our POMs to support the standalone (JDK + ServletContainers) use case.

Please note that this is not covered by the JSR-299 Spec, so although we try to be as close as possible, it is not an 'official' use case - but it works!

What ServletContainer do you like to use?

Currently we got our samples/guess application running on tomcat-6.0.18 and jetty-6.1-SNAPSHOT.

Are you fit with maven?
There are 2 ways to build the sample. Either

$> mvn clean package
for J2EE servers who have all the needed stuff already packaged with them or

$> mvn -Pjetty clean package
for ServletContainers. If enabling the 'jetty' profile, all necessary dependencies will be packaged into the target/guess.war .

Any questions and feedback is highly welcome, so we can see if there is any problem left :)

LieGrue,
strub


--- Mike Wilson <mi...@hotmail.com> schrieb am Do, 19.2.2009:

> Von: Mike Wilson <mi...@hotmail.com>
> Betreff: simple openwebbeans examples?
> An: openwebbeans-user@incubator.apache.org
> Datum: Donnerstag, 19. Februar 2009, 11:34
> Hi,
> 
> I'm looking for pointers to simple examples on how to
> use OpenWebBeans
> for "servlet only" applications (ie no full JEE
> stack). Any samples or 
> maybe even test cases that would be interesting for me to
> look at? I'm 
> just starting to look at WebBeans so the simpler examples,
> the better.
> 
> I'm considering using OWB in a project as the component
> layer inside a 
> custom web framework, with applications typically running
> in servlet 
> containers like Tomcat and Jetty. My alternative to OWB
> would be to 
> hack up the component layer myself around Guice or Spring
> IoC.
> My requirements on OWB are at the moment quite modest;
> basically I
> would like to try out the bijection and
> conversation/scoping stuff.
> 
> Best regards
> Mike Wilson