You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by David Blevins <da...@visi.com> on 2007/07/03 00:12:56 UTC

Re: Hotdeploy/Undeploy

On Jun 5, 2007, at 6:24 PM, David Blevins wrote:

>
> On Jun 4, 2007, at 10:21 AM, Karan Malhi wrote:
>
>> I was thinking about the following:
>> the CLI deploy option uses the org.apache.openejb.config.Deploy. I  
>> was
>> thinking if somehow this object could use the
>> org.apache.openejb.VmDeploymentManager. This way our CLI will be able
>> to use the JSR-88 compliant interfaces for its deployment. The same
>> logic used here could be re-used in a swing, web or IDE based
>> administrative console application. I have tried to look through the
>> code, but didnt have enough time to be able to view it thoroughly. I
>> will give this a try if you feel this is a valid option.
>
> I think that'd be a great thing to have.

So I'm looking into the command line deploy functionality and hoping  
to get something plumbed in in a short amount of time.  I was  
thinking we'd use a variation on this idea.  Basically, we would  
check to see if we can connect to the server and if so we'd deploy  
via the Deployer ejb which is what the VmDeploymentManager uses.

If we can't connect to the server then we could just add a  
Deployments entry to their openejb.xml or maybe just copy the archive  
into the apps/ dir if they have one  and print a message saying  
they've deployed offline and the app should be picked up when openejb  
is started.

-David




Re: Hotdeploy/Undeploy

Posted by David Blevins <da...@visi.com>.
On Jul 4, 2007, at 5:39 AM, Karan Malhi wrote:

> David,
>
> I just realized that you were working on this. Please do provide the
> hotdeploy functionality, I was just trying it on my own and it will
> probably take me a lot of time to implement it. You would be able to
> crank out the solution in no time. I think the sun xsd issue is more
> or less resolved. After my initial test , it works fine. So, I am not
> sure if we need to wait for Craig to clear up the license issues.

No, no. By all means, if you have something at least sort of working  
you're farther then me.  You can submit what you have and we can hack  
together.

-David

>
> On 7/3/07, Dain Sundstrom <da...@iq80.com> wrote:
>> Sounds reasonable to me.
>>
>> -dain
>>
>> On Jul 3, 2007, at 12:12 PM, Karan Malhi wrote:
>>
>> > BTW, I got deploy to work using the Deployer bean. However, for
>> > hotdeploy to work, i would have to undeploy the module and then  
>> deploy
>> > it. The Deployer bean gives me a nice deploy method where i can
>> > specify the location of the jar,
>> >
>> > However, the undeploy needs a moduleId. I saw the code and found  
>> out
>> > that i will have to pretty much extract the moduleId myself from  
>> the
>> > AppInfo and then give that moduleId to undeploy. I think instead of
>> > doing this stuff in the o.a.o.config.Deploy, we could add a
>> > convenience method to the DeployerEjb called undeploy(String
>> > location). Would it make sense to have something like this or am I
>> > totally on the wrong track?
>> >
>> > On 7/2/07, David Blevins <da...@visi.com> wrote:
>> >>
>> >> On Jun 5, 2007, at 6:24 PM, David Blevins wrote:
>> >>
>> >> >
>> >> > On Jun 4, 2007, at 10:21 AM, Karan Malhi wrote:
>> >> >
>> >> >> I was thinking about the following:
>> >> >> the CLI deploy option uses the  
>> org.apache.openejb.config.Deploy. I
>> >> >> was
>> >> >> thinking if somehow this object could use the
>> >> >> org.apache.openejb.VmDeploymentManager. This way our CLI will
>> >> be able
>> >> >> to use the JSR-88 compliant interfaces for its deployment. The
>> >> same
>> >> >> logic used here could be re-used in a swing, web or IDE based
>> >> >> administrative console application. I have tried to look
>> >> through the
>> >> >> code, but didnt have enough time to be able to view it
>> >> thoroughly. I
>> >> >> will give this a try if you feel this is a valid option.
>> >> >
>> >> > I think that'd be a great thing to have.
>> >>
>> >> So I'm looking into the command line deploy functionality and  
>> hoping
>> >> to get something plumbed in in a short amount of time.  I was
>> >> thinking we'd use a variation on this idea.  Basically, we would
>> >> check to see if we can connect to the server and if so we'd deploy
>> >> via the Deployer ejb which is what the VmDeploymentManager uses.
>> >>
>> >> If we can't connect to the server then we could just add a
>> >> Deployments entry to their openejb.xml or maybe just copy the  
>> archive
>> >> into the apps/ dir if they have one  and print a message saying
>> >> they've deployed offline and the app should be picked up when  
>> openejb
>> >> is started.
>> >>
>> >> -David
>> >>
>> >>
>> >>
>> >>
>> >
>> >
>> > --
>> > Karan Singh Malhi
>>
>>
>
>
> -- 
> Karan Singh Malhi
>


