[weld-dev] (embedded JBoss plugin?) Re: persistence and transactions outside Java EE

Andrew Lee Rubinger andrew.rubinger at redhat.com
Mon Nov 30 11:43:10 EST 2009


Great discussion.

An overview of the current state of things:

We are on the cusp of releasing an end-user API for limited 
configuration, deployment, and lifecycle of the Application Server[1]. 
This is intended to help testing on two fronts:

1) Make integration tests against AS easy to write
2) Run from a JavaSE environment, encouraging automation and making the 
tests easier to run

The Maven2 steps outlined in the EmbeddedAS Wiki now refer to:

* Setting up the dependency chain
* Installing AS under "target"
* Setting JBOSS_HOME
* Using appropriate JVM arguments for Surefire to point to Endorsed, 
bump the heap/permgen, etc.

...absent from these is starting the Application Server or doing any 
deployment.  That is left up to the user to do manually via the API in a 
@BeforeClass/@Test.  Alternatively you may leverage the Arquillian 
project[2] to handle server start and deployments for you (== even less 
boilerplate).

On the roadmap is to build a Maven2 Plugin above this such that we may 
tie testing into the build lifecycle similarly to "jetty:run" or the 
Cargo/Glassfish equivalents.  In this regard I'm very open to community 
contributors, and I've started some preliminary discussions with Adrian 
Cole (in CC, of Cargo and jclouds fame) to this end.

At the moment I have a prototype of a very working but undocumented 
thing called the "JBossAS Control Plugin"[3].  This currently uses the 
old mechanism of starting AS in its own process; an example of its 
configuration is in this POM[4] from its testsuite.

References:

[1] http://www.jboss.org/community/docs/DOC-13843
[2] http://www.jboss.org/community/docs/DOC-14376
[3] http://anonsvn.jboss.org/repos/maven/plugins/jbossas/trunk/
[4] 
http://anonsvn.jboss.org/repos/maven/plugins/jbossas/trunk/example/pom.xml

On 11/26/2009 07:00 AM, Pete Muir wrote:
> Add the right Andrew :-)
>
> On 26 Nov 2009, at 04:44, Steven Boscarine wrote:
>
>> Hello Andrew
>> I looked at the page, but haven't yet stepped through the source code.
>>
>> Is there a means of launching the plugin outside of an integration test?
>>
>> Does this use JBoss6?
>>
>> I am trying to get a JEE equivalent of Jetty's behavior when you launch
>> 'mvn jetty:run'
>>
>> Thanks,
>> Steven
>>
>> Dan Allen wrote:
>>> Great points Steven.
>>>
>>> Btw, just to add to this discussion, Andrew Rubinger (who we just call
>>> ALR) just informed me of progress on running embedded JBoss from
>>> Maven. I haven't tried it yet because I am currently preparing for JSF
>>> Summit, but perhaps you'll have a chance to stomp on it after getting
>>> some turkey, Steven. Or anyone else.
>>>
>>> http://www.jboss.org/community/wiki/JBossEmbeddedASAutomationviaMaven
>>>
>>> It would be great to provide ALR with feedback early so that we can
>>> get this right.
>>>
>>> -Dan
>>>
>>>
>>>
>>> On Wed, Nov 25, 2009 at 10:54 PM, Steven Boscarine
>>> <steven.boscarine at childrens.harvard.edu
>>> <mailto:steven.boscarine at childrens.harvard.edu>>  wrote:
>>>
>>>     Dan Allen wrote:
>>>
>>>         You are correct that for various reasons, many developers are
>>>         fixated on Tomcat and Jetty. However, I do believe that if
>>>         there are embeddable Java EE alternatives, such as Embedded
>>>         JBoss AS, then the grip on servlet containers will loosen.
>>>
>>>     I agree with Dan very strongly.  The sooner there's a JEE6
>>>     container that can be launched from maven, like Jetty or Tomcat
>>>     can now, the "stickier" JEE6 will become and adoption rates will
>>>     increase.
>>>     The more steps in an evaluation that cannot be scripted the
>>>     greater chance that the user will either make a mistake or find
>>>     something else to do, like get back to work.  :)
>>>
>>>     IMO, a key group of developers you'd want to target are very busy
>>>     people.  For many of them, when they are evaluating new software,
>>>     it is often at the expense of tasks that their management thinks
>>>     is of higher priority.  When they are checking out Weld or JSF2,
>>>     they're often not doing what their manager wants them to do.
>>>     If we make evaluating a technology easy and pleasant, I think
>>>     they'll be more likely to want to go further and adopt the
>>>     technology, tell their friends, train coworkers, contribute,
>>>     schedule training, buy books, buy support contracts, hire
>>>     consultants, etc.  In my experience, busy developers are often
>>>     employed by successful companies who have reasonable budgets.  If
>>>     the getting started procedure is frustrating, I think they're more
>>>     likely to stop playing with new technology and just continue using
>>>     their current technology (like struts or even pure JSP +
>>>     Servlets), get back to work, etc.
>>>     Currently, GlassFish v3 can be launched from Maven, but it was a
>>>     side project by Koshuke Kawaguchi
>>>     http://weblogs.java.net/blog/2008/04/28/glassfish-v3-just-got-embeddable
>>>      It is not as well documented as Jetty and doesn't auto-deploy
>>>     modified classes.  It even shares the same plugin name (but
>>>     different package) as the official Glassfish plugin which controls
>>>     a locally installed plugin, making the plugin very confusing.
>>>     I heard a rumor JBoss is working on an embeddable version of
>>>     JBossAS which will have a maven plugin which will download and run
>>>     a container like the Tomcat plugin.  The instant it resembles a
>>>     working product, I'll happily include it in the archetypes as I
>>>     think it'll go a long way towards increasing JEE6 adoption.  It'll
>>>     make writing applications much easier for the user and make
>>>     documenting how to get started a breeze for contributers like me.
>>>     Thanks,
>>>     Steven
>>>
>>>     PS-If anyone hasn't yet used the Tomcat/Jetty/Glassfish plugins, I
>>>     have an old blog post explaining how to use them here:
>>>      http://info.rmatics.org/2009/04/02/increasing-your-productivity-by-using-an-embedded-container-in-maven/
>>>
>>>
>>>
>>>
>>> --
>>> Dan Allen
>>> Senior Software Engineer, Red Hat | Author of Seam in Action
>>> Registered Linux User #231597
>>>
>>> http://mojavelinux.com
>>> http://mojavelinux.com/seaminaction
>>> http://www.google.com/profiles/dan.j.allen
>>
>> _______________________________________________
>> weld-dev mailing list
>> weld-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/weld-dev
>

-- 
Andrew Lee Rubinger
Sr. Software Engineer
JBoss by Red Hat
http://exitcondition.alrubinger.com


More information about the weld-dev mailing list