Re: Transaction Manager Failure

2014-05-21 Thread Chris Rohr
Thank you for the advice. Now I have changed the configuration as the following: Resource id=[Name] type=javax.sql.DataSource jdbcDriver = com.mysql.jdbc.Driver jdbcUrl = jdbc:mysql://localhost:3306/[Databasename] jtaManaged = true password =

Re: Transaction Manager Failure

2014-05-21 Thread Chris Rohr
Now, I get the following Exceptions: 1. May 21, 2014 8:11:34 AM org.apache.openejb.core.transaction.EjbTransactionUtil handleSystemException SEVERE: EjbTransactionUtil.handleSystemException: Failed to execute query SELECT Count(u) FROM User u WHERE Upper(u.nick) = :Nickname. Check the query

Re: Transaction Manager Failure

2014-05-21 Thread Romain Manni-Bucau
then your surely have something wrongly configured or you call close on the datasource yourself but it would need a sample to reproduce to digg into it. BTW don't set defaultAutoCommit if you use a JTA datasource Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/

Re: question around entityManager.flush

2014-05-21 Thread Jean-Louis Monteiro
As a general rule, I would recommend to never call flush(). The JPA provider optimizing the flushing to avoid connections between the Persistence Context and the rdbms. Of course at least at the end of the transaction (commit) the JPA provider flushes. But for example, when you have a loop with

OpenEJB Startup Problem : NPE in CdiScanner

2014-05-21 Thread Stanislas Nanchen
Hello everyone, We are using Tomee (and OpenEJB) 1.6.0.2 and we have a problem with the startup of OpenEBJ: a NPE occurs in the CdiScanner: on line 260 of the CdiScanner.java, there is a comparison between 2 ClassLoaders. (see below). 257 final ClassLoader cl = clazz.getClassLoader(); ...

Re: OpenEJB Startup Problem : NPE in CdiScanner

2014-05-21 Thread Romain Manni-Bucau
Hi how do you use it? Charset can't be in this class list normally Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-05-21 11:24 GMT+02:00 Stanislas Nanchen

Re: Netbeans Users

2014-05-21 Thread James Green
The four developers in this office here in the UK all use Netbeans. One does mainly PHP and Puppet stuff, one very occasional use and the final two (myself included) for Java work. Our Java work is exclusively using Maven. One JEE project using TomEE and two Spring projects with Tomcat. Main

Re: Netbeans Users

2014-05-21 Thread agumbrecht
Hi friends, This is all great info and thanks very much for your time! Really appreciated. Andy - -- Andy Gumbrecht http://www.tomitribe.com agumbre...@tomitribe.com https://twitter.com/AndyGeeDe TomEE treibt Tomitribe ! | http://tomee.apache.org -- View this

Re: Netbeans Users

2014-05-21 Thread zmirc
Hi! I have been using NetBeans for years. The latest versions made me love it even more. I'm using it (myself and the companies I work with) for: - Java EE projects - Java FX projects - HTML CSS JS projects - PHP projects - many other things I'm using using Tomee in NetBeans by adding it as a

Web Services slow down boot time

2014-05-21 Thread Anthony Fryer
I just thought i would mention that i have noticed when booting tomEE, initialization of EJBs is really quick, but when my web services initialize in the container, they take about 1 second each. I have a project with about 17 web services and now i'm really noticing the web service

Re: Web Services slow down boot time

2014-05-21 Thread Romain Manni-Bucau
Hi JAXWS/JAXRS? JAXRS should be fast, JAXWS is a bit slower Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-05-21 14:49 GMT+02:00 Anthony Fryer apfr...@hotmail.com:

Re: question around entityManager.flush

2014-05-21 Thread Howard W. Smith, Jr.
Thanks Jean-Louis. Based on your response, i just commented out entityManager.flush() in my AbstractFacade.java for create, edit, and remove methods. i did some testing in my app, and seems to work well. will see how my app performs under load and when users are logged in and working,

Re: Web Services slow down boot time

2014-05-21 Thread Jean-Louis Monteiro
Whatever looks a bit too much. Do u have a post construct or a constructor doing sthg? Le 21 mai 2014 14:52, Romain Manni-Bucau rmannibu...@gmail.com a écrit : Hi JAXWS/JAXRS? JAXRS should be fast, JAXWS is a bit slower Romain Manni-Bucau Twitter: @rmannibucau Blog:

How to change EJB timer thread pool size?

2014-05-21 Thread Mika Majakorpi
Hi, TomEE 1.6.0 has a default thread pool with 3 threads for EJB timer scheduling. I'd like to increase the size of this pool or configure a separate pool for my web application. I've tried to set the following properties separately or together inside my application in

Re: How to change EJB timer thread pool size?

2014-05-21 Thread Romain Manni-Bucau
Hi openejb.timer.pool.size is the one. Only case it can be ignored is you specified a custom org.quartz.threadPool.class BTW check you don't have a log line like: Found property 'org.apache.openejb.quartz.threadPool.threadCount' for default thread pool, please u Romain Manni-Bucau

Re: question around entityManager.flush

2014-05-21 Thread Howard W. Smith, Jr.
removing the manual/forced entityManager.flush() broke my app in a few places. reverting to previous version and I may try to revisit this later. :) On Wed, May 21, 2014 at 10:00 AM, Howard W. Smith, Jr. smithh032...@gmail.com wrote: Thanks Jean-Louis. Based on your response, i just

Re: question around entityManager.flush

2014-05-21 Thread Romain Manni-Bucau
cause eclipselink ;) Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-05-21 17:11 GMT+02:00 Jean-Louis Monteiro jlmonte...@tomitribe.com: I don't see why, except if

Re: question around entityManager.flush

2014-05-21 Thread Howard W. Smith, Jr.
On Wed, May 21, 2014 at 11:16 AM, Romain Manni-Bucau rmannibu...@gmail.comwrote: cause eclipselink ;) +1 good memory, Romain! :)

Re: question around entityManager.flush

2014-05-21 Thread Howard W. Smith, Jr.
On Wed, May 21, 2014 at 11:19 AM, Jean-Louis Monteiro jlmonte...@tomitribe.com wrote: you should have mentioned that before. Eclipselink is a bit special yeah, i love it (EclipseLink)! Gets the job done for me... EclipseLink 2.3.2 (that shipped with earlier version of Glassfish 3.1.x).

Re: question around entityManager.flush

2014-05-21 Thread Andy Gumbrecht
Which is why I used the additional local EJB in the past, basically where it 'feels' like a flush is being helpful replace the logic with a local bean that does that unit of work. Look up and call that bean method from the current method, if it completes then the current method is safe to

Re: How to change EJB timer thread pool size?

2014-05-21 Thread Andy Gumbrecht
I think the property is now: EjbTimerPool.CorePoolSize = 3 Andy. On 21/05/2014 16:34, Romain Manni-Bucau wrote: Hi openejb.timer.pool.size is the one. Only case it can be ignored is you specified a custom org.quartz.threadPool.class BTW check you don't have a log line like: Found

Re: How to change EJB timer thread pool size?

2014-05-21 Thread Jonathan Fisher
You could also just set your bean to @Singleton On Wed, May 21, 2014 at 11:16 AM, Andy Gumbrecht agumbre...@tomitribe.comwrote: I think the property is now: EjbTimerPool.CorePoolSize = 3 Andy. On 21/05/2014 16:34, Romain Manni-Bucau wrote: Hi openejb.timer.pool.size is the one. Only

Re: How to change EJB timer thread pool size?

2014-05-21 Thread Romain Manni-Bucau
You are right Andy, that's a regression we need to fix (we need to support both) Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-05-21 18:36 GMT+02:00 Jonathan Fisher

Re: How to change EJB timer thread pool size?

2014-05-21 Thread Mika Majakorpi
Right, EjbTimerPool.CorePoolSize = 30 works for me when added to conf/system.properties. I got confused because DefaultTimerThreadPoolAdapter has a constant for openejb.timer.pool.size but apparently it's not used. Thanks! Mika On Wed, May 21, 2014 at 7:46 PM, Romain Manni-Bucau

Re: How to change EJB timer thread pool size?

2014-05-21 Thread Romain Manni-Bucau
commit in progress to fix it, that's even worse org.quartz.threadPool.threadCount (or org.apache.quartz.threadPool.threadCount on trunk) should have worked PS: https://issues.apache.org/jira/browse/TOMEE-1219 Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/