Re: Hotdeploy/Undeploy

Posted by Karan Malhi <ka...@gmail.com>.
David,

I just realized that you were working on this. Please do provide the
hotdeploy functionality, I was just trying it on my own and it will
probably take me a lot of time to implement it. You would be able to
crank out the solution in no time. I think the sun xsd issue is more
or less resolved. After my initial test , it works fine. So, I am not
sure if we need to wait for Craig to clear up the license issues.

On 7/3/07, Dain Sundstrom <da...@iq80.com> wrote:
> Sounds reasonable to me.
>
> -dain
>
> On Jul 3, 2007, at 12:12 PM, Karan Malhi wrote:
>
> > BTW, I got deploy to work using the Deployer bean. However, for
> > hotdeploy to work, i would have to undeploy the module and then deploy
> > it. The Deployer bean gives me a nice deploy method where i can
> > specify the location of the jar,
> >
> > However, the undeploy needs a moduleId. I saw the code and found out
> > that i will have to pretty much extract the moduleId myself from the
> > AppInfo and then give that moduleId to undeploy. I think instead of
> > doing this stuff in the o.a.o.config.Deploy, we could add a
> > convenience method to the DeployerEjb called undeploy(String
> > location). Would it make sense to have something like this or am I
> > totally on the wrong track?
> >
> > On 7/2/07, David Blevins <da...@visi.com> wrote:
> >>
> >> On Jun 5, 2007, at 6:24 PM, David Blevins wrote:
> >>
> >> >
> >> > On Jun 4, 2007, at 10:21 AM, Karan Malhi wrote:
> >> >
> >> >> I was thinking about the following:
> >> >> the CLI deploy option uses the org.apache.openejb.config.Deploy. I
> >> >> was
> >> >> thinking if somehow this object could use the
> >> >> org.apache.openejb.VmDeploymentManager. This way our CLI will
> >> be able
> >> >> to use the JSR-88 compliant interfaces for its deployment. The
> >> same
> >> >> logic used here could be re-used in a swing, web or IDE based
> >> >> administrative console application. I have tried to look
> >> through the
> >> >> code, but didnt have enough time to be able to view it
> >> thoroughly. I
> >> >> will give this a try if you feel this is a valid option.
> >> >
> >> > I think that'd be a great thing to have.
> >>
> >> So I'm looking into the command line deploy functionality and hoping
> >> to get something plumbed in in a short amount of time.  I was
> >> thinking we'd use a variation on this idea.  Basically, we would
> >> check to see if we can connect to the server and if so we'd deploy
> >> via the Deployer ejb which is what the VmDeploymentManager uses.
> >>
> >> If we can't connect to the server then we could just add a
> >> Deployments entry to their openejb.xml or maybe just copy the archive
> >> into the apps/ dir if they have one  and print a message saying
> >> they've deployed offline and the app should be picked up when openejb
> >> is started.
> >>
> >> -David
> >>
> >>
> >>
> >>
> >
> >
> > --
> > Karan Singh Malhi
>
>


-- 
Karan Singh Malhi

Re: Hotdeploy/Undeploy

