Re: IntelliJ IDE

2017-07-12 Thread Svetlin Zarev
Hi, If you are going to use the community edition of IJ, then you'll have to manually manage the server - i.e. start/stop/deploy/undeploy. > I am still unclear how to deploy multiple projects to TomEE Just build the wars and drop them in the "webapps" folder of a running TomEE server > The serve

Re: Understanding these Errors and how to Resolve.

2018-01-30 Thread Svetlin Zarev
Hi, The JavaEE api jar is not in your class path. Unfortunately the javac compiler does not complain about missing jars put in the -cp parameter. You should make sure that this location is correct and the file exists: /cygdrive/e/EDU/EJB_EXP/Open_EJB/openejb-3.0/openejb-3.0/lib/javaee-5.0-1.jar

TomEE default service providers

2016-06-27 Thread Svetlin Zarev
Hello, Let’s assume that I have an object: org.example.ExampleObject and a service provider: org.example.ExampleObjectProvider The service provider has a service-jar.xml: Can I register that service provider to be the *default* service provider for ExampleObject objects withou

Re: TomEE default service providers

2016-06-27 Thread Svetlin Zarev
b < > https://github.com/rmannibucau> | > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber > <http://www.tomitribe.com> | JavaEE Factory > <https://javaeefactory-rmannibucau.rhcloud.com> > > 2016-06-27 14:19 GMT+02:00 Svet

Re: TomEE default service providers

2016-06-28 Thread Svetlin Zarev
:00 Romain Manni-Bucau : > 2016-06-27 16:23 GMT+02:00 Svetlin Zarev >: > > > HI, > > > > Are there any resources for the Template API ? I was not able to find > any. > > > > > Javadoc mainly: > > https://github.com/apache/tomee/blob/master/cont

Re: TomEE default service providers

2016-06-28 Thread Svetlin Zarev
> if you speak about the service-provider system property ( > openejb.provider.default) to override defaults and service-jar.xml: it is > stable That's great. > if you speak about the class: internal (i'd like to kill it to bind it to > the container instance and not keep it global to be honest bu

tomee-catalina leaves open streams

2016-07-08 Thread Svetlin Zarev
Hi, TomcatWebappDeployer::deployWebApps() does not close the InputStream to the context.xml it opens.It opens the stream on line 462 or 471 (branch 7.0.1) , an uses it only to check if it's null on line 500 without ever reading it. Leaving the stream open may cause application undeployment issues

Separating the SystemInstance initialization from the TomcatLoader initialization

2016-07-17 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 proble

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

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 - then

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 init

Re: Separating the SystemInstance initialization from the TomcatLoader initialization

2016-07-18 Thread Svetlin Zarev
> openejb.configurator property allows to change ConfigurationFactory This is exactly what I'm looking for, but unfortunately it does not work. The TomcatWebAppBuilder creates a ConfigurationFactory instance regardless of that property and the one from the property is ignored.

AutoConfig deployer and persistence units

2016-07-20 Thread Svetlin Zarev
HI, The AutoConfig deployer performs auto-config on the (non)jta-dataSources if no (non)Jta-DataSourceId is present, but IMO the DataSourceId discovery mechanism seems buggy. What it does is to check the ResourceInfo whether it contains a property named "JtaManaged" and compares it to true/false.

Re: AutoConfig deployer and persistence units

2016-07-21 Thread Svetlin Zarev
by tomee) DataSource behavior is unknow. > > What is your issue? Didnt you just forget to put the type in your auto > resource deployment mecanism? > > Side note: this is unlikely we change that now cause too much apps and > people rely on it. > > Le 21 juil. 2016 07:52, "Sve

Re: AutoConfig deployer and persistence units

2016-07-21 Thread Svetlin Zarev
> <http://www.tomitribe.com> | JavaEE Factory > <https://javaeefactory-rmannibucau.rhcloud.com> > > 2016-07-21 9:57 GMT+02:00 Svetlin Zarev : > > > Hi Romain, > > > > > > > > I have a DynamicDeployer that processes the persistence units and

Re: AutoConfig deployer and persistence units

2016-07-21 Thread Svetlin Zarev
>Ok then just set the type of the resource on the openejb resource you >created, should be enough Actually I;m already doing that, but the resulting ResourceInfo does not preserve the type. Or maybe I just misunderstood you. What I'm doing is: Resource resource = new Resource(id); resource.setTyp