Re: question around entityManager.flush

2014-05-21 Thread Howard W. Smith, Jr.
Andy, is there any sample code or blog or tomee test case that demonstrates your recommendation? On Wed, May 21, 2014 at 11:37 AM, Andy Gumbrecht agumbre...@tomitribe.comwrote: Which is why I used the additional local EJB in the past, basically where it 'feels' like a flush is being helpful

Re: question around entityManager.flush

2014-05-21 Thread Romain Manni-Bucau
@Stateless // or singletong public class TxBean { @PersistenceContext EntityManager em; public void doSomeStuffAndCommit() { // em usage } } when exiting the method commit will trigger flush Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/

Re: question around entityManager.flush

2014-05-21 Thread Howard W. Smith, Jr.
okay, based on what you said below, On Wed, May 21, 2014 at 2:42 PM, Romain Manni-Bucau rmannibu...@gmail.comwrote: @Stateless // or singletong public class TxBean { @PersistenceContext EntityManager em; public void doSomeStuffAndCommit() { // em usage } } when

Re: question around entityManager.flush

2014-05-21 Thread Romain Manni-Bucau
then the issue is the code you do needs atomicity for each JPA operation (why you use flush). but this shouldn't be needed. Typically: create - edit is useless. Just create it once ;) Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn:

Re: question around entityManager.flush

2014-05-21 Thread Howard W. Smith, Jr.
hmmm, create - edit is useless? I guess you are saying that after i 'create', even though I am adding a related entity (e.g. tree 'has' branch). create(tree) Branch branch = new Branch(1) tree.addBranch(branch) so, you are saying that the edit(tree) is not necessary? is that the cause of the

Re: question around entityManager.flush

2014-05-21 Thread Romain Manni-Bucau
what I say is you can do eveything in a single method method. The fact you need flush means your operation need a state provided by the database (@GeneratedValue?). Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau

Re: question around entityManager.flush

2014-05-21 Thread Howard W. Smith, Jr.
On Wed, May 21, 2014 at 3:42 PM, Romain Manni-Bucau rmannibu...@gmail.comwrote: what I say is you can do eveything in a single method method. Sounds like you are recommending something similar to the following: 1. @RequestScoped bean to get data to display in UI layer to enduser 2. If user

Re: question around entityManager.flush

2014-05-21 Thread Romain Manni-Bucau
more or less. Try to get a single transaction (ejb call if you want) by request. Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-05-21 21:52 GMT+02:00 Howard W. Smith,

Re: question around entityManager.flush

2014-05-21 Thread Howard W. Smith, Jr.
okay, I will have to try that, asap, and report my/some test results. thanks. On Wed, May 21, 2014 at 3:54 PM, Romain Manni-Bucau rmannibu...@gmail.comwrote: more or less. Try to get a single transaction (ejb call if you want) by request. Romain Manni-Bucau Twitter: @rmannibucau Blog:

Re: Web Services slow down boot time

2014-05-21 Thread Anthony Fryer
It's JAXWS -- View this message in context: http://openejb.979440.n4.nabble.com/Web-Services-slow-down-boot-time-tp4669495p4669534.html Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Web Services slow down boot time

2014-05-21 Thread Anthony Fryer
I don't have a post construct. Here's some of the console log output showing the webservices being deployed. From the timestamp, you can see the StartEjbs is really quick (all ejbs start in about 1 second) and then the org.apache.openejb.server.webservices.WsService deployApp is noticably slower

Re: Web Services slow down boot time

2014-05-21 Thread Romain Manni-Bucau
Hi can you try http://svn.apache.org/repos/asf/tomee/tomee/trunk/examples/change-jaxws-url/? it is fast here Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-05-22

Re: OpenEJB Startup Problem : NPE in CdiScanner

2014-05-21 Thread Stanislas Nanchen
Hi, I think we use it quite normally. The problem arised when we upgraded a library (vaadin from 7.1.10 to 7.2). However the vaadin jar does not contain any beans.xml file. How can I investigate more? As Class#getClassLoader() can be null, I think it would be a good idea to check for this,