Re: Why are Tomcat's threads more costly than background threads?

2012-12-16 Thread Romain Manni-Bucau
Yes and no, it makes the connection being from the client why is better for it and it works - when websockets can have issues with proxies and so on. Websocket are nice when you have a real protocol...just create one and ask the client to ask for an update with a timer, that's already better and yo

link drop in wars unviable

2012-12-16 Thread José Luiz Siesler Junior
God nigth. The links tomee-plus-webapp-1.5.1.warand tomee-webapp-1.5.1.warare unviable. I tried to download all links on the p

Re: Why are Tomcat's threads more costly than background threads?

2012-12-16 Thread Howard W. Smith, Jr.
Polling is too much network traffic in my opinion. Websocket is instant messaging. No need to add polling code and xhtml here there for different type of messages coming from server and no need of an ajax request to server throughout entire session just to get an update from the server. On Dec 17,

Re: Reusing Datasource

2012-12-16 Thread Jean-Louis MONTEIRO
I think the more related to synonyms It's possible for ejbs, but we don't actually have the same feature for datasources JLouis 2012/12/17 Romain Manni-Bucau > Hi, > > First i think we never release openejb 3.2 > > Then you can define the datasource globally either in conf/openejb.xml or > as

Re: Reusing Datasource

2012-12-16 Thread Romain Manni-Bucau
Hi, First i think we never release openejb 3.2 Then you can define the datasource globally either in conf/openejb.xml or as properties of the container (initialcontext). Just match the expectes name in persistence.xml Le 17 déc. 2012 08:25, "tkayser" a écrit : > Hi, > > I am using Openejb 3.2 w

Re: Why are Tomcat's threads more costly than background threads?

2012-12-16 Thread Romain Manni-Bucau
Side note: if your need is pushing regularly to the client just having some client polling can make it far easier to manage on both sides... Le 17 déc. 2012 08:33, "Howard W. Smith, Jr." a écrit : > Almost forgot...PrimeFaces peer/friend of mine informed me that JMS is good > for running two inst

Re: Why are Tomcat's threads more costly than background threads?

2012-12-16 Thread Howard W. Smith, Jr.
Almost forgot...PrimeFaces peer/friend of mine informed me that JMS is good for running two instances of an app, similar to load balancer. Prior to using TomEE, I really wanted to use PrimeFaces Push (powered by Atmosphere/websocket), and at that time, I was thinking that I could possibly run Tomc

Re: Why are Tomcat's threads more costly than background threads?

2012-12-16 Thread Howard W. Smith, Jr.
Very interesting discussion and responses here! Anthony motivates me to jump on the bandwagon of using JMS/message-driven-beans, and at the same time, Romain tells me, not much need (for local) in a Java EE 6 application. :) Either way, i have not ruled out JMS. I have done some strategic coding o

Reusing Datasource

2012-12-16 Thread tkayser
Hi, I am using Openejb 3.2 with an Embedded Configuration. I stumbled upon the following problem, for which I found a workaround but i still wonder if there is no better solution. For my code I use two different DataBases. Further i use different ejb.jar's which are not under my control. So I can

Re: TomEE 1.5.1: bean encountered a non-application exception; nested exception???

2012-12-16 Thread Howard W. Smith, Jr.
okay, thanks Romain for the response. :) On Mon, Dec 17, 2012 at 2:09 AM, Romain Manni-Bucau wrote: > Because that's not an app exception (see ejb spec and/or > @ApplicationException) > Le 17 déc. 2012 04:43, "Howard W. Smith, Jr." a > écrit : > > > First of all, I already fixed the cause of thi

Re: TomEE 1.5.1: bean encountered a non-application exception; nested exception???

2012-12-16 Thread Romain Manni-Bucau
Because that's not an app exception (see ejb spec and/or @ApplicationException) Le 17 déc. 2012 04:43, "Howard W. Smith, Jr." a écrit : > First of all, I already fixed the cause of this exception in my app, I just > wanted to ask a question about the exception. > > The exception occurred when the

Re: Why are Tomcat's threads more costly than background threads?

2012-12-16 Thread Romain Manni-Bucau
I used it a lot in javaee 5 (openejb 3) but i'm happy to leave it on the road qince javaee 6, no more. It works but i dont find it effective when it stays local @others: am i alone? Le 17 déc. 2012 06:53, "Anthony Fryer" a écrit : > Yes i've done this before a few times and had really good resu

Re: TomEE can't find ehcache.xml

2012-12-16 Thread Jean-Louis MONTEIRO
Cool. Le 16 déc. 2012 15:12, "Luca Merolla" a écrit : > Thanks I have solved by removing "new CacheManager" with: > > manager = CacheManager.newInstance(getClass().getResource( > "/ehcache.xml")); > > > On Sun, Dec 16, 2012 at 10:35 AM, Jean-Louis MONTEIRO >wrote: > > > Hi, > > > > You should ge

Re: Why are Tomcat's threads more costly than background threads?

2012-12-16 Thread Anthony Fryer
Yes i've done this before a few times and had really good results using weblogic. I must say i have an element of doubt about it with Romain not liking it though. I've used ActiveMQ before and not encountered issues but these guys are the tomee devs and I'd go with what they say. -- View this

Re: Why are Tomcat's threads more costly than background threads?

2012-12-16 Thread Anthony Fryer
Ok so what i'm hearing is that you're against the idea because you don't trust the implementation of JMS included in tomee? -- View this message in context: http://openejb.979440.n4.nabble.com/Re-Why-are-Tomcat-s-threads-more-costly-than-background-threads-tp4659429p4659713.html Sent from the O