Re: AutoConfig deployer and persistence units

2016-07-21 Thread Svetlin Zarev
Factory > <https://javaeefactory-rmannibucau.rhcloud.com> > > 2016-07-21 12:20 GMT+02:00 Svetlin Zarev >: > > > >Ok then just set the type of the resource on the openejb resource you > > >created, should be enough > > > > Actually I;m already doin

Typo in Assembler

2016-07-21 Thread Svetlin Zarev
Line 2908 (7.0.0 release) we can find serviceInfo.properties.remove("DefitionEncoding"). It should be "DefinitionEncoding" instead.

Re: AutoConfig deployer and persistence units

2016-07-21 Thread Svetlin Zarev
t; <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> > > 2

TomcatWebAppBuilder overwrites the last added event listener

2016-08-04 Thread Svetlin Zarev
Hi, The TomcatWebAppBuilder overwrites the last added event listener. Line 1764 (on branch/tag 7.0.1): System.arraycopy(appEventListeners, 0, newEventListeners, 1, appEventListeners.length); newEventListeners[newEventListeners.length - 1] = endWebBeansListener; It should be: System.arraycopy(app

Re: TomcatWebAppBuilder overwrites the last added event listener

2016-08-04 Thread Svetlin Zarev
Hi, > we set the first and last listeners so it looks right. Notice the initial index of the destination array in the System.arraycopy() call. You start from index 1 -> the first element in the new array is NULL and last one gets overwritten by: newEventListeners[newEventListeners.length - 1] =

Re: TomcatWebAppBuilder overwrites the last added event listener

2016-08-04 Thread Svetlin Zarev
triber > <http://www.tomitribe.com> | JavaEE Factory > <https://javaeefactory-rmannibucau.rhcloud.com> > > 2016-08-04 15:22 GMT+02:00 Svetlin Zarev >: > > > Hi, > > > > > we set the first and last listeners so it looks right. > > > > Notice the initial

Re: TomcatWebAppBuilder overwrites the last added event listener

2016-08-04 Thread Svetlin Zarev
er > <http://www.tomitribe.com> | JavaEE Factory > <https://javaeefactory-rmannibucau.rhcloud.com> > > 2016-08-04 15:40 GMT+02:00 Svetlin Zarev >: > > > Thanks, I've created a JIRA issue and also attached a sample application > > that demonstrat

Re: TomcatWebAppBuilder overwrites the last added event listener

2016-08-04 Thread Svetlin Zarev
it is fixed > Thanks !

OpenEJB 4.5.2 & Protection Domains

2016-08-30 Thread Svetlin Zarev
Hi! I've hit a an issue with newer java versions and an old OpenEJB v4.5.2. The issue is caused by the following change in the JRE: security-libs/java.security *DomainCombiner will no longer consult runtime policy for static ProtectionDomain objects when combining ProtectionDomain objects* Applic

Re: OpenEJB 4.5.2 & Protection Domains

2016-08-31 Thread Svetlin Zarev
HI, Here is the stack trace: https://gist.github.com/SvetlinZarev/fbc1303df54a9991c4a8aa7cb9d501be And here is a sample app: https://gist.github.com/SvetlinZarev/102f8249e2882ffa73c4f367f75fada4 And the change in OpenJDK: http://hg.openjdk.java.net/jdk7u/jdk7u/jdk/rev/7e676266241c The difference i

Re: OpenEJB 4.5.2 & Protection Domains

2016-08-31 Thread Svetlin Zarev
> Also would be great to check outside of eclipse and share a buildable with tomee maven plugin. ​ com.github.svetlinzarev.example.webapp.zip ​ ​ com.github.svetlinzarev.example.webapp-1.0.0.war

Re: javax.naming.OperationNotSupportedException:+Context+is+read+only

2016-09-27 Thread Svetlin Zarev
Hi. Section 5.3.4 of the jee spec: The container must ensure that the application component instances have only read access to their naming context. The container must throw the javax.naming.OperationNotSupportedException from all the methods of the javax.naming.Context interface that modify the e

JavaEE Spec confusion

2017-01-25 Thread Svetlin Zarev
Hello, I've stumbled upon a contradiction in the JEE spec: 1. The UserTransaction javadoc [1] states that if the thread is already associated with a transaction and the Transaction Manager implementation does not support nested transactions, a NotSupportedException will be thrown. 2. On the othe