Skip to main content

deployment application via HTTP requests

7 replies [Last post]
vladperl
Offline
Joined: 2004-08-11

Is exist posibility to make deployment via URL and with help Ant task?
Tomcat have support for this kind of functionality.

example:

http://localhost:8080/manager/deploy?config=file:/path/context.xml

Thanks,
Vladimir Perlov

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kumara
Offline
Joined: 2004-12-03

Have you tried asant (the ant interface to application server administration)?

See more about using asant for deployment at --

http://docs.sun.com/source/819-0079/dgdeploy.html#wp76793

There is a command line interface also, see the man page here --

http://docs.sun.com/source/819-0082/hman1/deploy.1.html

And yes, deployment using a URL is not (yet) possible.

vladperl
Offline
Joined: 2004-08-11

I'm glad to receive so much information and suggestions regarding deployment of application.
I'm working now on system that provides possibility to generate code for web applications and components based on JSF 1.2. And one of the project’s goals is to accommodate effortless deployment of generated applications or libraries.
Using glassfish is important for me because of JSP 2.1.
After some experiments with deployment applications on glassfish I will write back to forum to present my own experience and suggestions regarding this matter.

Thanks to all of you,
Vladimir

dochez
Offline
Joined: 2003-06-10

Hi Vladimir

We do not have such a feature so far, the only close thing is what Matthew was describing. BTW, Matthew won his bet, there is a JMS API for deploying which is used internally by JSR88 and asadmin clients for instance. It is in the AMX module.

Anyhow, this would be a good idea, anyone out there interested participating in implementing it ?

Jerome

vladperl
Offline
Joined: 2004-08-11

Hi Jerome,
Thank you for your helpful response.
Yours and Matthew's answers have provided me with all necessary information I need to know regarding deployment of application.
> We do not have such a feature so far, the only close
> thing is what Matthew was describing. BTW, Matthew
> won his bet, there is a JMS API for deploying which
> is used internally by JSR88 and asadmin clients for
> instance. It is in the AMX module.
Could you write some example how to do that?
Sorry for asking, I'm sure you are very busy person.
But always there is a chance to get positive reaction :-)

> Anyhow, this would be a good idea, anyone out there
> interested participating in implementing it ?
Somewhere on web I have seen information that people who used to be work on tomcat working on glassfish now.
If that is true why we couldn't take the appropriate code from tomcat and adapt it to glassfish?
Probably that suggestion sound strange but I'd like to know if it makes some sense to do that and that's ok for people who own tomcat.

Vladimir

bitmaster
Offline
Joined: 2003-06-16

> If that is true why we couldn't take the appropriate
> code from tomcat and adapt it to glassfish?
> Probably that suggestion sound strange but I'd like
> to know if it makes some sense to do that and that's
> ok for people who own tomcat.

The correct line of thinking is to have Tomcat implement the [b]standard[/b] JSR-88, so then all deployment tools will work on the Container o' the Day.

I do hear your pain, and realize that it's a bit of a chicken and egg with the tools versus the API, but thus far I am very impressed with how the industry gets behind the JSRs and drives them to success.

Alternately, as a more stop-gap approach, you can use JBoss (which as of this writing uses Tomcat for it's web container). It supports both JMX (not JMS, as was erroneously posted earlier) and more traditional "hot deploy" via plain filesystem copy mechanism.

I have seen reference to a similar hot deploy mechanism in Glassfish, but have no first-hand experience with it. You could try it out and report back. :-)

[pre]
cp my-great.war /opt/glasshfish-9.0-b15/domains/domain1/autodeploy/
[/pre]

bitmaster
Offline
Joined: 2003-06-16

Yes is the answer to your question.

But the question you're going to ask next is "how?" and that's a bit trickier. Glassfish supports out-of-the-box deployment over HTTP and deployment via a local pathname, in addition to its autodeploy support (akin to JBoss).

All of this functionality is exposed via the Admin Console (port 4848, for those playing along at home) but are not (AFAIK) rolled into an Ant task like you're describing.

I'd bet dollars to donuts there is a JMX api that will accomplish this, especially in light of the work JSR-88 (javax.deployment), but couldn't provide you with any Glassfish-specific URLs or getting started guides.

-- /v\atthew

vladperl
Offline
Joined: 2004-08-11

Hi Matthew,
Thank you for your answer.
But I'd like to discuss a little more on this topic.

> Yes is the answer to your question.
>
> But the question you're going to ask next is "how?"
> and that's a bit trickier. Glassfish supports
> out-of-the-box deployment over HTTP and deployment
> via a local pathname, in addition to its autodeploy
> support (akin to JBoss).
>
> All of this functionality is exposed via the Admin
> Console (port 4848, for those playing along at home)
> but are not (AFAIK) rolled into an Ant task like
> you're describing.

Ok, let's forgot about Ant task.
But I'd like to have at least possibility to send request for deployment of application directly via url.
(http://localhost:8080/manager/deploy?config=file:/path/context.xml)

I know we will get access to deployment functionality using something like that:
http://localhost:4848/asadmin
But than you have to navigate to appropriate place in admin console and manually put some information to deploy app.

Thanks,
Vladimir