You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Alex The Rocker <al...@gmail.com> on 2013/02/16 18:14:11 UTC
Command-line tools for updating TomEE configuration?
Hello,
I am looking for command-line tools for modifying TomEE configuration.
I know IBM WebSphere Application Server has such tool, called
wsadmin.{sh,bat}. It allows adding JNDI aliases, JDBC datasources, etc.
even without starting the application server (if ran locally with -connType
NONE) or to a remote application server with authentication stuff.
How about TomEE, anything available?
My use case: I need to programmatically add this into tomee.xml:
<Resource id="DefaultJmsResourceAdapter" type="ActiveMQResourceAdapter">
BrokerXmlConfig = broker:(tcp://0.0.0.0:61617
)?useJmx=false&persistent=false
ServerUrl = vm://localhost
Datasource =
</Resource>
<Resource id="connectionFactory" type="javax.jms.ConnectionFactory">
ResourceAdapter = DefaultJmsResourceAdapter
</Resource>
Of course it's trivial, but if there were a TomEE command-line tool for
performing this based on a scripting syntax on "Administration objects"
(like wsadmin works with WebSphere); then I'd use it instead of making my
own parsing & generation.
Thanks,
Alex
Re: Command-line tools for updating TomEE configuration?
Posted by Romain Manni-Bucau <rm...@gmail.com>.
All tomee conf can be a properties one...far easier to generate
Le 16 févr. 2013 21:23, "Alex The Rocker" <al...@gmail.com> a écrit :
> I'm not aware of SSH console, can't find anything about it in TomEE's
> documentation.
>
> However, remember that my 1st use case is modifying a TomEE configuration
> from an installer, before TomEE is started up. I'm guessing that SSH
> console means starting TomEE with a configured SSH admin port, right?
>
> I guess for the short term I have no choice but parsing & regenerating
> myself tomee.xml.
>
> Thanks,
> Alex
>
>
> On Sat, Feb 16, 2013 at 9:08 PM, Romain Manni-Bucau
> <rm...@gmail.com>wrote:
>
> > Did you look the ssh console?
> >
> > It gives something not far.
> >
> > For resources we need some work but we support deployment/redeployment of
> > resources.xml IIRC
> >
> > + tomcat exposes some jmx management
> > Le 16 févr. 2013 19:44, "Alex The Rocker" <al...@gmail.com> a
> écrit :
> >
> > > Okay, I guess the answer is that no such command-line utility exists
> yet.
> > >
> > > It's not an API, but I can give a prototype usage:
> > >
> > > tomeeadmin.sh
> > >
> > > [-h(help)] Displays this help.
> > >
> > > [-c command] Runs a single commands, if there are multiple such
> options,
> > > then they
> > > run in their order of appearance.
> > >
> > > [-f script_file_name] Runs a script in given file.
> > >
> > > [-conntype NONE] Specifies that tomeeadmin.sh runs in local mode, it
> will
> > > operate on
> > > the configuration of the TomEE installation from which
> > it
> > > is launched.
> > >
> > > [-conntype JMX [-host host:port] [-user userid] [-password password]]
> > > Specifies that tomeeadmin.sh will connect to the
> > > specified host:port
> > > management application (JSR 60 compliant) using
> > specified
> > > user and password,
> > > and that it will operate on this remote server's
> > > configuration.
> > >
> > > [script parameters] optional arguments which will be passed to the
> > script,
> > > if any.
> > >
> > > Currently JMX / JSR 160 is nice to have for my needs (I just need to be
> > > able to call this tool from our installer), but I think it can be
> helpful
> > > for administrators, and since there's a standard for it, why not using
> > it?
> > >
> > > Of course I can't be more precise because I don't know TomEE's
> management
> > > object model : is this management object model documented somewhere?
> > >
> > > Ideally, there should be an extra option (-scriptlang name) for
> > specifying
> > > the scripting language, which should be any JSR 223 compliant one.
> > >
> > > The use cases are many : install / uninstall a web app (yeah I know
> with
> > > TomEE it's a simple cp/rm, but think about remote servers),
> > > add/update/remove JNDI, JDBC, JMS, JTA, etc. items, setup virtual hosts
> > > definitions, you name it...
> > >
> > > I realize that there would be substantial work to do it :)
> > >
> > > Thanks,
> > > Alexandre
> > >
> > >
> > > On Sat, Feb 16, 2013 at 6:20 PM, Romain Manni-Bucau
> > > <rm...@gmail.com>wrote:
> > >
> > > > Can you prototype an api/usage?
> > > > Le 16 févr. 2013 18:14, "Alex The Rocker" <al...@gmail.com> a
> > > écrit :
> > > >
> > > > > Hello,
> > > > >
> > > > > I am looking for command-line tools for modifying TomEE
> > configuration.
> > > > >
> > > > > I know IBM WebSphere Application Server has such tool, called
> > > > > wsadmin.{sh,bat}. It allows adding JNDI aliases, JDBC datasources,
> > etc.
> > > > > even without starting the application server (if ran locally with
> > > > -connType
> > > > > NONE) or to a remote application server with authentication stuff.
> > > > >
> > > > > How about TomEE, anything available?
> > > > >
> > > > > My use case: I need to programmatically add this into tomee.xml:
> > > > >
> > > > > <Resource id="DefaultJmsResourceAdapter"
> > > type="ActiveMQResourceAdapter">
> > > > > BrokerXmlConfig = broker:(tcp://0.0.0.0:61617
> > > > > )?useJmx=false&persistent=false
> > > > > ServerUrl = vm://localhost
> > > > > Datasource =
> > > > > </Resource>
> > > > >
> > > > > <Resource id="connectionFactory"
> type="javax.jms.ConnectionFactory">
> > > > > ResourceAdapter = DefaultJmsResourceAdapter
> > > > > </Resource>
> > > > >
> > > > > Of course it's trivial, but if there were a TomEE command-line tool
> > for
> > > > > performing this based on a scripting syntax on "Administration
> > objects"
> > > > > (like wsadmin works with WebSphere); then I'd use it instead of
> > making
> > > my
> > > > > own parsing & generation.
> > > > >
> > > > > Thanks,
> > > > > Alex
> > > > >
> > > >
> > >
> >
>
Re: Command-line tools for updating TomEE configuration?
Posted by Alex The Rocker <al...@gmail.com>.
I'm not aware of SSH console, can't find anything about it in TomEE's
documentation.
However, remember that my 1st use case is modifying a TomEE configuration
from an installer, before TomEE is started up. I'm guessing that SSH
console means starting TomEE with a configured SSH admin port, right?
I guess for the short term I have no choice but parsing & regenerating
myself tomee.xml.
Thanks,
Alex
On Sat, Feb 16, 2013 at 9:08 PM, Romain Manni-Bucau
<rm...@gmail.com>wrote:
> Did you look the ssh console?
>
> It gives something not far.
>
> For resources we need some work but we support deployment/redeployment of
> resources.xml IIRC
>
> + tomcat exposes some jmx management
> Le 16 févr. 2013 19:44, "Alex The Rocker" <al...@gmail.com> a écrit :
>
> > Okay, I guess the answer is that no such command-line utility exists yet.
> >
> > It's not an API, but I can give a prototype usage:
> >
> > tomeeadmin.sh
> >
> > [-h(help)] Displays this help.
> >
> > [-c command] Runs a single commands, if there are multiple such options,
> > then they
> > run in their order of appearance.
> >
> > [-f script_file_name] Runs a script in given file.
> >
> > [-conntype NONE] Specifies that tomeeadmin.sh runs in local mode, it will
> > operate on
> > the configuration of the TomEE installation from which
> it
> > is launched.
> >
> > [-conntype JMX [-host host:port] [-user userid] [-password password]]
> > Specifies that tomeeadmin.sh will connect to the
> > specified host:port
> > management application (JSR 60 compliant) using
> specified
> > user and password,
> > and that it will operate on this remote server's
> > configuration.
> >
> > [script parameters] optional arguments which will be passed to the
> script,
> > if any.
> >
> > Currently JMX / JSR 160 is nice to have for my needs (I just need to be
> > able to call this tool from our installer), but I think it can be helpful
> > for administrators, and since there's a standard for it, why not using
> it?
> >
> > Of course I can't be more precise because I don't know TomEE's management
> > object model : is this management object model documented somewhere?
> >
> > Ideally, there should be an extra option (-scriptlang name) for
> specifying
> > the scripting language, which should be any JSR 223 compliant one.
> >
> > The use cases are many : install / uninstall a web app (yeah I know with
> > TomEE it's a simple cp/rm, but think about remote servers),
> > add/update/remove JNDI, JDBC, JMS, JTA, etc. items, setup virtual hosts
> > definitions, you name it...
> >
> > I realize that there would be substantial work to do it :)
> >
> > Thanks,
> > Alexandre
> >
> >
> > On Sat, Feb 16, 2013 at 6:20 PM, Romain Manni-Bucau
> > <rm...@gmail.com>wrote:
> >
> > > Can you prototype an api/usage?
> > > Le 16 févr. 2013 18:14, "Alex The Rocker" <al...@gmail.com> a
> > écrit :
> > >
> > > > Hello,
> > > >
> > > > I am looking for command-line tools for modifying TomEE
> configuration.
> > > >
> > > > I know IBM WebSphere Application Server has such tool, called
> > > > wsadmin.{sh,bat}. It allows adding JNDI aliases, JDBC datasources,
> etc.
> > > > even without starting the application server (if ran locally with
> > > -connType
> > > > NONE) or to a remote application server with authentication stuff.
> > > >
> > > > How about TomEE, anything available?
> > > >
> > > > My use case: I need to programmatically add this into tomee.xml:
> > > >
> > > > <Resource id="DefaultJmsResourceAdapter"
> > type="ActiveMQResourceAdapter">
> > > > BrokerXmlConfig = broker:(tcp://0.0.0.0:61617
> > > > )?useJmx=false&persistent=false
> > > > ServerUrl = vm://localhost
> > > > Datasource =
> > > > </Resource>
> > > >
> > > > <Resource id="connectionFactory" type="javax.jms.ConnectionFactory">
> > > > ResourceAdapter = DefaultJmsResourceAdapter
> > > > </Resource>
> > > >
> > > > Of course it's trivial, but if there were a TomEE command-line tool
> for
> > > > performing this based on a scripting syntax on "Administration
> objects"
> > > > (like wsadmin works with WebSphere); then I'd use it instead of
> making
> > my
> > > > own parsing & generation.
> > > >
> > > > Thanks,
> > > > Alex
> > > >
> > >
> >
>
Re: Command-line tools for updating TomEE configuration?
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Did you look the ssh console?
It gives something not far.
For resources we need some work but we support deployment/redeployment of
resources.xml IIRC
+ tomcat exposes some jmx management
Le 16 févr. 2013 19:44, "Alex The Rocker" <al...@gmail.com> a écrit :
> Okay, I guess the answer is that no such command-line utility exists yet.
>
> It's not an API, but I can give a prototype usage:
>
> tomeeadmin.sh
>
> [-h(help)] Displays this help.
>
> [-c command] Runs a single commands, if there are multiple such options,
> then they
> run in their order of appearance.
>
> [-f script_file_name] Runs a script in given file.
>
> [-conntype NONE] Specifies that tomeeadmin.sh runs in local mode, it will
> operate on
> the configuration of the TomEE installation from which it
> is launched.
>
> [-conntype JMX [-host host:port] [-user userid] [-password password]]
> Specifies that tomeeadmin.sh will connect to the
> specified host:port
> management application (JSR 60 compliant) using specified
> user and password,
> and that it will operate on this remote server's
> configuration.
>
> [script parameters] optional arguments which will be passed to the script,
> if any.
>
> Currently JMX / JSR 160 is nice to have for my needs (I just need to be
> able to call this tool from our installer), but I think it can be helpful
> for administrators, and since there's a standard for it, why not using it?
>
> Of course I can't be more precise because I don't know TomEE's management
> object model : is this management object model documented somewhere?
>
> Ideally, there should be an extra option (-scriptlang name) for specifying
> the scripting language, which should be any JSR 223 compliant one.
>
> The use cases are many : install / uninstall a web app (yeah I know with
> TomEE it's a simple cp/rm, but think about remote servers),
> add/update/remove JNDI, JDBC, JMS, JTA, etc. items, setup virtual hosts
> definitions, you name it...
>
> I realize that there would be substantial work to do it :)
>
> Thanks,
> Alexandre
>
>
> On Sat, Feb 16, 2013 at 6:20 PM, Romain Manni-Bucau
> <rm...@gmail.com>wrote:
>
> > Can you prototype an api/usage?
> > Le 16 févr. 2013 18:14, "Alex The Rocker" <al...@gmail.com> a
> écrit :
> >
> > > Hello,
> > >
> > > I am looking for command-line tools for modifying TomEE configuration.
> > >
> > > I know IBM WebSphere Application Server has such tool, called
> > > wsadmin.{sh,bat}. It allows adding JNDI aliases, JDBC datasources, etc.
> > > even without starting the application server (if ran locally with
> > -connType
> > > NONE) or to a remote application server with authentication stuff.
> > >
> > > How about TomEE, anything available?
> > >
> > > My use case: I need to programmatically add this into tomee.xml:
> > >
> > > <Resource id="DefaultJmsResourceAdapter"
> type="ActiveMQResourceAdapter">
> > > BrokerXmlConfig = broker:(tcp://0.0.0.0:61617
> > > )?useJmx=false&persistent=false
> > > ServerUrl = vm://localhost
> > > Datasource =
> > > </Resource>
> > >
> > > <Resource id="connectionFactory" type="javax.jms.ConnectionFactory">
> > > ResourceAdapter = DefaultJmsResourceAdapter
> > > </Resource>
> > >
> > > Of course it's trivial, but if there were a TomEE command-line tool for
> > > performing this based on a scripting syntax on "Administration objects"
> > > (like wsadmin works with WebSphere); then I'd use it instead of making
> my
> > > own parsing & generation.
> > >
> > > Thanks,
> > > Alex
> > >
> >
>
Re: Command-line tools for updating TomEE configuration?
Posted by Alex The Rocker <al...@gmail.com>.
Okay, I guess the answer is that no such command-line utility exists yet.
It's not an API, but I can give a prototype usage:
tomeeadmin.sh
[-h(help)] Displays this help.
[-c command] Runs a single commands, if there are multiple such options,
then they
run in their order of appearance.
[-f script_file_name] Runs a script in given file.
[-conntype NONE] Specifies that tomeeadmin.sh runs in local mode, it will
operate on
the configuration of the TomEE installation from which it
is launched.
[-conntype JMX [-host host:port] [-user userid] [-password password]]
Specifies that tomeeadmin.sh will connect to the
specified host:port
management application (JSR 60 compliant) using specified
user and password,
and that it will operate on this remote server's
configuration.
[script parameters] optional arguments which will be passed to the script,
if any.
Currently JMX / JSR 160 is nice to have for my needs (I just need to be
able to call this tool from our installer), but I think it can be helpful
for administrators, and since there's a standard for it, why not using it?
Of course I can't be more precise because I don't know TomEE's management
object model : is this management object model documented somewhere?
Ideally, there should be an extra option (-scriptlang name) for specifying
the scripting language, which should be any JSR 223 compliant one.
The use cases are many : install / uninstall a web app (yeah I know with
TomEE it's a simple cp/rm, but think about remote servers),
add/update/remove JNDI, JDBC, JMS, JTA, etc. items, setup virtual hosts
definitions, you name it...
I realize that there would be substantial work to do it :)
Thanks,
Alexandre
On Sat, Feb 16, 2013 at 6:20 PM, Romain Manni-Bucau
<rm...@gmail.com>wrote:
> Can you prototype an api/usage?
> Le 16 févr. 2013 18:14, "Alex The Rocker" <al...@gmail.com> a écrit :
>
> > Hello,
> >
> > I am looking for command-line tools for modifying TomEE configuration.
> >
> > I know IBM WebSphere Application Server has such tool, called
> > wsadmin.{sh,bat}. It allows adding JNDI aliases, JDBC datasources, etc.
> > even without starting the application server (if ran locally with
> -connType
> > NONE) or to a remote application server with authentication stuff.
> >
> > How about TomEE, anything available?
> >
> > My use case: I need to programmatically add this into tomee.xml:
> >
> > <Resource id="DefaultJmsResourceAdapter" type="ActiveMQResourceAdapter">
> > BrokerXmlConfig = broker:(tcp://0.0.0.0:61617
> > )?useJmx=false&persistent=false
> > ServerUrl = vm://localhost
> > Datasource =
> > </Resource>
> >
> > <Resource id="connectionFactory" type="javax.jms.ConnectionFactory">
> > ResourceAdapter = DefaultJmsResourceAdapter
> > </Resource>
> >
> > Of course it's trivial, but if there were a TomEE command-line tool for
> > performing this based on a scripting syntax on "Administration objects"
> > (like wsadmin works with WebSphere); then I'd use it instead of making my
> > own parsing & generation.
> >
> > Thanks,
> > Alex
> >
>
Re: Command-line tools for updating TomEE configuration?
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Can you prototype an api/usage?
Le 16 févr. 2013 18:14, "Alex The Rocker" <al...@gmail.com> a écrit :
> Hello,
>
> I am looking for command-line tools for modifying TomEE configuration.
>
> I know IBM WebSphere Application Server has such tool, called
> wsadmin.{sh,bat}. It allows adding JNDI aliases, JDBC datasources, etc.
> even without starting the application server (if ran locally with -connType
> NONE) or to a remote application server with authentication stuff.
>
> How about TomEE, anything available?
>
> My use case: I need to programmatically add this into tomee.xml:
>
> <Resource id="DefaultJmsResourceAdapter" type="ActiveMQResourceAdapter">
> BrokerXmlConfig = broker:(tcp://0.0.0.0:61617
> )?useJmx=false&persistent=false
> ServerUrl = vm://localhost
> Datasource =
> </Resource>
>
> <Resource id="connectionFactory" type="javax.jms.ConnectionFactory">
> ResourceAdapter = DefaultJmsResourceAdapter
> </Resource>
>
> Of course it's trivial, but if there were a TomEE command-line tool for
> performing this based on a scripting syntax on "Administration objects"
> (like wsadmin works with WebSphere); then I'd use it instead of making my
> own parsing & generation.
>
> Thanks,
> Alex
>