Re: openjpa multiple persistence units

2018-10-22 Thread Matthew Broadhead

i found it
true

On 22/10/2018 19:14, Matthew Broadhead wrote:
eclipse IDE is complaining if i have multiple persistence units and 
they contain classes with the same name.  e.g.

http://java.sun.com/xml/ns/persistence;
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence 
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd;

    version="2.0">
    
        db1
db1Unmanaged
        com.test.entities.jpa.db1.Test
        
            
        
    
    
        db2
db2Unmanaged
        com.test.entities.jpa.db2.Test
        
            
        
    

is eclipse right or can i ignore the error?




RE: Startup time between TomEE 8.0.0-M1 Plus and MP

2018-10-22 Thread COURTAULT Francois
Hello Roberto,

So if I have understood you well TomEE MP is TomEE Web Profile + MP 
specifications, right ?

Best Regards.

-Original Message-
From: Roberto Cortez [mailto:radcor...@yahoo.com.INVALID]
Sent: lundi 22 octobre 2018 18:14
To: users@tomee.apache.org
Cc: d...@tomee.apache.org
Subject: Re: Startup time between TomEE 8.0.0-M1 Plus and MP

Hi Francois,

Thank you.

TomEE MP is build from TomEE WebProfile, so it does support Java EE, including 
JPA and Concurrency.

Stuff, available in MP Plus, like JMS or JBatch are currently not available in 
TomEE MP.

Regarding the error, I’ve only notice them after the release. I suspect that 
the MP JWT filter has some kind of impact in packaged apps, like the docs or 
the console, so they are failing to start. I’m going to have a better look at 
it.

Cheers,
Roberto

> On 22 Oct 2018, at 07:08, COURTAULT Francois  
> wrote:
>
> Hello everyone,
>
> I have performed some comparison between TomEE 8.0.0-M1 Plus and MP.
> The average startup time for TomEE  8.0.0-M1 Plus using java 11, on my
> laptop with Core i5, SSD and 16 GB of RAM  is: 1,303 ms The average
> startup time for TomEE  8.0.0-M1 MP using java 11, on my laptop with Core i5, 
> SSD and 16 GB of RAM  is: 1,824 ms I was expecting the opposite.
>
> Looking at the TomEE 8.0.0-M1 logs, I saw:
> 22-Oct-2018 14:25:46.872 SEVERE [main]
> org.apache.catalina.core.StandardContext.startInternal One or more
> Filters failed to start. Full details will be found in the appropriate
> container log file
> 22-Oct-2018 14:25:46.873 SEVERE [main]
> org.apache.catalina.core.StandardContext.startInternal Context [/docs] 
> startup failed due to previous errors ...
> 22-Oct-2018 14:25:47.116 SEVERE [main]
> org.apache.catalina.core.StandardContext.startInternal One or more
> Filters failed to start. Full details will be found in the appropriate
> container log file
> 22-Oct-2018 14:25:47.116 SEVERE [main]
> org.apache.catalina.core.StandardContext.startInternal Context 
> [/host-manager] startup failed due to previous errors ...
> 22-Oct-2018 14:25:47.306 SEVERE [main]
> org.apache.catalina.core.StandardContext.startInternal One or more
> Filters failed to start. Full details will be found in the appropriate
> container log file
> 22-Oct-2018 14:25:47.307 SEVERE [main]
> org.apache.catalina.core.StandardContext.startInternal Context [/manager] 
> startup failed due to previous errors ...
> 22-Oct-2018 14:25:47.497 SEVERE [main]
> org.apache.catalina.core.StandardContext.startInternal One or more
> Filters failed to start. Full details will be found in the appropriate
> container log file
> 22-Oct-2018 14:25:47.497 SEVERE [main]
> org.apache.catalina.core.StandardContext.startInternal Context []
> startup failed due to previous errors
>
> I didn't see those entries in TomEE 8.0.0-M1 Plus during startup: maybe this 
> can explain the startup time difference ? Is it an issue ?
>
> BTW, could you confirm or not to me that the difference between TomEE 8 Plus 
> and TomEE 8 MP are:
>
> * TomEE MP doesn't have Concurrency utilities for EE support 
> (available in Web Profile)
>
> * TomEE MP doesn't have JPA support (available in Web Profile)
>
> * TomEE MP doesn't have JAX-WS support (available  in Plus)
>
> * TomEE MP doesn't have JCA support (available in Plus)
>
> * TomEE MP doesn't have JMS support (available  in Plus)
>
> * TomEE MP doesn't have JBatch support (available in Plus)
>
> Could you also confirm to me or not, that TomEE 8 MP:
>
> * Will have CDI 2.0 support ?
>
> * Will have JSON-P 1.1 support ?
>
> * Will have JAX-RS 2.1 support ?
>
> * Will have JSON-B 1.0 support ?
>
> Best Regards.
> 
> This message and any attachments are intended solely for the addressees and 
> may contain confidential information. Any unauthorized use or disclosure, 
> either whole or partial, is prohibited.
> E-mails are susceptible to alteration. Our company shall not be liable for 
> the message if altered, changed or falsified. If you are not the intended 
> recipient of this message, please delete it and notify the sender.
> Although all reasonable efforts have been made to keep this transmission free 
> from viruses, the sender will not be liable for damages caused by a 
> transmitted virus.


 This message and any attachments are intended solely for the addressees and 
