dev@ws-test-harness.java.net

Re: [Fwd: Programatically control glassfish?]

From: Ken Hofsass <Kenneth.Hofsass_at_Sun.COM>
Date: Wed, 19 Jul 2006 11:04:51 -0700

Kohsuke,

Here is a test program that uses the JSR88 APIs to deploy/undeploy a
service with GF. It is just a slightly modified version of that file
they pointed us to... JSR88Deployer.java from the GF tests.

To try it out...
update Main.java with your GF home & port numbers
ant compile
ant run

Ken

ps. I renamed the file from .zip to .zip.foo since the Sun mail filter
deletes zip files (I think).

Kohsuke Kawaguchi wrote:

>
> Attached is the e-mail thread of "how to programatically control
> Glassfish" in the mbox format.
>
> For those who are using Mozilla e-mail clients (like Thunderbird), you
> can just put this file in the mail directory and restart it to see
> this in a nice view (or you can just read it in the editor if nothing
> else works.)
>
> Our primary goal is to figure out how to deploy/undeploy services to a
> running Glassfish instance. It is desirable if when on the same
> machine this can be done without involving file copy, because that's
> faster. But again, our first goal is to make it work, and we can live
> with it being slow.
>
> I suggest we start by writing a separate small test program to try
> this, outside the harness. We can use the attached small test war file.
>
> If we figure out how to do it, I can wrap that into Cargo later.
>
>------------------------------------------------------------------------
>
>>>From - Sat Jun 17 17:04:52 2006
>X-Account-Key: account2
>X-UIDL: 17Jun200619:57:29GMT9973
>X-Mozilla-Status: 0001
>X-Mozilla-Status2: 00000000
>Return-path: <dev-return-1353-kohsuke.kawaguchi=sun.com_at_glassfish.dev.java.net>
>Received: from d1-sfbay-09.sun.com ([192.18.39.119])
> by nedge3-mail1.sfbay.sun.com
> (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005))
> with ESMTP id <0J1000GEZSRTTY20_at_nedge3-mail1.sfbay.sun.com> for
> kk122374_at_nedge3-mail1.SFBay.Sun.COM; Sat, 17 Jun 2006 12:57:29 -0700 (PDT)
>Received: from conversion-daemon.d1-sfbay-09.sun.com by d1-sfbay-09.sun.com
> (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005))
> id <0J1000L01SGYT100_at_d1-sfbay-09.sun.com> for
> kk122374_at_nedge3-mail1.SFBay.Sun.COM (ORCPT kohsuke.kawaguchi_at_sun.com); Sat,
> 17 Jun 2006 12:57:29 -0700 (PDT)
>Received: from phys-nedge3-1.sfbay.sun.com ([10.4.135.22])
> by d1-sfbay-09.sun.com
> (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005))
> with ESMTP id <0J1000CDBSRT1Y30_at_d1-sfbay-09.sun.com> for
> kk122374_at_nedge3-mail1.SFBay.Sun.COM (ORCPT kohsuke.kawaguchi_at_sun.com); Sat,
> 17 Jun 2006 12:57:29 -0700 (PDT)
>Received: from sfbaymail2sca.sfbay.sun.com ([129.145.155.42])
> by nedge3-mail1.sfbay.sun.com
> (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005))
> with ESMTP id <0J1000GERSRTTY20_at_nedge3-mail1.sfbay.sun.com> for
> kk122374_at_nedge3-mail1.SFBay.Sun.COM (ORCPT kohsuke.kawaguchi_at_sun.com); Sat,
> 17 Jun 2006 12:57:29 -0700 (PDT)
>Received: from sunmail3.sfbay.sun.com
> (sunmail3.SFBay.Sun.COM [129.149.247.180]) by sfbaymail2sca.sfbay.sun.com
> (8.13.6+Sun/8.12.10/ENSMAIL,v2.2) with ESMTP id k5HJvSdq023375 for
> <kohsuke.kawaguchi_at_sfbay.sun.com>; Sat, 17 Jun 2006 12:57:28 -0700 (PDT)
>Received: from brm-avmta-1.central.sun.com
> (brm-avmta-1.Central.Sun.COM [129.147.4.11]) by sunmail3.sfbay.sun.com
> (8.11.7p1+Sun/8.11.7/ENSMAIL,v2.2) with ESMTP id k5HJvS427877 for
> <@sunmail1brm.central.sun.com:kohsuke.kawaguchi_at_sun.com>; Sat,
> 17 Jun 2006 12:57:28 -0700 (PDT)
>Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
> brm-avmta-1.central.sun.com
> (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
> id <0J100070LSRQJH00_at_brm-avmta-1.central.sun.com> for
> kohsuke.kawaguchi_at_sun.com (ORCPT kohsuke.kawaguchi_at_sun.com); Sat,
> 17 Jun 2006 13:57:26 -0600 (MDT)
>Received: from brmea-mail-4.sun.com ([192.18.98.36])
> by brm-avmta-1.central.sun.com
> (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
> with ESMTP id <0J10009JMSRP0G90_at_brm-avmta-1.central.sun.com> for
> kohsuke.kawaguchi_at_sun.com (ORCPT kohsuke.kawaguchi_at_sun.com); Sat,
> 17 Jun 2006 13:57:25 -0600 (MDT)
>Received: from relay12.sun.com ([217.140.40.34])
> by brmea-mail-4.sun.com (8.13.6+Sun/8.12.9) with ESMTP id k5HJvPeh003653 for
> <kohsuke.kawaguchi_at_sun.com>; Sat, 17 Jun 2006 13:57:25 -0600 (MDT)
>Received: from mms13es.sun.com (mms13es.sun.com [160.41.223.54])
> by relay12.sun.com with ESMTP for kohsuke.kawaguchi_at_sun.com; Sat,
> 17 Jun 2006 19:57:24 +0000 (Z)
>Received: from mms13bas.mms.eu.btsyntegra.com
> (mms13bas.mms.eu.btsyntegra.com [217.140.40.50]) by mms13es.sun.com with ESMTP
> for kohsuke.kawaguchi_at_sun.com; Sat, 17 Jun 2006 19:57:24 +0000 (Z)
>Received: from dev.java.net (dev.java.net [64.125.133.206])
> by relay13.sun.com for kohsuke.kawaguchi_at_sun.com; Sat,
> 17 Jun 2006 19:57:23 +0000 (Z)
>Received: (qmail 4742 invoked by uid 5000); Sat, 17 Jun 2006 19:57:20 +0000
>Received: (qmail 4721 invoked from network); Sat, 17 Jun 2006 19:57:20 +0000
>Date: Sat, 17 Jun 2006 12:57:17 -0700
>From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
>Subject: Programatically control glassfish?
>Sender: dev-return-1353-kohsuke.kawaguchi=sun.com_at_glassfish.dev.java.net
>To: dev_at_glassfish.dev.java.net
>Reply-to: dev_at_glassfish.dev.java.net
>Message-id: <44945E9D.4010509_at_Sun.COM>
>MIME-version: 1.0
>Content-type: multipart/signed;
> boundary=------------ms060704030005060305040201; micalg=sha1;
> protocol="application/x-pkcs7-signature"
>Precedence: bulk
>Delivered-to: mailing list dev_at_glassfish.dev.java.net
>X-PMX-Version: 5.2.0.264296
>X-IronPort-Anti-Spam-Filtered: true
>X-IronPort-Anti-Spam-Result: AR4FAF74k0SBSw
>X-IronPort-AV: i="4.06,145,1149490800"; d="p7s'?scan'208";
> a="16897406:sNHT21005103"
>X-IRONPORT: SCANNED
>Mailing-List: contact dev-help_at_glassfish.dev.java.net; run by ezmlm
>List-Post: <mailto:dev_at_glassfish.dev.java.net>
>List-Unsubscribe: <mailto:dev-unsubscribe_at_glassfish.dev.java.net>
>List-Help: <mailto:dev-help_at_glassfish.dev.java.net>
>X-No-Archive: yes
>User-Agent: Thunderbird 1.5.0.4 (Windows/20060516)
>Original-recipient: rfc822;kohsuke.kawaguchi_at_sun.com
>
>
>--------------ms060704030005060305040201
>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>Content-Transfer-Encoding: 7bit
>
>
>Hi,
>
>Is there any way to programatically start/stop Glassfish,
>deploy/undeploy applications?
>
> 1. Is there a set of Ant tasks to do this?
> (Tomcat has one, see [1])
>
> 2. Is there a Java API that allows me to embed
> Glassfish into the current JVM, as opposed to launch
> a separate JVM?
>
>
>[1]
>http://tomcat.apache.org/tomcat-5.0-doc/catalina/docs/api/org/apache/catalina/ant/package-summary.html
>
>