[jboss-dev] Testing Deployers Outside AS

Adrian Brock warjort at gmail.com
Wed Jul 7 21:38:54 EDT 2010


> On Wed, Jul 7, 2010 at 2:40 PM, Bill Burke <bburke at redhat.com> wrote:
> I'll be able to boot jbossweb and deploy/test servlets?

I did that about 4 years ago, but it was more work than it should have been,
lol

It should be easier now, but it isnt.
There is no real standalone jbossweb artifact in maven that includes
the deployers stuff.

You need two things:

1) JBossWeb still uses JMX so you need the old service controller,
which is now a standalone project
http://anonsvn.jboss.org/repos/jbossas/projects/kernel/trunk/jmx-mc-int/pom.xml

2) A version of the jbossweb sar that doesnt depend too much on the
appserver,
e.g. jta, jca, clustering, etc.

(1) will let you deploy (2) but to avoid pulling in a lot of JBossAS
artifacts
you will need a different jbossweb config that doesnt depend on the
TransactionManager,
CachedConnectionManager, etc.

In practice, you just need to add the jars as a test dependency and
then write your own jboss-service.xml and other tomcat config files
that configures what you need. But it would be nice if you didnt have
to do it yourself and you could just pull in an artifact from maven.

Andrew Lee Rubinger wrote:
> > I haven't made too much noise about this yet, but now that it's released:
> >
> > The Arquillian testing framework, as of 1.0.0.Alpha2, has a backing
> > container integration for JBoss Reloaded.  Carlo's originally defined
> > "Reloaded" as the component which brings together a minimally-running
> > Virutal Deployment Framework, MC, and jboss-bootstrap:
> >
> > http://community.jboss.org/docs/DOC-13453
> >
> > The take-home that our Arquillian adaptor provides is an ultra-slim way
> > to bring up MC/VDF without any explicit coding and enables testing of
> > bits like Deployers and other MC beans in a slim manner, outside of AS.
> >
> > For instance, I check the postcondition that one of my deployers adds an
> > attachment to the DeploymentUnit:
> >
> >
> http://anonsvn.jboss.org/repos/jbossas/projects/ejb3/components/async/trunk/deployer/src/test/java/org/jboss/ejb3/async/deployer/AsyncExecutorServiceDeployerTestCase.java
> >
> > In this way we can precertify that our projects' VDF components are
> > working before they hit AS.  The test above runs in under 2s.
> >
> > I recommend to projects using VDF that we start to use Arquillian as
> > outlined above.  This is also possible via manual setup, but the
> > Reloaded APIs are still under change/flux, and hiding behind Arquillian
> > to do the wiring gives you a much smaller API to manage (not to mention
> > that it saves you from setting up jboss-bootstrap/MC on your own).
> >
> > S,
> > ALR
> > _______________________________________________
> > jboss-development mailing list
> > jboss-development at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/jboss-development
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
> _______________________________________________
> jboss-development mailing list
> jboss-development at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-development
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-development/attachments/20100708/264d80a7/attachment.html 


More information about the jboss-development mailing list