Posted by Dain Sundstrom <da...@iq80.com>.
Sounds reasonable to me.

-dain

On Jul 3, 2007, at 12:12 PM, Karan Malhi wrote:

> BTW, I got deploy to work using the Deployer bean. However, for
> hotdeploy to work, i would have to undeploy the module and then deploy
> it. The Deployer bean gives me a nice deploy method where i can
> specify the location of the jar,
>
> However, the undeploy needs a moduleId. I saw the code and found out
> that i will have to pretty much extract the moduleId myself from the
> AppInfo and then give that moduleId to undeploy. I think instead of
> doing this stuff in the o.a.o.config.Deploy, we could add a
> convenience method to the DeployerEjb called undeploy(String
> location). Would it make sense to have something like this or am I
> totally on the wrong track?
>
> On 7/2/07, David Blevins <da...@visi.com> wrote:
>>
>> On Jun 5, 2007, at 6:24 PM, David Blevins wrote:
>>
>> >
>> > On Jun 4, 2007, at 10:21 AM, Karan Malhi wrote:
>> >
>> >> I was thinking about the following:
>> >> the CLI deploy option uses the org.apache.openejb.config.Deploy. I
>> >> was
>> >> thinking if somehow this object could use the
>> >> org.apache.openejb.VmDeploymentManager. This way our CLI will  
>> be able
>> >> to use the JSR-88 compliant interfaces for its deployment. The  
>> same
>> >> logic used here could be re-used in a swing, web or IDE based
>> >> administrative console application. I have tried to look  
>> through the
>> >> code, but didnt have enough time to be able to view it  
>> thoroughly. I
>> >> will give this a try if you feel this is a valid option.
>> >
>> > I think that'd be a great thing to have.
>>
>> So I'm looking into the command line deploy functionality and hoping
>> to get something plumbed in in a short amount of time.  I was
>> thinking we'd use a variation on this idea.  Basically, we would
>> check to see if we can connect to the server and if so we'd deploy
>> via the Deployer ejb which is what the VmDeploymentManager uses.
>>
>> If we can't connect to the server then we could just add a
>> Deployments entry to their openejb.xml or maybe just copy the archive
>> into the apps/ dir if they have one  and print a message saying
>> they've deployed offline and the app should be picked up when openejb
>> is started.
>>
>> -David
>>
>>
>>
>>
>
>
> -- 
> Karan Singh Malhi


Re: Hotdeploy/Undeploy

Posted by Karan Malhi <ka...@gmail.com>.
BTW, I got deploy to work using the Deployer bean. However, for
hotdeploy to work, i would have to undeploy the module and then deploy
it. The Deployer bean gives me a nice deploy method where i can
specify the location of the jar,

However, the undeploy needs a moduleId. I saw the code and found out
that i will have to pretty much extract the moduleId myself from the
AppInfo and then give that moduleId to undeploy. I think instead of
doing this stuff in the o.a.o.config.Deploy, we could add a
convenience method to the DeployerEjb called undeploy(String
location). Would it make sense to have something like this or am I
totally on the wrong track?

On 7/2/07, David Blevins <da...@visi.com> wrote:
>
> On Jun 5, 2007, at 6:24 PM, David Blevins wrote:
>
> >
> > On Jun 4, 2007, at 10:21 AM, Karan Malhi wrote:
> >
> >> I was thinking about the following:
> >> the CLI deploy option uses the org.apache.openejb.config.Deploy. I
> >> was
> >> thinking if somehow this object could use the
> >> org.apache.openejb.VmDeploymentManager. This way our CLI will be able
> >> to use the JSR-88 compliant interfaces for its deployment. The same
> >> logic used here could be re-used in a swing, web or IDE based
> >> administrative console application. I have tried to look through the
> >> code, but didnt have enough time to be able to view it thoroughly. I
> >> will give this a try if you feel this is a valid option.
> >
> > I think that'd be a great thing to have.
>
> So I'm looking into the command line deploy functionality and hoping
> to get something plumbed in in a short amount of time.  I was
> thinking we'd use a variation on this idea.  Basically, we would
> check to see if we can connect to the server and if so we'd deploy
> via the Deployer ejb which is what the VmDeploymentManager uses.
>
> If we can't connect to the server then we could just add a
> Deployments entry to their openejb.xml or maybe just copy the archive
> into the apps/ dir if they have one  and print a message saying
> they've deployed offline and the app should be picked up when openejb
> is started.
>
> -David
>
>
>
>


