Re: TOMEE-1040 - Abstract Dynamic Beans

2013-09-21 Thread Romain Manni-Bucau
Maybe stupid but let suppose we have java 7 (i know for certification but as tomcat did for last release and websockets i think we can get some j7 only features): what about defaults on interfaces? If all methods of a @Local or @Remote have a default then we dont need the impl Le 22 sept. 2013 00:

Re: TOMEE-1040 - Abstract Dynamic Beans

2013-09-21 Thread David Blevins
Interesting. Currently it reuses the @LocalBean code. -David On Sep 21, 2013, at 1:59 PM, Romain Manni-Bucau wrote: > Ps: we can reuse a custom handler instead of rewriting a proxy factory with > asm > > @PartialBean of deltaspike is more or less the same feature (with scope > handling for h

Re: TOMEE-1040 - Abstract Dynamic Beans

2013-09-21 Thread Romain Manni-Bucau
Ps: we can reuse a custom handler instead of rewriting a proxy factory with asm @PartialBean of deltaspike is more or less the same feature (with scope handling for handler) Le 21 sept. 2013 22:56, "Romain Manni-Bucau" a écrit : > Works for me > Le 21 sept. 2013 22:51, "David Blevins" a > écrit

Re: TOMEE-1040 - Abstract Dynamic Beans

2013-09-21 Thread Romain Manni-Bucau
Works for me Le 21 sept. 2013 22:51, "David Blevins" a écrit : > My phrasing might have been off -- I was agreeing with you on all points > :) I was just thinking about how we'd implement it. > > We can't instantiate an abstract class so we'd still have to generate a > subclass and implement the

Re: TOMEE-1040 - Abstract Dynamic Beans

2013-09-21 Thread David Blevins
My phrasing might have been off -- I was agreeing with you on all points :) I was just thinking about how we'd implement it. We can't instantiate an abstract class so we'd still have to generate a subclass and implement the methods for the developer as we do now. But definitely, we could have

Re: TOMEE-1040 - Abstract Dynamic Beans

2013-09-21 Thread Romain Manni-Bucau
the point is if a method is abstract the bean doesn't know how to impl it so why should it impl it? an indirection looks mandatory here *Romain Manni-Bucau* *Twitter: @rmannibucau * *Blog: **http://rmannibucau.wordpress.com/* *Lin

Re: TOMEE-1040 - Abstract Dynamic Beans

2013-09-21 Thread David Blevins
To allow for partial implementation we'd still have to subclass and implement the abstract methods to do something. So either they delegate to some other method like InvocationHandler.invoke or we implement them to throw a RuntimeException or Error like AbstractMethodError. If someone wanted th

Re: TOMEE-1040 - Abstract Dynamic Beans

2013-09-21 Thread Romain Manni-Bucau
wouldn't it be more relevant to replace it by interceptors? = allow abstract ejb if an interceptor intercepts them. the ejb would have @AbstractAllowed and the interceptor @Handle or sthg like that *Romain Manni-Bucau* *Twitter: @rmannibucau * *Blog: **http://rman

Re: TOMEE-1040 - Abstract Dynamic Beans

2013-09-21 Thread David Blevins
On Sep 21, 2013, at 4:40 AM, Romain Manni-Bucau wrote: > I think we already have it through cdi and decorators but it doesnt hurt to > get it this way ;). Similar to decorators, yes. Just as the @Proxy+InvocationHandler concept is similar to interceptors. Big difference in both from their dec

ziplock & mvn

2013-09-21 Thread Romain Manni-Bucau
Hi just added to ziplock an integration with mvn: http://svn.apache.org/repos/asf/tomee/tomee/trunk/arquillian/ziplock/src/test/java/org/apache/ziplock/maven/MvnTest.java The idea is to provide a simple method allowing to get out of the box a war representing the current module (war/jar - both ar

Re: gui log alerts (was: Polished TomEE GUI)

2013-09-21 Thread Thiago Veronezi
>>2) doing it you are classloader contextual so no sure you would see other >>apps (to check). Completely right... as usual. tkx. On Sat, Sep 21, 2013 at 11:26 AM, Romain Manni-Bucau wrote: > Hi > > 1) remove transactions from your bean + make it lock(read) otherwise you'll > slow down all apps

Re: gui log alerts (was: Polished TomEE GUI)

