You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Martin Kersten <ma...@gmail.com> on 2013/10/17 20:17:39 UTC

Jetty/Tappestry for different class locations?

Hi there,

   I was thinking about having two projects now and I have two class
locations. Currently I dont have a softlink (linux) to join both in a
single directory. I would like to not start fiddling with those.

The problem is that I start an embedded jetty for tests (acceptance tests,
integeration is done with page tester). Since I dont use maven's infamous
jetty:run which copies everything in place before its started the startup
is somewhat under a second for jetty. So I want to keep it this way.

But now I got a problem with tapestry. Is it possible to use more then one
location for the classes?

If I remember my source reading sessions with the IOC I saw something going
on with multiple classpath locations including jar and file directory
access. So i guess it should work with using different class locations
right?. But yet again I remember that all servlet context get their own
class loaders and so I want to verify that this works.

I got some issues right now but before I spend 30min in diving into the
code I just want to know if it is practical possible to do such thing.


Has anyone got this to work?


Cheers,

Martin (Kersten)
Germany

Re: Jetty/Tappestry for different class locations?

Posted by Martin Kersten <ma...@gmail.com>.
I am unsure. I had problems detecting my test classes while running inside
a jetty. I solved this issue by using some kind of a directory bundle (lame
name but hadnt found something better yet). Since I saw this in the plastic
IOC part I guess tapestry also can deal with fragmented classpath
directories.

I will see it tomorrow or sunday I guess. I just wanted to ensure that
there is nothing blocking me and I waste time trying to fix it... . So I
will be confident and report back my findings.


2013/10/18 Thiago H de Paula Figueiredo <th...@gmail.com>

> On Fri, 18 Oct 2013 11:22:40 -0300, Martin Kersten <
> martin.kersten.mk@gmail.com> wrote:
>
>  I have the problem that all those projects render the classes to:
>>
>> parent.project/classes
>> web.project/classes
>>
>> using maven jetty:run gets all those classes copied to a new location
>> what makes the startup dead slow (several seconds). I use an emebedded jetty
>> where I just give the webapp directory location. I have no way to copy
>> all those classes automatically to this location only the main project (not
>> the parent one).
>>
>> So I need information if someone using the parent+web spliting is using
>> another mechanism to run jetty and how it behaves.
>>
>
> Ordinary classpath settings are the solution, as you're running Jetty
> embedded or via RunJettyRun. You don't actually need to copy everything to
> a single place: you just have to put everything in the classpath in one way
> or another.
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org<us...@tapestry.apache.org>
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Jetty/Tappestry for different class locations?

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Fri, 18 Oct 2013 11:22:40 -0300, Martin Kersten  
<ma...@gmail.com> wrote:

> I have the problem that all those projects render the classes to:
>
> parent.project/classes
> web.project/classes
>
> using maven jetty:run gets all those classes copied to a new location  
> what makes the startup dead slow (several seconds). I use an emebedded  
> jetty
> where I just give the webapp directory location. I have no way to copy  
> all those classes automatically to this location only the main project  
> (not the parent one).
>
> So I need information if someone using the parent+web spliting is using
> another mechanism to run jetty and how it behaves.

Ordinary classpath settings are the solution, as you're running Jetty  
embedded or via RunJettyRun. You don't actually need to copy everything to  
a single place: you just have to put everything in the classpath in one  
way or another.

-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Jetty/Tappestry for different class locations?

Posted by Martin Kersten <ma...@gmail.com>.
I have the problem that all those projects render the classes to:

parent.project/classes
web.project/classes

using maven jetty:run gets all those classes copied to a new location what
makes the startup dead slow (several seconds). I use an emebedded jetty
where I just give the webapp directory location. I have no way to copy all
those classes automatically to this location only the main project (not the
parent one).

So I need information if someone using the parent+web spliting is using
another mechanism to run jetty and how it behaves.


2013/10/18 Muhammad Gelbana <m....@gmail.com>

> I'm not sure what you're trying to do but I think you are looking for a way
> to load specific Tapestry modules. I use this "tapestry.modules"
>
> i.e. -Dtapestry.modules=my.app.AppModule,my.other.app.TestModule
>
> *---------------------*
> *Muhammad Gelbana*
> http://www.linkedin.com/in/mgelbana
>
>
> On Thu, Oct 17, 2013 at 8:17 PM, Martin Kersten <
> martin.kersten.mk@gmail.com
> > wrote:
>
> > Hi there,
> >
> >    I was thinking about having two projects now and I have two class
> > locations. Currently I dont have a softlink (linux) to join both in a
> > single directory. I would like to not start fiddling with those.
> >
> > The problem is that I start an embedded jetty for tests (acceptance
> tests,
> > integeration is done with page tester). Since I dont use maven's infamous
> > jetty:run which copies everything in place before its started the startup
> > is somewhat under a second for jetty. So I want to keep it this way.
> >
> > But now I got a problem with tapestry. Is it possible to use more then
> one
> > location for the classes?
> >
> > If I remember my source reading sessions with the IOC I saw something
> going
> > on with multiple classpath locations including jar and file directory
> > access. So i guess it should work with using different class locations
> > right?. But yet again I remember that all servlet context get their own
> > class loaders and so I want to verify that this works.
> >
> > I got some issues right now but before I spend 30min in diving into the
> > code I just want to know if it is practical possible to do such thing.
> >
> >
> > Has anyone got this to work?
> >
> >
> > Cheers,
> >
> > Martin (Kersten)
> > Germany
> >
>

Re: Jetty/Tappestry for different class locations?

Posted by Muhammad Gelbana <m....@gmail.com>.
I'm not sure what you're trying to do but I think you are looking for a way
to load specific Tapestry modules. I use this "tapestry.modules"

i.e. -Dtapestry.modules=my.app.AppModule,my.other.app.TestModule

*---------------------*
*Muhammad Gelbana*
http://www.linkedin.com/in/mgelbana


On Thu, Oct 17, 2013 at 8:17 PM, Martin Kersten <martin.kersten.mk@gmail.com
> wrote:

> Hi there,
>
>    I was thinking about having two projects now and I have two class
> locations. Currently I dont have a softlink (linux) to join both in a
> single directory. I would like to not start fiddling with those.
>
> The problem is that I start an embedded jetty for tests (acceptance tests,
> integeration is done with page tester). Since I dont use maven's infamous
> jetty:run which copies everything in place before its started the startup
> is somewhat under a second for jetty. So I want to keep it this way.
>
> But now I got a problem with tapestry. Is it possible to use more then one
> location for the classes?
>
> If I remember my source reading sessions with the IOC I saw something going
> on with multiple classpath locations including jar and file directory
> access. So i guess it should work with using different class locations
> right?. But yet again I remember that all servlet context get their own
> class loaders and so I want to verify that this works.
>
> I got some issues right now but before I spend 30min in diving into the
> code I just want to know if it is practical possible to do such thing.
>
>
> Has anyone got this to work?
>
>
> Cheers,
>
> Martin (Kersten)
> Germany
>