-- 
Karan Singh Malhi

Re: Hotdeploy/Undeploy

Posted by Karan Malhi <ka...@gmail.com>.
Cool

On 7/2/07, David Blevins <da...@visi.com> wrote:
>
> On Jun 5, 2007, at 6:24 PM, David Blevins wrote:
>
> >
> > On Jun 4, 2007, at 10:21 AM, Karan Malhi wrote:
> >
> >> I was thinking about the following:
> >> the CLI deploy option uses the org.apache.openejb.config.Deploy. I
> >> was
> >> thinking if somehow this object could use the
> >> org.apache.openejb.VmDeploymentManager. This way our CLI will be able
> >> to use the JSR-88 compliant interfaces for its deployment. The same
> >> logic used here could be re-used in a swing, web or IDE based
> >> administrative console application. I have tried to look through the
> >> code, but didnt have enough time to be able to view it thoroughly. I
> >> will give this a try if you feel this is a valid option.
> >
> > I think that'd be a great thing to have.
>
> So I'm looking into the command line deploy functionality and hoping
> to get something plumbed in in a short amount of time.  I was
> thinking we'd use a variation on this idea.  Basically, we would
> check to see if we can connect to the server and if so we'd deploy
> via the Deployer ejb which is what the VmDeploymentManager uses.
>
> If we can't connect to the server then we could just add a
> Deployments entry to their openejb.xml or maybe just copy the archive
> into the apps/ dir if they have one  and print a message saying
> they've deployed offline and the app should be picked up when openejb
> is started.
>
> -David
>
>
>
>


-- 
Karan Singh Malhi

Re: Hotdeploy/Undeploy

Posted by David Blevins <da...@visi.com>.
On Jul 2, 2007, at 3:12 PM, David Blevins wrote:

>
> On Jun 5, 2007, at 6:24 PM, David Blevins wrote:
>
>>
>> On Jun 4, 2007, at 10:21 AM, Karan Malhi wrote:
>>
>>> I was thinking about the following:
>>> the CLI deploy option uses the org.apache.openejb.config.Deploy.  
>>> I was
>>> thinking if somehow this object could use the
>>> org.apache.openejb.VmDeploymentManager. This way our CLI will be  
>>> able
>>> to use the JSR-88 compliant interfaces for its deployment. The same
>>> logic used here could be re-used in a swing, web or IDE based
>>> administrative console application. I have tried to look through the
>>> code, but didnt have enough time to be able to view it thoroughly. I
>>> will give this a try if you feel this is a valid option.
>>
>> I think that'd be a great thing to have.
>
> So I'm looking into the command line deploy functionality and  
> hoping to get something plumbed in in a short amount of time.  I  
> was thinking we'd use a variation on this idea.  Basically, we  
> would check to see if we can connect to the server and if so we'd  
> deploy via the Deployer ejb which is what the VmDeploymentManager  
> uses.
>
> If we can't connect to the server then we could just add a  
> Deployments entry to their openejb.xml or maybe just copy the  
> archive into the apps/ dir if they have one  and print a message  
> saying they've deployed offline and the app should be picked up  
> when openejb is started.

Ok, I just checked in a first run that should be pretty solid.  I  
tested what things looked like when deployment failed, when  
validation failed, when you tried to deploy an app that was already  
deployed, when you tried to deploy an app that contained a  
deploymentid already in use, etc.  After successful deployment it  
also lists all the app clients, persistence units, ejb-jars, ejbs,  
and even the jndi names for the ejbs.

I'll try and get some documentation together for it tomorrow with  
some sample output.

We should be in good shape for release.

-David