Re: Migrating to CDI: @Asynchronous

2012-11-19 Thread Romain Manni-Bucau
Hi, can you share any snippet of code? *Romain Manni-Bucau* *Twitter: @rmannibucau * *Blog: **http://rmannibucau.wordpress.com/* *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* *Github: https://github.com/rmannibucau* 201

Re: Migrating to CDI: injecting stateless/facade in Converter via facescontext

2012-11-19 Thread Romain Manni-Bucau
You cant use faces context? Le 20 nov. 2012 03:01, "Howard W. Smith, Jr." a écrit : > For minimal changes, I'm adding FacesConverter to JSF requestscoped > managedBean's as per the Stackoverflow answer below: > > How can I inject in @FacesConverter?< > http://stackoverflow.com/a/13156834/933054>

Re: Migrating to CDI: injecting stateless/facade in Converter via facescontext

2012-11-19 Thread Howard W. Smith, Jr.
For minimal changes, I'm adding FacesConverter to JSF requestscoped managedBean's as per the Stackoverflow answer below: How can I inject in @FacesConverter? Yes, this means more classes in the project, but honestly, I have not had to spend much time 'm

Re: Migrating to CDI: injecting stateless/facade in Converter via facescontext

2012-11-19 Thread Romain Manni-Bucau
If it is a nested class you need it otherwise (class foo in foo.java file) you dont need it Le 20 nov. 2012 01:16, "Howard W. Smith, Jr." a écrit : > Good question. I removed 'static', because I didn't see it in the code at > following URLs: > > > https://cwiki.apache.org/confluence/display/EXTCD

Re: Migrating to CDI: injecting stateless/facade in Converter via facescontext

2012-11-19 Thread Howard W. Smith, Jr.
Good question. I removed 'static', because I didn't see it in the code at following URLs: https://cwiki.apache.org/confluence/display/EXTCDI/JSF+Usage#JSFUsage-DependencyInjection http://stackoverflow.com/questions/7531449/cdi-injection-into-a-facesconverter https://issues.apache.org/jira/browse

Re: Migrating to CDI: injecting stateless/facade in Converter via facescontext

2012-11-19 Thread Romain Manni-Bucau
Why removing static? It means it is no more manageable by cdi (cdi cant do a new on it) Le 19 nov. 2012 22:13, "Howard W. Smith, Jr." a écrit : > @Advanced was found in the following: > > import org.apache.myfaces.extensions.cdi.core.api.Advanced; > > After some tinkering, I removed 'static' from

Re: Migrating to CDI: injecting stateless/facade in Converter via facescontext

