Skip to main content

Call asadmin commands from a java program

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
4 replies [Last post]
grassbl8d2
Offline
Joined: 2009-01-22

Hi,,

Is theere a way by which I can use the commands in asadmin in java?

For example, asadmin start-domain or asadmin deploy "warfile"

as far as i can see from now, you can use java's api for handling processes.

but what i would like to do is to call the actual java classes that are
being used in a java program i'm making...

Is there any jar that I have to reference or is this possible? Much like how
cargo does it

thanks
carlo

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
ai109478
Offline
Joined: 2005-03-29
ss141213
Offline
Joined: 2005-03-30

Carlo,

Can you please provide some more information about what you want to do?

Thanks,
Sahoo
On Wednesday 10 November 2010 01:56 PM, Carlo Camerino wrote:
> Hi,,
>
> Is theere a way by which I can use the commands in asadmin in java?
>
> For example, asadmin start-domain or asadmin deploy "warfile"
>
> as far as i can see from now, you can use java's api for handling
> processes.
>
> but what i would like to do is to call the actual java classes that
> are being used in a java program i'm making...
>
>
> Is there any jar that I have to reference or is this possible? Much
> like how cargo does it
>
>
> thanks
> carlo

grassbl8d2
Offline
Joined: 2009-01-22

hi sahoo,

i was trying to find a way to mak easier to deploy to glassfish much like
JSR88 does. but i'm having a hard time finding any documentation regarding
it.
Cargo somehow does it but it doesn't exactly fit the requirements that I
would be doing.

I have to deploy things via scripts so that I can remotely manage several
glassfish servers at once.

How i plan to do it currently is to call asadmin scripts for deploying war
files.
afaik, asadmin is called using the console so i plan to use java's native
api for handling processes.

however, i'm thinking that the better way to handle this is to call the
classes that asadmin is using and use it in a java program.
i don't know if it is possible though but it would realy help a lot in the
requirement that i'm doing right now

thanks
carlo

On Thu, Nov 11, 2010 at 1:19 PM, Sanjeeb Sahoo wrote:

> Carlo,
>
> Can you please provide some more information about what you want to do?
>
> Thanks,
> Sahoo
>
> On Wednesday 10 November 2010 01:56 PM, Carlo Camerino wrote:
>
>> Hi,,
>>
>> Is theere a way by which I can use the commands in asadmin in java?
>>
>> For example, asadmin start-domain or asadmin deploy "warfile"
>>
>> as far as i can see from now, you can use java's api for handling
>> processes.
>>
>> but what i would like to do is to call the actual java classes that are
>> being used in a java program i'm making...
>>
>>
>> Is there any jar that I have to reference or is this possible? Much like
>> how cargo does it
>>
>>
>> thanks
>> carlo
>>
>
>

Sigal Shaharaba...
Offline
Joined: 2010-11-02

I am also interested in this issue, or alternatively some Java API for
the glassfish admin

TIA

P please consider the environment - do you really need to print this
email?

________________________________

From: Carlo Camerino [mailto:carlo.camerino@gmail.com]
Sent: Wednesday, November 10, 2010 10:27 AM
To: users@glassfish.dev.java.net
Subject: Call asadmin commands from a java program

Hi,,

Is theere a way by which I can use the commands in asadmin in java?

For example, asadmin start-domain or asadmin deploy "warfile"

as far as i can see from now, you can use java's api for handling
processes.

but what i would like to do is to call the actual java classes that are
being used in a java program i'm making...

Is there any jar that I have to reference or is this possible? Much like
how cargo does it

thanks

carlo

NOTICE: This email and any files transmitted with it are Enablence and Teledata-Networks confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. This message contains Enablence and Teledata-Networks confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.