tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sathwik"<sath...@apache.org>
Subject Re: System configuration in Tomee Embedded
Date Tue, 16 Aug 2016 14:03:46 GMT
Hi Romain,

Incase the dir is not set on the Configuration object, there is no way to get hold of the
baseDIr that the container creates. getBaseDir() is not accessible.

Container start() is doing a very heavy lifting as against to the setup(). The setting of
catalina base is within the start(). So I can't even get the system property within the setup().

What actually am looking is to provide a way to make changes to catalina.policy, catalina.properties,
logging.properties and make the embedded container use it as against to the version of the
files what the tomee embedded container uses.

regards,
sathwik

On 2016-07-21 15:58 (+0530), Romain Manni-Bucau <rmannibucau@gmail.com> wrote: 
> Hmm,
> 
> that's true, thought I changed that, seems not
> 
> anyway easiest is to override setup to add post tasks:
> 
> public void setup(final Configuration configuration) {
> 
>   super.setup(configuration);
> 
>   fillMyConfig();
> 
> }
> 
> 
> Does it work for you?
> 
> 
> 
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://blog-rmannibucau.rhcloud.com> | Old Wordpress Blog
> <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau>
|
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> <http://www.tomitribe.com> | JavaEE Factory
> <https://javaeefactory-rmannibucau.rhcloud.com>
> 
> 2016-07-21 12:06 GMT+02:00 Sathwik <sathwik@apache.org>:
> 
> > Hi Romain,
> >
> >
> > https://github.com/apache/tomee/blob/master/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/Container.java#L381
> >
> > Am I missing something.
> >
> > regards,
> > sathwik
> >
> > On 2016-07-21 15:31 (+0530), Romain Manni-Bucau <rmannibucau@gmail.com>
> > wrote:
> > > Not if existing
> > >
> > https://github.com/apache/tomee/blob/master/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/Container.java#L719
> > >
> > >
> > > Romain Manni-Bucau
> > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > <https://blog-rmannibucau.rhcloud.com> | Old Wordpress Blog
> > > <http://rmannibucau.wordpress.com> | Github <
> > https://github.com/rmannibucau> |
> > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > > <http://www.tomitribe.com> | JavaEE Factory
> > > <https://javaeefactory-rmannibucau.rhcloud.com>
> > >
> > > 2016-07-21 11:52 GMT+02:00 Sathwik <sathwik@apache.org>:
> > >
> > > > Hi Romain,
> > > >
> > > >
> > > >
> > https://github.com/apache/tomee/blob/master/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/Container.java#L380
> > > >
> > > > The basedir gets created afresh.
> > > >
> > > > regards,
> > > > sathwik
> > > >
> > > > On 2016-07-21 14:55 (+0530), Romain Manni-Bucau <rmannibucau@gmail.com
> > >
> > > > wrote:
> > > > > Hi
> > > > >
> > > > > Configuration.property(k, v) is the way to go.
> > > > >
> > > > > You should also be able to set a "dir" on the configuration which
is
> > the
> > > > > basedir and create the configuration inside *before* starting the
> > > > container
> > > > > (each time) so something like;
> > > > >
> > > > > main(args) {
> > > > >   final File base = createMybase();
> > > > >   Main.main(new String[] {"--directory", base.getPath()});
> > > > > }
> > > > >
> > > > >
> > > > > Romain Manni-Bucau
> > > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > > <https://blog-rmannibucau.rhcloud.com> | Old Wordpress Blog
> > > > > <http://rmannibucau.wordpress.com> | Github <
> > > > https://github.com/rmannibucau> |
> > > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > > > > <http://www.tomitribe.com> | JavaEE Factory
> > > > > <https://javaeefactory-rmannibucau.rhcloud.com>
> > > > >
> > > > > 2016-07-21 11:16 GMT+02:00 Sathwik <sathwik@apache.org>:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > When using the org.apache.tomee.embedded.Main to start an embedded
> > > > > > container, what is the way to pass in the configuration options.
> > > > > >
> > > > > > For example:
> > > > > > exclusions_list file := could make this work only with the
> > > > > > -Dopenejb.additional.exclude=
> > > > > > JAVA_OPTS="$JAVA_OPTS
> > > > > >
> > > >
> > -Djava.naming.factory.initial=org.apache.openejb.core.LocalInitialContextFactory"
> > > > > > JAVA_OPTS="$JAVA_OPTS -Dopenejb.log.factory=slf4j"
> > > > > >
> > > > > > Since the Tomee working directory is dynamically created, and
> > > > openejb.home
> > > > > > is pointing to this directory. How is it possible to override
the
> > > > defaults.
> > > > > >
> > > > > > regards,
> > > > > > sathwik
> > > > > >
> > > > >
> > > >
> > >
> >
> 

Mime
View raw message