may contain confidential information. Any unauthorized use or disclosure, 
either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the 
message if altered, changed or falsified. If you are not the intended recipient 
of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free 
from viruses, the sender will not be liable for damages caused by a transmitted 
virus.


openjpa multiple persistence units

2018-10-22 Thread Matthew Broadhead
eclipse IDE is complaining if i have multiple persistence units and they 
contain classes with the same name.  e.g.

http://java.sun.com/xml/ns/persistence;
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence 
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd;

    version="2.0">
    
        db1
db1Unmanaged
        com.test.entities.jpa.db1.Test
        
            
        
    
    
        db2
db2Unmanaged
        com.test.entities.jpa.db2.Test
        
            
        
    

is eclipse right or can i ignore the error?


Re: Startup time between TomEE 8.0.0-M1 Plus and MP

2018-10-22 Thread Roberto Cortez
Hi Francois,

Thank you.

TomEE MP is build from TomEE WebProfile, so it does support Java EE, including 
JPA and Concurrency. 

Stuff, available in MP Plus, like JMS or JBatch are currently not available in 
TomEE MP.

Regarding the error, I’ve only notice them after the release. I suspect that 
the MP JWT filter has some kind of impact in packaged apps, like the docs or 
the console, so they are failing to start. I’m going to have a better look at 
it.

Cheers,
Roberto

