Re: Classloader woes: EAR containing an RAR

2018-08-01 Thread Romain Manni-Bucau
Using jta 1.2 and @Transactional it would if the consumer impl wpuld. Means it will not for kafka but it is true of a connector as well until you fake the tx/persistence. See connectors as a default interceptor stack, cdi provides a customizable one by design. This is why jca will no more be mains

Re: Classloader woes: EAR containing an RAR

2018-08-01 Thread David Jencks
Does the CDI approach support consuming a message inside a transaction? Looking at one of the Kafka cdi examples, I didn’t immediately see how it would. Being able to roll back the consumption of a message always seemed one of the main points of jca to me. Thanks David Jencks Sent from my iPh

Re: Classloader woes: EAR containing an RAR

2018-08-01 Thread Romain Manni-Bucau
Le mer. 1 août 2018 à 16:12, ChrisOwens a écrit : > I am trying to set up a reproducer project using the tomee maven plugin. > I am looking at the plugin's new documentation page to which you referred > me. (Might I suggest that you take down the old, obsolete documentation > page, which is the f

Re: Classloader woes: EAR containing an RAR

2018-08-01 Thread ChrisOwens
I am trying to set up a reproducer project using the tomee maven plugin. I am looking at the plugin's new documentation page to which you referred me. (Might I suggest that you take down the old, obsolete documentation page, which is the first hit for google "tomee maven plugin", or at least put i

Re: Classloader woes: EAR containing an RAR

2018-08-01 Thread Romain Manni-Bucau
Depends the people but personally I see JCA as deprecated by CDI addition to JavaEE 6 (tomee or any other server). Goal being to realign the programming model on the more natural one of marking a method as a listener rather than having this heavy process to define inbound/outbound connectors + the

Re: Classloader woes: EAR containing an RAR

2018-08-01 Thread ChrisOwens
Putting aside for a moment the question of whether or not the adapter is packaged in a rar file, what is your opinion of JCA for a JavaEE 7 application hosted on TomeEE +? Use it or avoid it? -- Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html

Re: Classloader woes: EAR containing an RAR

2018-07-31 Thread Romain Manni-Bucau
I am happy to help you using the rar if you can setup a reproducer project but for kafka gain is pretty low and being cdi based opens more doors like composing with decorators, getting a better error handling than EJB, getting rid of some useless layer for kafka etc...but we can still do the exerci

Re: Classloader woes: EAR containing an RAR

2018-07-31 Thread ChrisOwens
Romain Manni-Bucau wrote > Rar is kind of really overkill for any new code in java 6 but if you > already have the connector it is fine to deploy it but quite rare. I would love to get rid of the rar file and the whole deployment mess. Thus far, I have tried putting the sources for the java clas

Re: Classloader woes: EAR containing an RAR

2018-07-31 Thread ChrisOwens
Romain Manni-Bucau wrote > If your goal is really to interact with kafka - and you dont care of rar > by > themselves - i would recommand to use a cdi extension, > you can find several on the net like > https://github.com/bgjug/kafka-cdi-extension and > https://github.com/aerogear/kafka-cdi Thank

Re: Classloader woes: EAR containing an RAR

2018-07-31 Thread Romain Manni-Bucau
Le mar. 31 juil. 2018 à 17:21, ChrisOwens a écrit : > Romain Manni-Bucau wrote > > 1. self contained and not used in another modules (ejb or web) -> you > > register it in tomee.xml (in > > > > + config if needed) and that's it > > What does "+ config if needed" mean? I think you mean I should

Re: Classloader woes: EAR containing an RAR

2018-07-31 Thread Romain Manni-Bucau
Le mar. 31 juil. 2018 à 17:22, ChrisOwens a écrit : > Romain Manni-Bucau wrote > > Are you able to push a reproducer on github with the tomee-maven-plugin > > configured? > > I'm working on that now. I don't usually use the tomee-maven-plugin, so I > thought I would check the documentation here

Re: Classloader woes: EAR containing an RAR

