Re: Separating the SystemInstance initialization from the TomcatLoader initialization

2017-02-03 Thread Lazar Kirchev
Hello Romain, It seems the commit https://github.com/apache/tomee/commit/ed37f9ee3995812ae91a19cf36a85d534787cefa does not fix the issue in TOMEE-1875. It is in the TomcatWebAppBuilder's constructor and it tries to get the ConfigurationFactory if already created, but this gets executed before the

Re: Separating the SystemInstance initialization from the TomcatLoader initialization

2016-07-18 Thread Romain Manni-Bucau
Ok get it now, opened https://issues.apache.org/jira/browse/TOMEE-1875 Romain Manni-Bucau @rmannibucau | Blog | Old Wordpress Blog | Github | LinkedIn

Re: Separating the SystemInstance initialization from the TomcatLoader initialization

2016-07-18 Thread Romain Manni-Bucau
2016-07-18 11:32 GMT+02:00 Svetlin Zarev : > > You can still init then reset it, not perfect but works well. > Bu then the components I set on the SystemInstance will not be accessible > to the TomcatLoader or other components after the reset. > > Then I'd use

Re: Separating the SystemInstance initialization from the TomcatLoader initialization

2016-07-18 Thread Svetlin Zarev
> You can still init then reset it, not perfect but works well. Bu then the components I set on the SystemInstance will not be accessible to the TomcatLoader or other components after the reset. > Or if you want to go this way your use case would be amisusage then. Currently it is, but if the

Re: Separating the SystemInstance initialization from the TomcatLoader initialization

2016-07-18 Thread Romain Manni-Bucau
2016-07-18 10:23 GMT+02:00 Svetlin Zarev : > > org.apache.openejb.assembler.classic.WebAppBuilder=foo.MyImpl > Thanks, that will do it. > > > if you need to capture things before a tomcat listener does the work. > I wanted to use the SystemInstance from a tomcat

Re: Separating the SystemInstance initialization from the TomcatLoader initialization

2016-07-18 Thread Svetlin Zarev
> org.apache.openejb.assembler.classic.WebAppBuilder=foo.MyImpl Thanks, that will do it. > if you need to capture things before a tomcat listener does the work. I wanted to use the SystemInstance from a tomcat listener, but it's unusable because it's not initialized, but if I initialize it -

Re: Separating the SystemInstance initialization from the TomcatLoader initialization

2016-07-18 Thread Romain Manni-Bucau
2016-07-18 9:09 GMT+02:00 Svetlin Zarev : > HI, > > >what's your use case? > I want to use a customized TomcatWebAppBuilder. I can simply do > "SystemInstance.get().setComponent(WebAppBuilder.class, webAppBuilder);" > before the TomcatLoader isinitialized and it

Re: Separating the SystemInstance initialization from the TomcatLoader initialization

2016-07-18 Thread Svetlin Zarev
HI, >what's your use case? I want to use a customized TomcatWebAppBuilder. I can simply do "SystemInstance.get().setComponent(WebAppBuilder.class, webAppBuilder);" before the TomcatLoader isinitialized and it will pick my instance instead of creating its own. But currently the SystemInstance is

Re: Separating the SystemInstance initialization from the TomcatLoader initialization

2016-07-18 Thread Romain Manni-Bucau
Hello Svetlin, what's your use case? Is the goal really to pass before TomcatLoader or to be before Server INIT event? Romain Manni-Bucau @rmannibucau | Blog | Old Wordpress Blog |

Separating the SystemInstance initialization from the TomcatLoader initialization

2016-07-18 Thread Svetlin Zarev
Hello, What do you think about moving the "SystemInstance.init()" from "TomcatLoader.initSystemInstance()" (AFTER_INIT) )to "ServerListener.lifecycleEvent" during the BEFORE_INIT event ? The initialization of the SystemInstance consists only of setting some properties, so it should not be a