2013-09-21 Thread Romain Manni-Bucau
Hi 1) remove transactions from your bean + make it lock(read) otherwise you'll slow down all apps, the best would be to replace this singleton by a ServletContextListener and init/reset it with the provided hooks with another handler (= another class). 2) doing it you are classloader contextual so

Re: gui log alerts (was: Polished TomEE GUI)

2013-09-21 Thread Thiago Veronezi
Hey Romain, I didn't have a chance to go through the tomcat handler, but I found a solution... @javax.ejb.Singleton @Startup class LogListenerImpl extends Handler { def messages = [] // TODO: handle this @PostConstruct public void start() { LogManager.logManager.loggerNames.ea

Re: gui log alerts (was: Polished TomEE GUI)

2013-09-21 Thread Romain Manni-Bucau
Hi Have a look to http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/juli/ClassLoaderLogManager.htmland catalina.sh which set it Le 21 sept. 2013 15:02, "Thiago Veronezi" a écrit : > and... > > http://docs.oracle.com/javase/6/docs/api/java/util/logging/MemoryHandler.html > with > http://doc

Re: gui log alerts (was: Polished TomEE GUI)

2013-09-21 Thread Thiago Veronezi
and... http://docs.oracle.com/javase/6/docs/api/java/util/logging/MemoryHandler.html with http://docs.oracle.com/javase/6/docs/api/java/util/logging/Filter.html On Sat, Sep 21, 2013 at 8:51 AM, Thiago Veronezi wrote: > Cool! Can you give me more tips on how to hijack the LogManager? > I will tr

Re: gui log alerts (was: Polished TomEE GUI)

2013-09-21 Thread Thiago Veronezi
Cool! Can you give me more tips on how to hijack the LogManager? I will try to use http://docs.oracle.com/javase/6/docs/api/java/util/logging/Handler.html Please let me know if I am in a completely wrong direction. :) >>how do you store it? It would be in-memory but ephemeral and limited to a X nu

Re: gui log alerts (was: Polished TomEE GUI)

2013-09-21 Thread Romain Manni-Bucau
We can replace default logmanger by our own and wrap all handlers but then how do you store it? Le 21 sept. 2013 14:19, "Thiago Veronezi" a écrit : > Hi Daniel, > Possibly. :) Thanks! > > https://dl.dropboxusercontent.com/u/1459144/tomee-list/errors.png > https://dl.dropboxusercontent.com/u/14591

Re: gui log alerts (was: Polished TomEE GUI)

2013-09-21 Thread Thiago Veronezi
Hi Daniel, Possibly. :) Thanks! https://dl.dropboxusercontent.com/u/1459144/tomee-list/errors.png https://dl.dropboxusercontent.com/u/1459144/tomee-list/warnings.png []s, Thiago. On Sat, Sep 21, 2013 at 8:13 AM, dsh wrote: > Hi, > > Could it be that images have been stripped from your origin

Re: gui log alerts (was: Polished TomEE GUI)

2013-09-21 Thread dsh
Hi, Could it be that images have been stripped from your original mail? Cheers Daniel On Sat, Sep 21, 2013 at 2:08 PM, Thiago Veronezi wrote: > Do you know an elegant way to listen all the loggers? > I would like to add a flag into the gui like... > > [image: Inline image 1] > > [image: Inline

gui log alerts (was: Polished TomEE GUI)

2013-09-21 Thread Thiago Veronezi
Do you know an elegant way to listen all the loggers? I would like to add a flag into the gui like... [image: Inline image 1] [image: Inline image 2] Clicking on the error or warning signs would open the "Log Files", and it would try to show the file that contains the log message at the right po

Re: TOMEE-1040 - Abstract Dynamic Beans

2013-09-21 Thread Romain Manni-Bucau
Hi great! I think we already have it through cdi and decorators but it doesnt hurt to get it this way ;). Fun feature allowing partial impl btw! Le 21 sept. 2013 12:49, "David Blevins" a écrit : > Implemented an experimental feature in the spirit of the @Proxy concept > where an interface can be

TOMEE-1040 - Abstract Dynamic Beans

2013-09-21 Thread David Blevins
Implemented an experimental feature in the spirit of the @Proxy concept where an interface can be given along with an InvocationHandler implementation. When the bean is created we'd create the InvocationHandler, create a proxy using the interface, then use the proxy as the bean instance. Took t