2012-11-19 Thread Howard W. Smith, Jr.
@Advanced was found in the following: import org.apache.myfaces.extensions.cdi.core.api.Advanced; After some tinkering, I removed 'static' from the following definition, public static class AddressTypeControllerConverter implements Converter { I also added @Advanced to the FacesConverter/Conver

Re: Migrating to CDI: injecting stateless/facade in Converter via facescontext

2012-11-19 Thread Howard W. Smith, Jr.
I searched google, found the following: CDI Injection into a FacesConverter which lead me to: MyFaces Extensions CDI > JSF Usage > Dependency Injection

Re: Migrating to CDI: injecting stateless/facade in Converter via facescontext

2012-11-19 Thread Romain Manni-Bucau
Maybe use BeanProvider of deltaspike Le 19 nov. 2012 20:50, "Howard W. Smith, Jr." a écrit : > Hmmm... after thinking about it, I remembered to use @Inject on the bean > which I want to inject. So, I did the following: > > @FacesConverter(forClass = AddressType.class) > public static clas

Re: Migrating to CDI: injecting stateless/facade in Converter via facescontext

2012-11-19 Thread Howard W. Smith, Jr.
Hmmm... after thinking about it, I remembered to use @Inject on the bean which I want to inject. So, I did the following: @FacesConverter(forClass = AddressType.class) public static class AddressTypeControllerConverter implements Converter { @Inject private pf_AddressTypeC

Re: Migrating to CDI: injecting stateless/facade in Converter via facescontext

2012-11-19 Thread Romain Manni-Bucau
Can you reproduce it in a sample? What is on the npe line? Le 19 nov. 2012 20:25, "Howard W. Smith, Jr." a écrit : > I am still migrating my app from JSF Managed beans to CDI managed beans, so > I am (regression) testing, and I came across the exception below when > attempting to add a record int

Re: Migrating to TomEE/CDI: OpenEJB 'nested' exceptions

2012-11-19 Thread Howard W. Smith, Jr.
WOW I added did the following: 1. My Computer > System Properties > *Environment Variables* *CATALINA_OPTS* -Xmx512m -XX:MaxPermSize=384m -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled 2. Started TomEE 3. Deployed web app to TomEE * * and NOW my web app is FINALLY working usin

Re: Migrating to TomEE/CDI: OpenEJB 'nested' exceptions

2012-11-19 Thread Howard W. Smith, Jr.
Okay. I will search via google. :) If anyone else has anything to share about avoiding OpenEJBException 'nested' (Injection) exceptions for those that are migrating from JSF Managed Beans to CDI managed beans, then please share. Thanks, Howard On Mon, Nov 19, 2012 at 11:20 AM, José Luis Cetina

Re: Migrating to TomEE/CDI: OpenEJB 'nested' exceptions

2012-11-19 Thread José Luis Cetina
Like you says this is only for development, I don't remember where (the sysadmin of the company) sets the options, tomorrow I can share to you El 19/11/2012 10:14, "Howard W. Smith, Jr." escribió: > Thanks, that was a very clear explanation, and I did all of that maybe 2 or > 3 days ago, 'except'

Re: Migrating to TomEE/CDI: OpenEJB 'nested' exceptions

2012-11-19 Thread Howard W. Smith, Jr.
Interesting, I added following to tomcat-users.xml: and when I go to localhost:8080 and click TomEE Gui button, I get the following (even after stop and start of TomEE after modifying tomcat-users.xml) TTP Status 403 - Access to the requested resource has been denied

Re: Migrating to TomEE/CDI: OpenEJB 'nested' exceptions

2012-11-19 Thread Howard W. Smith, Jr.
Thanks, that was a very clear explanation, and I did all of that maybe 2 or 3 days ago, 'except' for the VM options. VM options via NetBeans sound good for development purposes only, but what about for Production? I assume that there is a tomee.xml or server.xml approach that will allow me to set

Re: Migrating to TomEE/CDI: OpenEJB 'nested' exceptions

2012-11-19 Thread José Luis Cetina
You have to add TomEE Server in services tab, then add a Server (a wizards start) in services tab, choose the folder where you extract TomEE and set a user/password thats all. Then you will see TomEE under servers options (in services tab), right click TomEE select properties and go to platform ta

Re: Migrating to TomEE/CDI: OpenEJB 'nested' exceptions

2012-11-19 Thread Howard W. Smith, Jr.
Yes, I use NetBeans 7.2, and how do I use TomEE? Start, stop, and undeploy options after right-click TomEE under Servers on Services pane. right now, I'm configuring TomEE admin/manager GUI password in tomcat-users.xml. I had little experience with this 1 or 2 weeks ago when I was 'trying' to migr

Re: Migrating to TomEE/CDI: OpenEJB 'nested' exceptions

2012-11-19 Thread José Luis Cetina
You sayed you use netbeans, then if you use it, is so easy to add tomee as server and then add those properties. Are using netbeans? if yes how do you use tomee in netbeans? 2012/11/19 Howard W. Smith, Jr. > Jose, > > Thanks for the response. Hmmm, it seems as though you are referring to > opti

Re: Migrating to TomEE/CDI: OpenEJB 'nested' exceptions

2012-11-19 Thread Howard W. Smith, Jr.
Jose, Thanks for the response. Hmmm, it seems as though you are referring to options that I can access in TomEE's web/GUI (localhost:8080 ???). I have not even tried that yet; of course, I used to use Glassfish Admin console (localhost:4848) prior to this migration to TomEE. :) I only have @Appli

Re: Migrating to TomEE/CDI: OpenEJB 'nested' exceptions

2012-11-19 Thread José Luis Cetina
For point number two,you can use this: -XX:MaxPermSize=256M -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled You set this in Services tag then your select your server and select properties (right click) then in Platfom tag in VM Options add the line above. I have curiosity for your p

Re: EJBs not scanned when working in Eclipse workspace metadata folder (Windows)

2012-11-19 Thread kubamarchwicki
Good point - I've went too far with that :) I withdraw my opinion. It works fine for sample apps - which I've been trying so far with TomEE. But you are right when it comes to more complicated issues. --Jakub -- View this message in context: http://openejb.979440.n4.nabble.com/EJBs-not-scan

Re: EJBs not scanned when working in Eclipse workspace metadata folder (Windows)

2012-11-19 Thread Howard W. Smith, Jr.
Smiling... okay, thanks for letting me know. I did not do that yet. On Mon, Nov 19, 2012 at 10:00 AM, Romain Manni-Bucau wrote: > hmm, removing @Stateless means loosing transactions...i really think that's > a bad idea > > *Romain Manni-Bucau* > *Twitter: @rmannibucau

Re: EJBs not scanned when working in Eclipse workspace metadata folder (Windows)

2012-11-19 Thread kubamarchwicki
Howard, yes I think you should replace @staeless with @Named - that means you fully migrate EJBs to CDI. With should work fine unless you use some specific EJB annotations attributes (for a simple applications that should work fine). And don't forget beans.xml when you migrate to CDI from EJB ;)