Le mar. 31 juil. 2018 à 17:21, ChrisOwens <[email protected]> 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
> > <Deployments>
> >  + 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 some java class?
> In the RAR? Directly in tomEE.xml?
>

There are ways to override the ra.xml config through <resource> blocks.


>
> The support forums are full of people asking "How do I deploy a RAR in
> TomEE?" and tearing out their hair because they can't get an answer.
> Somehow RAR files seem to be a blind spot in the documentation. Is it
> because nobody is using them? Should I be considering some alternative
> approach?
>

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.


>
> What I am trying to do is have a message-driven bean that handles Kafka
> messages.  There's a sample implementation  here
> <
> https://abhirockzz.wordpress.com/2017/05/30/consume-from-kafka-topics-using-message-driven-beans/>
>
> , that makes use of a connector RAR published by the Payara project ( here
> <https://github.com/payara/Cloud-Connectors/tree/master/Kafka>  ). I have
> been all over the RAR from Payara and it seems to be fully compliant with
> JavaEE 7; nothing in there that makes use of any special Payara features,
> etc.
>

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


>
> With a fresh copy of TomEE 7.0.5, I tried adding, to
> ${CATALINA_BASE}/conf/tomee.xml, a Deployments element that references the
> RAR, and then starting the server. The server failed claiming it can't find
> a class that is referred to in the connector code.   Here is the relevant
> part of the log:
>
>
Side note: this part of your mail got eaten so we (I with gmail?) don't see
the log error or the next lib listing.


>
>
> I have examined the RAR, and the class that TomEE can't find, is definitely
> there, in one of the JARs included in the RAR.
>

The libs are found scanning the rar content directly.


>
> The RAR looks like this:
>
>
> And kafka-clients-0.10.2.1.jar contained in the rar, contains this:
>
>
>
>
>
>
>
> --
> Sent from:
> http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html
>

Reply via email to