Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] ShrinkWrap Integration with Jetty

Glad to hear it, Greg.  Replies inline.

On 01/31/2010 09:43 PM, Greg Wilkins wrote:

Andrew,

this sounds interesting and we'd be very happy to cooperate with this
effort as much as time allows.

So the intended project architecture is for each container to maintain
its own shrinkwrap integration?   ie should we create a jetty-shrinkwrap
module in our contrib svn repo that would become the home for this?

Ideally, yes. I think a new module under contrib would be great; we'll be responsible for maintaining it through the ShrinkWrap API freeze if you guys can give it longer-term attention (ie. keep the testsuites green in CI, etc). Then we can better ensure stuff will work with each subsequent Jetty release.

Note that our entry barrier to having commit permission on our
contrib repo is very low - so long as you sign a CLA or CCLA we
could give you access and then both would be able to work on the
module.

Fantastic; is this the correct process:

http://docs.codehaus.org/display/JETTY/Contributor+License

...?

Note due to our dependency phobia, we'd probably never directly
support

   server.deploy(archive)

but we would be happy to support

   shrinkWrapServer.deploy(archive)

Where shrinkWrapServer extends or uses server.  Actually have you
considered using the JVMs service provider mechanism so an arbitrary
shrinkwrap deployer could be discovered?

I can respect that; ShrinkWrap's API and base implementation after all have *no* dependencies outside of the JDK.

Interesting SPI idea to pick up the proper deployer. We do a similar mechanism to do runtime discovery of archive implementation types (so users just see our API).

As for your question about needing gzip and io, Jetty certainly does not
need to have a war as a zipped file.   It doesn't even need to be
assembled into the one location.

We have a Resource abstraction that can wrap pretty much any URL,
plus a ResourceCollection for combining multiple resources.

So if you set the baseResource of webappContext, to a resource,
then that is where the static content is taken from.  You can then
separately specify where the descriptor is and even setup your
own classpath.

Great. At first pass we'll get the API stuff worked out, then can get under the hood to provide a more efficient deployment.

S,
ALR

Andrew Lee Rubinger wrote:
After some discussions on #jetty@Freenode, thought we'd go for a more
persistent introduction. :)

Over at JBoss we've been working on a simple API analouge to the "jar"
tool; its goal is to allow developers to very quickly make archives like
JARs, WARs, and EARs in Java:

JavaArchive archive = Archives.create("myEjb.jar", JavaArchive.class)
    .addClasses(MyEjbBean.class,MyEjbLocalBusinessInterface.class)
    .addResource("META-INF/ejb-jar.xml");

 From there, we're aiming to coordinate with as many target containers as
possible to support direct deployment:

server.deploy(archive);

This eliminates the packaging steps required to run integration tests.

The project is called "ShrinkWrap"[1][2], and we're in our 4th alpha
release.  We have pretty decent test coverage and a growing community
including OpenEJB, GlassFish, and jClouds, though the "alpha" indicator
is to show that our core APIs are subject to changes until we enter beta.

I've done a preliminary stab at integrating with Jetty:

http://community.jboss.org/message/523145

This implementation works by extending WebAppContext, serializing a
backing ShrinkWrap archive into a tmp ZIP-format file, and deploying
that.  Definitely open to a more efficient mechanism that doesn't
require disk I/O or ZIP encoding, if Jetty can support it.

I invite you to join us and perhaps import/fork the work above into
Jetty to make things more transparent for users.  Building should be
fairly intuitive:

http://community.jboss.org/docs/DOC-14304

Jetty specific code is located in the "extension-jetty" module.  Hoping
you'd like to work with us and looking forward to hearing from you. :)

S,
ALR


[1] http://jboss.org/shrinkwrap
[2] http://community.jboss.org/wiki/ShrinkWrap
_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-dev



Back to the top