Re: Why are Tomcat's threads more costly than background threads?

2012-12-16 Thread Romain Manni-Bucau
well i don't like it because for asynchronouism you now have some tools in JavaEE. then i agree the retry mecanism can be interesting but 1) did you already look what does the container (AMQ here) when you send/receive a message? i wouldn't try to get any perf with such a lot of job 2) AMQ blocks e

Re: Why are Tomcat's threads more costly than background threads?

2012-12-16 Thread Howard W. Smith, Jr.
Good points Anthony and thanks for sharing all that. Stephen, right now, I assume the same as what you stated. My experience with entirely @stateless solution, IMHO, got me nowhere because @stateless seems to be application scope and the database got locked application scope/wide, so that is why I

Re: Why are Tomcat's threads more costly than background threads?

2012-12-16 Thread Anthony Fryer
Romain, you're opinion means alot so i'm wondering why you are against JMS in this case. This kind of pattern happens alot in my experience. In this case a timer job executes that finds a list of jobs to execute, in this case read a list of emails and for each email insert a row into a database.

Re: Why are Tomcat's threads more costly than background threads?

2012-12-16 Thread Stephen Connolly
Need to take care around transaction symmantics with JMS too. On Sunday, 16 December 2012, Anthony Fryer wrote: > Another change you could make to improve the performance of the method > invoked by the timer, is instead of performing the actual database insert > for each email in that method, ins

Re: Why are Tomcat's threads more costly than background threads?

2012-12-16 Thread Howard W. Smith, Jr.
I have never used JMS/message-driven-beans as of yet, but considering it... On Sun, Dec 16, 2012 at 8:35 AM, Romain Manni-Bucau wrote: > i'm quite again using JMS for local asynchronism generally > > not the goal of JMS IMO > > Romain Manni-Bucau > Twitter: @rmannibucau > Blog: http://rmannibucau

Re: Why are Tomcat's threads more costly than background threads?

2012-12-16 Thread Howard W. Smith, Jr.
Anthony, thanks for the recommendation. I will have to give that a try. On Dec 16, 2012 8:33 AM, "Anthony Fryer" wrote: > Another change you could make to improve the performance of the method > invoked by the timer, is instead of performing the actual database insert > for each email in that met

Re: Conflicts with TomEEClassLoaderEnricher

2012-12-16 Thread Marco de Booij
I will give it a try. I will keep you informed. Op 16-12-12 14:42, Romain Manni-Bucau schreef: depend on your config but basically for each version just update tomee/lib (and optionally webapps/tomee if you need it) seems fine using tomee instead of tmocat as base, can you give it a try? Romai

Re: TomEE can't find ehcache.xml

2012-12-16 Thread Luca Merolla
Thanks I have solved by removing "new CacheManager" with: manager = CacheManager.newInstance(getClass().getResource( "/ehcache.xml")); On Sun, Dec 16, 2012 at 10:35 AM, Jean-Louis MONTEIRO wrote: > Hi, > > You should get the URL of the ehCache file first. > Otherwise, it should be a relative pa

Re: Conflicts with TomEEClassLoaderEnricher

2012-12-16 Thread Romain Manni-Bucau
depend on your config but basically for each version just update tomee/lib (and optionally webapps/tomee if you need it) seems fine using tomee instead of tmocat as base, can you give it a try? Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.li

Re: Why are Tomcat's threads more costly than background threads?

2012-12-16 Thread Romain Manni-Bucau
i'm quite again using JMS for local asynchronism generally not the goal of JMS IMO Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2012/12/16 Anthony Fryer : > Another change

Re: Why are Tomcat's threads more costly than background threads?

2012-12-16 Thread Anthony Fryer
Another change you could make to improve the performance of the method invoked by the timer, is instead of performing the actual database insert for each email in that method, instead write a message to a JMS queue. Then create a message driven bean that processes the JMS messages and performs the

Re: Conflicts with TomEEClassLoaderEnricher

2012-12-16 Thread Marco de Booij
I used TomEE for development. But everytime there was a new version of TomEE I had to unpack the new TomEE package and redo the configuration. Perhaps my wrong but I could not find another way. My idea is that if I deploy TomEE as a war then I can keep my configuration and also my Tomcat7 would

Re: Conflicts with TomEEClassLoaderEnricher

2012-12-16 Thread Romain Manni-Bucau
Why not using a TomEE instead of a Tomcat 7 as base? will try to deploy a sonar in a tomee in the afternoon Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2012/12/16 Marco d

Re: TomEE can't find ehcache.xml

2012-12-16 Thread Jean-Louis MONTEIRO
Hi, You should get the URL of the ehCache file first. Otherwise, it should be a relative path to user.dir or so. Anyway, check out that page http://ehcache.org/documentation/code-samples#ways-of-loading-cache-configuration It contains examples on how to proceed. And let us know if that still doe

TomEE can't find ehcache.xml

2012-12-16 Thread Luca Merolla
Hello everyone, I would like to try to use Ehcache in one of my project, but at the moment I'm having problem to create the CacheManager because it can't find the ehcache.xml file. My project is an EAR folder and it looks like that: EAR/ --lib/library.jar (contains ehcache.xml and AbstractCacheS

Re: Conflicts with TomEEClassLoaderEnricher

2012-12-16 Thread Marco de Booy
Sorry. I forgot that. Yes I deploy TomEE in Tomcat. My (personal) server has not enough resources to run 3 J2ee 5tomEE, Sonar, and Nexus) atr the same time. Since they are all lightly used they should be able to run in a 512Mb Tomcat. Regards, Marco On Sat, 15 Dec 2012 18:56:13 +0100, Romain