2018-07-31 Thread ChrisOwens
Romain Manni-Bucau wrote > Are you able to push a reproducer on github with the tomee-maven-plugin > configured? I'm working on that now. I don't usually use the tomee-maven-plugin, so I thought I would check the documentation here . The version

Re: Classloader woes: EAR containing an RAR

2018-07-31 Thread ChrisOwens
Romain Manni-Bucau wrote > 1. self contained and not used in another modules (ejb or web) -> you > register it in tomee.xml (in > > + config if needed) and that's it What does "+ config if needed" mean? I think you mean I should put some config information somewhere. Where? In some XML file? In

Re: Classloader woes: EAR containing an RAR

2018-07-31 Thread Romain Manni-Bucau
Hi, "it" meant the connector api Hi level you have mainly 2 cases for rars (i ignore the webapp nested war support here): 1. self contained and not used in another modules (ejb or web) -> you register it in tomee.xml (in + config if needed) and that's it 2. you use it as a connector for another

Re: Classloader woes: EAR containing an RAR

2018-07-31 Thread ChrisOwens
Let me ask what I hope is a simpler question, but 2 days of searching online lead me to believe that lots of people have this problem and there is no documented solution. 1) I have a RAR file that describes a JCA connector. 2) I would like to use it with TomEE. 3) What should I do? -- S

Re: Classloader woes: EAR containing an RAR

2018-07-31 Thread ChrisOwens
Romain Manni-Bucau wrote > Hi > > The api part of the rar should be shared so put * > it * > in tomee/lib (or the ear > lib module). Thanks Romain 1) "It" refers to what? The rar file? the API part of the rar, as an ordinary jar? 2) "tomee/lib"? That means $CATALINA_HOME/lib? 3) "the ear

Re: Classloader woes: EAR containing an RAR

2018-07-31 Thread ChrisOwens
Romain Manni-Bucau wrote > The api part of the rar should be shared so put * > it * > in tomee/lib (or the ear > lib module). Thanks Romain 1) "It" refers to what? The rar file? the API part of the rar, as an ordinary jar? 2) "tomee/lib"? That means $CATALINA_HOME/lib? 3) "the ear lib mod

Re: Classloader woes: EAR containing an RAR

2018-07-30 Thread Romain Manni-Bucau
If there is no annotation i dont recall if the ra.xml is read. We have a nested rar support in wars but it is really advanced and surely not desired outside cloud hosting (where you dont have other choices). In any case some repackaging is needed. Le lun. 30 juil. 2018 22:08, David Jencks a écr

Re: Classloader woes: EAR containing an RAR

2018-07-30 Thread David Jencks
I was actually thinking of putting the entire classes jar from inside the rar into the ear lib module, not exploding the rar. There weren’t any annotations in the last rar spec I worked with… David Jencks > On Jul 30, 2018, at 12:33 PM, Romain Manni-Bucau > wrote: > > Hi > > The api part o

Re: Classloader woes: EAR containing an RAR

2018-07-30 Thread Romain Manni-Bucau
Hi The api part of the rar should be shared so put it in tomee/lib (or the ear lib module). Worse case, David's trick of exploding the rar in the ear can work if it uses annotations (just put it in any scanned module). Le lun. 30 juil. 2018 21:09, David Jencks a écrit : > Hopefully someone who

Re: Classloader woes: EAR containing an RAR

2018-07-30 Thread David Jencks
Hopefully someone who actually knows something will speak up soon… You might try putting the rar classes in a lib jar in the ear. I don’t recall if you have to do something with the manifest class path in the ejb module and rar to get this to work. David Jencks > On Jul 30, 2018, at 11:16 AM

Classloader woes: EAR containing an RAR

2018-07-30 Thread ChrisOwens
I am deploying (tomEE-plus 7.0.5) an EAR file that contains two modules: a JCA connector defined in a rar file, and a JAR full of ejbs. The EJBs contain classes that depend upon classes packaged in the RAR. Whether or not I set "initialize-in-order" to true, I get the same behavior: The logs sho