> On 22 Oct 2018, at 07:08, COURTAULT Francois  
> wrote:
> 
> Hello everyone,
> 
> I have performed some comparison between TomEE 8.0.0-M1 Plus and MP.
> The average startup time for TomEE  8.0.0-M1 Plus using java 11, on my laptop 
> with Core i5, SSD and 16 GB of RAM  is: 1,303 ms
> The average startup time for TomEE  8.0.0-M1 MP using java 11, on my laptop 
> with Core i5, SSD and 16 GB of RAM  is: 1,824 ms
> I was expecting the opposite.
> 
> Looking at the TomEE 8.0.0-M1 logs, I saw:
> 22-Oct-2018 14:25:46.872 SEVERE [main] 
> org.apache.catalina.core.StandardContext.startInternal One or more Filters 
> failed to start. Full details will be found in the appropriate container log 
> file
> 22-Oct-2018 14:25:46.873 SEVERE [main] 
> org.apache.catalina.core.StandardContext.startInternal Context [/docs] 
> startup failed due to previous errors
> ...
> 22-Oct-2018 14:25:47.116 SEVERE [main] 
> org.apache.catalina.core.StandardContext.startInternal One or more Filters 
> failed to start. Full details will be found in the appropriate container log 
> file
> 22-Oct-2018 14:25:47.116 SEVERE [main] 
> org.apache.catalina.core.StandardContext.startInternal Context 
> [/host-manager] startup failed due to previous errors
> ...
> 22-Oct-2018 14:25:47.306 SEVERE [main] 
> org.apache.catalina.core.StandardContext.startInternal One or more Filters 
> failed to start. Full details will be found in the appropriate container log 
> file
> 22-Oct-2018 14:25:47.307 SEVERE [main] 
> org.apache.catalina.core.StandardContext.startInternal Context [/manager] 
> startup failed due to previous errors
> ...
> 22-Oct-2018 14:25:47.497 SEVERE [main] 
> org.apache.catalina.core.StandardContext.startInternal One or more Filters 
> failed to start. Full details will be found in the appropriate container log 
> file
> 22-Oct-2018 14:25:47.497 SEVERE [main] 
> org.apache.catalina.core.StandardContext.startInternal Context [] startup 
> failed due to previous errors
> 
> I didn't see those entries in TomEE 8.0.0-M1 Plus during startup: maybe this 
> can explain the startup time difference ? Is it an issue ?
> 
> BTW, could you confirm or not to me that the difference between TomEE 8 Plus 
> and TomEE 8 MP are:
> 
> * TomEE MP doesn't have Concurrency utilities for EE support 
> (available in Web Profile)
> 
> * TomEE MP doesn't have JPA support (available in Web Profile)
> 
> * TomEE MP doesn't have JAX-WS support (available  in Plus)
> 
> * TomEE MP doesn't have JCA support (available in Plus)
> 
> * TomEE MP doesn't have JMS support (available  in Plus)
> 
> * TomEE MP doesn't have JBatch support (available in Plus)
> 
> Could you also confirm to me or not, that TomEE 8 MP:
> 
> * Will have CDI 2.0 support ?
> 
> * Will have JSON-P 1.1 support ?
> 
> * Will have JAX-RS 2.1 support ?
> 
> * Will have JSON-B 1.0 support ?
> 
> Best Regards.
> 
> This message and any attachments are intended solely for the addressees and 
> may contain confidential information. Any unauthorized use or disclosure, 
> either whole or partial, is prohibited.
> E-mails are susceptible to alteration. Our company shall not be liable for 
> the message if altered, changed or falsified. If you are not the intended 
> recipient of this message, please delete it and notify the sender.
> Although all reasonable efforts have been made to keep this transmission free 
> from viruses, the sender will not be liable for damages caused by a 
> transmitted virus.



Re: TomEE 8.0.0-M1 has been released :-)

2018-10-22 Thread Roberto Cortez
Hi Francois,

Thank you.

You are correct. TomEE 8 targets Java EE 8, but please note that we don’t have 
the TCK, so we cannot say we are fully compliant.

Yes, you are also correct regarding MP.

Cheers,
Roberto

> On 22 Oct 2018, at 01:44, COURTAULT Francois  
> wrote:
> 
> Hello everyone,
> 
> Congratulation for this intermediate release it provides visibility and shows 
> that you're working on it :)
> 
> Could you confirm that TomEE 8 will be Java EE 8 compliant ? Meaning that:
> 
> * JAX-RS 2.1
> 
> * CDI 2.0
> 
> * JSON-P 1.1
> 
> * JSON-B 1.0
> will be there ?
> 
> As far as I have understood, it will be MP 1.3 certified and not MP 2.0 
> because, the following specs are not there in TomEE 8:
> 
> * OpenTracing 1.0 (mandatory for MP 2.0) instead of 1.1
> 
> * RestClient 1.1 (mandatory for MP 2.0) instead of 1.0
> 
> * Config 1.3 (mandatory for MP 2.0) instead of 1.2
> 
> * FaultTolerance 1.1 (mandatory for MP 2.0) instead of 1.0
> 
> * JWT Propagation 1.1 (mandatory for MP 2.0) instead of 1.0
> Am I right ?
> 
> Best regards.
> 
> This message and any attachments are intended solely for the addressees and 
> may contain confidential information. Any unauthorized use or disclosure, 
> either whole or partial, is prohibited.
> E-mails are susceptible to alteration. Our company shall not be liable for 
> the message if altered, changed or falsified. If you are not the intended 
> recipient of this message, please delete it and notify the sender.
> Although all reasonable efforts have been made to keep this transmission free 
> from viruses, the sender will not be liable for damages caused by a 
> transmitted virus.



Re: tomee+activemq: JMS reading sometimes hang with full queue

2018-10-22 Thread Emmanuel Touzery

Hello,

    sure! Regarding the runtime, we also have the postgresql driver in 
lib, I think that's all. Hibernate is in our WAR for instance.


    here's the activemq.xml =>
https://www.dropbox.com/s/ukttiupouyiv779/activemq.xml?dl=0

    tomee.xml =>
