You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Jonathan Gallimore <jo...@gmail.com> on 2011/11/07 00:46:34 UTC
Webapp deployer
Hi
I've just committed a Tomcat webapp folder style implementation of
Deployer. I've only tried it with .war files so far, going to try with .ear
and .jars tomorrow. For the .ear/.jar case is it sensible to invoke the
usual DeployerEjb class in that case, or would it be better to take the
same approach with .war files?
Cheers
Jon
Re: Webapp deployer
Posted by Romain Manni-Bucau <rm...@gmail.com>.
so maybe an optionnal module (or otherwise we need to find a utility to it
;)...and to manage all hot deploy directory and hosts :p)
but why not an openejb-tool or openejb-helper for such features. I saw a
wiki generator, i didnt have a look why it was here but maybe it is another
example.
no?
- Romain
2011/11/7 David Blevins <da...@gmail.com>
>
> On Nov 7, 2011, at 11:15 AM, Romain Manni-Bucau wrote:
>
> > ok but the webappdeployer is not linked to the deployment at all, just to
> > the way we deploy tcks so should we keep this ejb on trunk?
>
> We'll also want to run it with the CDI TCK. Though that part we probably
> only want to do in buildbot.
>
> -David
>
> > 2011/11/7 David Blevins <da...@gmail.com>
> >
> >>
> >> On Nov 6, 2011, at 4:22 PM, Jonathan Gallimore wrote:
> >>
> >>> My understanding - and this might be wrong - is that the existing
> >>> DeployerEjb behaves differently to just dropping the .war file in the
> >>> webapps directory. When we deploy using DeployerEjb, OpenEJB processes
> >> the
> >>> .war file first, and then hands it off to Tomcat. Dropping the war in
> the
> >>> webapps folder on the other hand, means Tomcat processes the .war file
> >>> first and then OpenEJB gets its turn.
> >>>
> >>> I think the goal here is for the TCK to be as close to dropping the
> >>> archives in the webapps folders as a user would do as possible.
> >>
> >> Right. Close as in identical :) Unless we're going to tell people
> "don't
> >> drop apps in webapps/", we should test it.
> >>
> >> Next step is to get the VmDeploymentManager class updated so the impl
> can
> >> be configurable. Then update the "runtests" script so the
> implementation
> >> cab be set for a test run. Then of course to try a test or two to
> verify
> >> that all works.
> >>
> >> Then we can kick off an entire run with that approach and see where we
> >> land.
> >>
> >>
> >> -David
> >>
> >>
> >>
>
>
Re: Webapp deployer
Posted by David Blevins <da...@gmail.com>.
On Nov 7, 2011, at 11:15 AM, Romain Manni-Bucau wrote:
> ok but the webappdeployer is not linked to the deployment at all, just to
> the way we deploy tcks so should we keep this ejb on trunk?
We'll also want to run it with the CDI TCK. Though that part we probably only want to do in buildbot.
-David
> 2011/11/7 David Blevins <da...@gmail.com>
>
>>
>> On Nov 6, 2011, at 4:22 PM, Jonathan Gallimore wrote:
>>
>>> My understanding - and this might be wrong - is that the existing
>>> DeployerEjb behaves differently to just dropping the .war file in the
>>> webapps directory. When we deploy using DeployerEjb, OpenEJB processes
>> the
>>> .war file first, and then hands it off to Tomcat. Dropping the war in the
>>> webapps folder on the other hand, means Tomcat processes the .war file
>>> first and then OpenEJB gets its turn.
>>>
>>> I think the goal here is for the TCK to be as close to dropping the
>>> archives in the webapps folders as a user would do as possible.
>>
>> Right. Close as in identical :) Unless we're going to tell people "don't
>> drop apps in webapps/", we should test it.
>>
>> Next step is to get the VmDeploymentManager class updated so the impl can
>> be configurable. Then update the "runtests" script so the implementation
>> cab be set for a test run. Then of course to try a test or two to verify
>> that all works.
>>
>> Then we can kick off an entire run with that approach and see where we
>> land.
>>
>>
>> -David
>>
>>
>>
Re: Webapp deployer
Posted by Jonathan Gallimore <jo...@gmail.com>.
Just a heads-up - I've expanded this and made sure it can deploy/undeploy
.wars, .jars and .ears. I've also moved it to its own module, which we can
add to TomEE as part of the TCK run. I'm going to try using it to run some
TCK tests locally and see how it gets on.
Jon
Re: Webapp deployer
Posted by Romain Manni-Bucau <rm...@gmail.com>.
+1
- Romain
2011/11/8 David Blevins <da...@gmail.com>
>
> On Nov 8, 2011, at 5:53 AM, Romain Manni-Bucau wrote:
>
> > there are already several classes we could want to extract
> >
> > what i don't like with this ejb is it will be exposed to user since it is
> > loggued and not usable by him
>
> Maybe we need to write in some sort of "hidden" flag and corresponding
> @Hidden annotation for some of the EJBs we produce.
>
> Other ones that come to mind are:
> - the managedbean we create for testcases
> - the managedbean we create for the class that bootstrapped the
> EJBContainer
> - the "Comp" managedbean we use to hold shared "java:comp/env" names
>
> Seems like the real pattern is that we're finding it more and more useful
> to create EJBs ourselves. Some way to do that without bugging users could
> be nice.
>
>
> -David
>
>
Re: Webapp deployer
Posted by David Blevins <da...@gmail.com>.
On Nov 8, 2011, at 5:53 AM, Romain Manni-Bucau wrote:
> there are already several classes we could want to extract
>
> what i don't like with this ejb is it will be exposed to user since it is
> loggued and not usable by him
Maybe we need to write in some sort of "hidden" flag and corresponding @Hidden annotation for some of the EJBs we produce.
Other ones that come to mind are:
- the managedbean we create for testcases
- the managedbean we create for the class that bootstrapped the EJBContainer
- the "Comp" managedbean we use to hold shared "java:comp/env" names
Seems like the real pattern is that we're finding it more and more useful to create EJBs ourselves. Some way to do that without bugging users could be nice.
-David
Re: Webapp deployer
Posted by Romain Manni-Bucau <rm...@gmail.com>.
there are already several classes we could want to extract
what i don't like with this ejb is it will be exposed to user since it is
loggued and not usable by him
--
View this message in context: http://openejb.979440.n4.nabble.com/Webapp-deployer-tp3997059p4016040.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.
Re: Webapp deployer
Posted by Jean-Louis MONTEIRO <je...@gmail.com>.
Hum, creating a separate module would be clearer may be, but just for one
simple class ....
I would choose the simple solution which is, AFAIK to add it to the core or
elsewhere.
JLouis
2011/11/7 David Blevins <da...@gmail.com>
> As long as we can run both the Java EE and CDI TCKs with the webapps dir
> approach I don't care where the code lives -- it's just one class so far.
>
> Note the CDI TCK doesn't use the VmDeployer.
>
> -David
>
> On Monday, November 7, 2011, Romain Manni-Bucau <rm...@gmail.com>
> wrote:
> > yep, exactly,
> >
> > this deployer doesn't give any feature to the user or to us to be honest,
> > it is just common for us but we doesn't need it because the code is
> really
> > simple and could be part of the VmDeployer impl.
> >
> > So yes a separated module can be better...
> >
> >
> > maybe i'm alone to think it so feel free to give your opinion.
> >
> > - Romain
> >
> >
> > 2011/11/7 Jonathan Gallimore <jo...@gmail.com>
> >
> >> Are you thinking you'd prefer the deployer to be part of the tck, or a
> >> module in its own right?
> >>
> >> I don't have a strong view either way, as long as the TCK setup is doing
> >> the right thing. Maybe our Arquillian adapters should be using this
> method
> >> as well?
> >>
> >> Jon
> >> On Nov 7, 2011 7:15 PM, "Romain Manni-Bucau" <rm...@gmail.com>
> >> wrote:
> >>
> >> > ok but the webappdeployer is not linked to the deployment at all, just
> to
> >> > the way we deploy tcks so should we keep this ejb on trunk?
> >> >
> >> > - Romain
> >> >
> >> >
> >> > 2011/11/7 David Blevins <da...@gmail.com>
> >> >
> >> > >
> >> > > On Nov 6, 2011, at 4:22 PM, Jonathan Gallimore wrote:
> >> > >
> >> > > > My understanding - and this might be wrong - is that the existing
> >> > > > DeployerEjb behaves differently to just dropping the .war file in
> the
> >> > > > webapps directory. When we deploy using DeployerEjb, OpenEJB
> >> processes
> >> > > the
> >> > > > .war file first, and then hands it off to Tomcat. Dropping the war
> in
> >> > the
> >> > > > webapps folder on the other hand, means Tomcat processes the .war
> >> file
> >> > > > first and then OpenEJB gets its turn.
> >> > > >
> >> > > > I think the goal here is for the TCK to be as close to dropping
> the
> >> > > > archives in the webapps folders as a user would do as possible.
> >> > >
> >> > > Right. Close as in identical :) Unless we're going to tell people
> >> > "don't
> >> > > drop apps in webapps/", we should test it.
> >> > >
> >> > > Next step is to get the VmDeploymentManager class updated so the
> impl
> >> can
> >> > > be configurable. Then update the "runtests" script so the
> >> implementation
> >> > > cab be set for a test run. Then of course to try a test or two to
> >> verify
> >> > > that all works.
> >> > >
> >> > > Then we can kick off an entire run with that approach and see where
> we
> >> > > land.
> >> > >
> >> > >
> >> > > -David
> >> > >
> >> > >
> >> > >
> >> >
> >>
> >
>
Re: Webapp deployer
Posted by David Blevins <da...@gmail.com>.
As long as we can run both the Java EE and CDI TCKs with the webapps dir
approach I don't care where the code lives -- it's just one class so far.
Note the CDI TCK doesn't use the VmDeployer.
-David
On Monday, November 7, 2011, Romain Manni-Bucau <rm...@gmail.com>
wrote:
> yep, exactly,
>
> this deployer doesn't give any feature to the user or to us to be honest,
> it is just common for us but we doesn't need it because the code is really
> simple and could be part of the VmDeployer impl.
>
> So yes a separated module can be better...
>
>
> maybe i'm alone to think it so feel free to give your opinion.
>
> - Romain
>
>
> 2011/11/7 Jonathan Gallimore <jo...@gmail.com>
>
>> Are you thinking you'd prefer the deployer to be part of the tck, or a
>> module in its own right?
>>
>> I don't have a strong view either way, as long as the TCK setup is doing
>> the right thing. Maybe our Arquillian adapters should be using this
method
>> as well?
>>
>> Jon
>> On Nov 7, 2011 7:15 PM, "Romain Manni-Bucau" <rm...@gmail.com>
>> wrote:
>>
>> > ok but the webappdeployer is not linked to the deployment at all, just
to
>> > the way we deploy tcks so should we keep this ejb on trunk?
>> >
>> > - Romain
>> >
>> >
>> > 2011/11/7 David Blevins <da...@gmail.com>
>> >
>> > >
>> > > On Nov 6, 2011, at 4:22 PM, Jonathan Gallimore wrote:
>> > >
>> > > > My understanding - and this might be wrong - is that the existing
>> > > > DeployerEjb behaves differently to just dropping the .war file in
the
>> > > > webapps directory. When we deploy using DeployerEjb, OpenEJB
>> processes
>> > > the
>> > > > .war file first, and then hands it off to Tomcat. Dropping the war
in
>> > the
>> > > > webapps folder on the other hand, means Tomcat processes the .war
>> file
>> > > > first and then OpenEJB gets its turn.
>> > > >
>> > > > I think the goal here is for the TCK to be as close to dropping the
>> > > > archives in the webapps folders as a user would do as possible.
>> > >
>> > > Right. Close as in identical :) Unless we're going to tell people
>> > "don't
>> > > drop apps in webapps/", we should test it.
>> > >
>> > > Next step is to get the VmDeploymentManager class updated so the impl
>> can
>> > > be configurable. Then update the "runtests" script so the
>> implementation
>> > > cab be set for a test run. Then of course to try a test or two to
>> verify
>> > > that all works.
>> > >
>> > > Then we can kick off an entire run with that approach and see where
we
>> > > land.
>> > >
>> > >
>> > > -David
>> > >
>> > >
>> > >
>> >
>>
>
Re: Webapp deployer
Posted by Romain Manni-Bucau <rm...@gmail.com>.
yep, exactly,
this deployer doesn't give any feature to the user or to us to be honest,
it is just common for us but we doesn't need it because the code is really
simple and could be part of the VmDeployer impl.
So yes a separated module can be better...
maybe i'm alone to think it so feel free to give your opinion.
- Romain
2011/11/7 Jonathan Gallimore <jo...@gmail.com>
> Are you thinking you'd prefer the deployer to be part of the tck, or a
> module in its own right?
>
> I don't have a strong view either way, as long as the TCK setup is doing
> the right thing. Maybe our Arquillian adapters should be using this method
> as well?
>
> Jon
> On Nov 7, 2011 7:15 PM, "Romain Manni-Bucau" <rm...@gmail.com>
> wrote:
>
> > ok but the webappdeployer is not linked to the deployment at all, just to
> > the way we deploy tcks so should we keep this ejb on trunk?
> >
> > - Romain
> >
> >
> > 2011/11/7 David Blevins <da...@gmail.com>
> >
> > >
> > > On Nov 6, 2011, at 4:22 PM, Jonathan Gallimore wrote:
> > >
> > > > My understanding - and this might be wrong - is that the existing
> > > > DeployerEjb behaves differently to just dropping the .war file in the
> > > > webapps directory. When we deploy using DeployerEjb, OpenEJB
> processes
> > > the
> > > > .war file first, and then hands it off to Tomcat. Dropping the war in
> > the
> > > > webapps folder on the other hand, means Tomcat processes the .war
> file
> > > > first and then OpenEJB gets its turn.
> > > >
> > > > I think the goal here is for the TCK to be as close to dropping the
> > > > archives in the webapps folders as a user would do as possible.
> > >
> > > Right. Close as in identical :) Unless we're going to tell people
> > "don't
> > > drop apps in webapps/", we should test it.
> > >
> > > Next step is to get the VmDeploymentManager class updated so the impl
> can
> > > be configurable. Then update the "runtests" script so the
> implementation
> > > cab be set for a test run. Then of course to try a test or two to
> verify
> > > that all works.
> > >
> > > Then we can kick off an entire run with that approach and see where we
> > > land.
> > >
> > >
> > > -David
> > >
> > >
> > >
> >
>
Re: Webapp deployer
Posted by Jonathan Gallimore <jo...@gmail.com>.
Are you thinking you'd prefer the deployer to be part of the tck, or a
module in its own right?
I don't have a strong view either way, as long as the TCK setup is doing
the right thing. Maybe our Arquillian adapters should be using this method
as well?
Jon
On Nov 7, 2011 7:15 PM, "Romain Manni-Bucau" <rm...@gmail.com> wrote:
> ok but the webappdeployer is not linked to the deployment at all, just to
> the way we deploy tcks so should we keep this ejb on trunk?
>
> - Romain
>
>
> 2011/11/7 David Blevins <da...@gmail.com>
>
> >
> > On Nov 6, 2011, at 4:22 PM, Jonathan Gallimore wrote:
> >
> > > My understanding - and this might be wrong - is that the existing
> > > DeployerEjb behaves differently to just dropping the .war file in the
> > > webapps directory. When we deploy using DeployerEjb, OpenEJB processes
> > the
> > > .war file first, and then hands it off to Tomcat. Dropping the war in
> the
> > > webapps folder on the other hand, means Tomcat processes the .war file
> > > first and then OpenEJB gets its turn.
> > >
> > > I think the goal here is for the TCK to be as close to dropping the
> > > archives in the webapps folders as a user would do as possible.
> >
> > Right. Close as in identical :) Unless we're going to tell people
> "don't
> > drop apps in webapps/", we should test it.
> >
> > Next step is to get the VmDeploymentManager class updated so the impl can
> > be configurable. Then update the "runtests" script so the implementation
> > cab be set for a test run. Then of course to try a test or two to verify
> > that all works.
> >
> > Then we can kick off an entire run with that approach and see where we
> > land.
> >
> >
> > -David
> >
> >
> >
>
Re: Webapp deployer
Posted by Romain Manni-Bucau <rm...@gmail.com>.
ok but the webappdeployer is not linked to the deployment at all, just to
the way we deploy tcks so should we keep this ejb on trunk?
- Romain
2011/11/7 David Blevins <da...@gmail.com>
>
> On Nov 6, 2011, at 4:22 PM, Jonathan Gallimore wrote:
>
> > My understanding - and this might be wrong - is that the existing
> > DeployerEjb behaves differently to just dropping the .war file in the
> > webapps directory. When we deploy using DeployerEjb, OpenEJB processes
> the
> > .war file first, and then hands it off to Tomcat. Dropping the war in the
> > webapps folder on the other hand, means Tomcat processes the .war file
> > first and then OpenEJB gets its turn.
> >
> > I think the goal here is for the TCK to be as close to dropping the
> > archives in the webapps folders as a user would do as possible.
>
> Right. Close as in identical :) Unless we're going to tell people "don't
> drop apps in webapps/", we should test it.
>
> Next step is to get the VmDeploymentManager class updated so the impl can
> be configurable. Then update the "runtests" script so the implementation
> cab be set for a test run. Then of course to try a test or two to verify
> that all works.
>
> Then we can kick off an entire run with that approach and see where we
> land.
>
>
> -David
>
>
>
Re: Webapp deployer
Posted by David Blevins <da...@gmail.com>.
On Nov 6, 2011, at 4:22 PM, Jonathan Gallimore wrote:
> My understanding - and this might be wrong - is that the existing
> DeployerEjb behaves differently to just dropping the .war file in the
> webapps directory. When we deploy using DeployerEjb, OpenEJB processes the
> .war file first, and then hands it off to Tomcat. Dropping the war in the
> webapps folder on the other hand, means Tomcat processes the .war file
> first and then OpenEJB gets its turn.
>
> I think the goal here is for the TCK to be as close to dropping the
> archives in the webapps folders as a user would do as possible.
Right. Close as in identical :) Unless we're going to tell people "don't drop apps in webapps/", we should test it.
Next step is to get the VmDeploymentManager class updated so the impl can be configurable. Then update the "runtests" script so the implementation cab be set for a test run. Then of course to try a test or two to verify that all works.
Then we can kick off an entire run with that approach and see where we land.
-David
Re: Webapp deployer
Posted by Jonathan Gallimore <jo...@gmail.com>.
My understanding - and this might be wrong - is that the existing
DeployerEjb behaves differently to just dropping the .war file in the
webapps directory. When we deploy using DeployerEjb, OpenEJB processes the
.war file first, and then hands it off to Tomcat. Dropping the war in the
webapps folder on the other hand, means Tomcat processes the .war file
first and then OpenEJB gets its turn.
I think the goal here is for the TCK to be as close to dropping the
archives in the webapps folders as a user would do as possible. All that
this deployer is doing is exactly the same thing using Tomcat's own
deployer does - upload the .war file, and invoke a check method on the
Deployer mbean which returns once the app has deployed.
Making this a bit more "hot-deploy" friendly shouldn't be difficult, a
quick check to see if the app has already been deployed - if so, undeploy
it first.
Jon
On Mon, Nov 7, 2011 at 12:10 AM, Romain Manni-Bucau
<rm...@gmail.com>wrote:
> Hi,
>
> Hmm, for jar and ear DeployerEjb should work (for war too but with some
> tricky things abt classloadibg)...but shouldnt we manage hot deploy more
> than this?
>
> PS: i do not get why this deployer is useful, what is the goal? If i
> understand it hopes tomcat already deployed the webapp, no?
>
> - Romain
>
> Le 7 nov. 2011 00:47, "Jonathan Gallimore" <jo...@gmail.com>
> a
> écrit :
>
> > Hi
> >
> > I've just committed a Tomcat webapp folder style implementation of
> > Deployer. I've only tried it with .war files so far, going to try with
> .ear
> > and .jars tomorrow. For the .ear/.jar case is it sensible to invoke the
> > usual DeployerEjb class in that case, or would it be better to take the
> > same approach with .war files?
> >
> > Cheers
> >
> > Jon
> >
>
Re: Webapp deployer
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,
Hmm, for jar and ear DeployerEjb should work (for war too but with some
tricky things abt classloadibg)...but shouldnt we manage hot deploy more
than this?
PS: i do not get why this deployer is useful, what is the goal? If i
understand it hopes tomcat already deployed the webapp, no?
- Romain
Le 7 nov. 2011 00:47, "Jonathan Gallimore" <jo...@gmail.com> a
écrit :
> Hi
>
> I've just committed a Tomcat webapp folder style implementation of
> Deployer. I've only tried it with .war files so far, going to try with .ear
> and .jars tomorrow. For the .ear/.jar case is it sensible to invoke the
> usual DeployerEjb class in that case, or would it be better to take the
> same approach with .war files?
>
> Cheers
>
> Jon
>