https://www.dropbox.com/s/452s6d6vknp59a4/tomee.xml?dl=0

    startup log =>
https://www.dropbox.com/s/52uqfatlisodayg/catalina.2018-10-21.log?dl=0

    Regards,

Emmanuel

On 22/10/2018 16:33, exabrial12 wrote:

Hello Emmanuel, can we see the full log of the tomee startup, the full
tomee.xml, the full activemq.xml, and any other differences between your
runtime and the downloaded runtime? thanks!



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html





Startup time between TomEE 8.0.0-M1 Plus and MP

2018-10-22 Thread COURTAULT Francois
Hello everyone,

I have performed some comparison between TomEE 8.0.0-M1 Plus and MP.
The average startup time for TomEE  8.0.0-M1 Plus using java 11, on my laptop 
with Core i5, SSD and 16 GB of RAM  is: 1,303 ms
The average startup time for TomEE  8.0.0-M1 MP using java 11, on my laptop 
with Core i5, SSD and 16 GB of RAM  is: 1,824 ms
I was expecting the opposite.

Looking at the TomEE 8.0.0-M1 logs, I saw:
22-Oct-2018 14:25:46.872 SEVERE [main] 
org.apache.catalina.core.StandardContext.startInternal One or more Filters 
failed to start. Full details will be found in the appropriate container log 
file
22-Oct-2018 14:25:46.873 SEVERE [main] 
org.apache.catalina.core.StandardContext.startInternal Context [/docs] startup 
failed due to previous errors
...
22-Oct-2018 14:25:47.116 SEVERE [main] 
org.apache.catalina.core.StandardContext.startInternal One or more Filters 
failed to start. Full details will be found in the appropriate container log 
file
22-Oct-2018 14:25:47.116 SEVERE [main] 
org.apache.catalina.core.StandardContext.startInternal Context [/host-manager] 
startup failed due to previous errors
...
22-Oct-2018 14:25:47.306 SEVERE [main] 
org.apache.catalina.core.StandardContext.startInternal One or more Filters 
failed to start. Full details will be found in the appropriate container log 
file
22-Oct-2018 14:25:47.307 SEVERE [main] 
org.apache.catalina.core.StandardContext.startInternal Context [/manager] 
startup failed due to previous errors
...
22-Oct-2018 14:25:47.497 SEVERE [main] 
org.apache.catalina.core.StandardContext.startInternal One or more Filters 
failed to start. Full details will be found in the appropriate container log 
file
22-Oct-2018 14:25:47.497 SEVERE [main] 
org.apache.catalina.core.StandardContext.startInternal Context [] startup 
failed due to previous errors

I didn't see those entries in TomEE 8.0.0-M1 Plus during startup: maybe this 
can explain the startup time difference ? Is it an issue ?

BTW, could you confirm or not to me that the difference between TomEE 8 Plus 
and TomEE 8 MP are:

* TomEE MP doesn't have Concurrency utilities for EE support (available 
in Web Profile)

* TomEE MP doesn't have JPA support (available in Web Profile)

* TomEE MP doesn't have JAX-WS support (available  in Plus)

* TomEE MP doesn't have JCA support (available in Plus)

* TomEE MP doesn't have JMS support (available  in Plus)

* TomEE MP doesn't have JBatch support (available in Plus)

Could you also confirm to me or not, that TomEE 8 MP:

* Will have CDI 2.0 support ?

* Will have JSON-P 1.1 support ?

* Will have JAX-RS 2.1 support ?

* Will have JSON-B 1.0 support ?

Best Regards.

This message and any attachments are intended solely for the addressees and may 
contain confidential information. Any unauthorized use or disclosure, either 
whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the 
message if altered, changed or falsified. If you are not the intended recipient 
of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free 
from viruses, the sender will not be liable for damages caused by a transmitted 
virus.


tomee+activemq: JMS reading sometimes hang with full queue

2018-10-22 Thread Emmanuel Touzery

Hello,

    we have a tomee+ 7.0.3 installation with activemq, using kahadb as 
a persistent message storage. We have an activemq.xml, we plugged it 
though :


BrokerXmlConfig = xbean:file:/opt/app/tomee/conf/activemq.xml

    in the tomee.xml. The activemq broken runs within TOMEE:

ServerUrl   =  tcp://127.0.0.1:61616

    We have a prefetch of 2000:

uri="nio://0.0.0.0:61616?jms.prefetchPolicy.all=2000"/>


    We use mKaha. We disabled flow control.

    So that everything would work, we had to add a couple of JARs in 
the TOMEE lib folder:


activemq-spring-5.14.3.jar
spring-beans-3.2.9.RELEASE.jar
spring-context-3.2.9.RELEASE.jar
spring-core-3.2.9.RELEASE.jar
spring-expression-3.2.9.RELEASE.jar
spring-web-3.2.9.RELEASE.jar
xbean-spring-3.9.jar

    We are "reading" from JMS through message-driven beans, 
implementing MessageListener and with @MessageDriven annotations.


    The application is pretty simple... Receive the data from 
HTTP/JSON, and store it to SQL (through hibernate).


    Everything works fine as long as the traffic is normal. However 
when there is a surge of incoming traffic, sometimes the JMS consumers 
stop getting called, and the queue only grows. The issue does not get 
fixed until TOMEE is restarted. And then we've seen the issue re-appear 
again maybe 40 minutes later. After a while, the server clears the queue 
and everything is fine again.


    We took a jstack thread dump of the application when it's in that 
"hung" state:

https://www.dropbox.com/s/p8wy7uz6inzsmlj/jstack.txt?dl=0

    What's interesting is that writes fall quite fast, and in steps, in 
general not all at once, but as well not slowly:

https://www.dropbox.com/s/nhm5s2zc7r9mk9z/graph_writes.png?dl=0

    After a restart things are fine again immediately.

    We're not sure what is the cause. From what we can tell from the 
thread dump, the consumers are idle, they just don't get notified that 
work is available. The server is certainly aware there are items in the 
queue, we monitor the queue through JMX and the queue size keeps growing 
during these episodes. We don't see anything out of the ordinary in the 
logs. We looked at thread IDs for consumers just before the issue, it 
doesn't look like the consumers get some deadlock one after the other 
for instance. It seems like a bunch of them are called in the last 
minute before the dropoff for instance. Also, during a blackout the JDBC 
pool usage is at 0 according to our JMX monitoring, so it doesn't seem 
to be about a deadlocked JDBC connection.


    We did notice the following activemq warnings in the log file, but 
the timestamps don't match with any particular events and from what we 
found out, they don't seem to be particularly worrying or likely to be 
related to the issue:


WARNING [ActiveMQ Journal Checkpoint Worker] 
org.apache.activemq.store.kahadb.MessageDatabase.getNextLocationForAckForward 
Failed to load next journal location: null


WARNING [ActiveMQ NIO Worker 6] 
org.apache.activemq.broker.TransportConnection.serviceTransportException 
Transport Connection to: tcp://127.0.0.1:37024 failed: java.io.EOFException


    Do you have any suggestion to try to fix this issue (which we sadly 
can't reproduce at will.. and it only happens pretty rarely)? Should we 
rather ask on the activemq mailing list?


    Regards,

emmanuel



TomEE 8.0.0-M1 has been released :-)

2018-10-22 Thread COURTAULT Francois
Hello everyone,

Congratulation for this intermediate release it provides visibility and shows 
that you're working on it :)

Could you confirm that TomEE 8 will be Java EE 8 compliant ? Meaning that:

* JAX-RS 2.1

* CDI 2.0

* JSON-P 1.1

* JSON-B 1.0
will be there ?

As far as I have understood, it will be MP 1.3 certified and not MP 2.0 
because, the following specs are not there in TomEE 8:

* OpenTracing 1.0 (mandatory for MP 2.0) instead of 1.1

* RestClient 1.1 (mandatory for MP 2.0) instead of 1.0

* Config 1.3 (mandatory for MP 2.0) instead of 1.2

* FaultTolerance 1.1 (mandatory for MP 2.0) instead of 1.0

* JWT Propagation 1.1 (mandatory for MP 2.0) instead of 1.0
Am I right ?

Best regards.

This message and any attachments are intended solely for the addressees and may 
contain confidential information. Any unauthorized use or disclosure, either 
whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the 
message if altered, changed or falsified. If you are not the intended recipient 
of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free 
from viruses, the sender will not be liable for damages caused by a transmitted 
virus.