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 VM options in one place, and I don't have to copy/paste VM options in NetBeans/developer-server to NetBeans/production-server. On Mon, Nov 19, 2012 at 11:09 AM, José Luis Cetina <maxtorz...@gmail.com>wrote: > 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 tab then in VM options add > the lines. > > I'm not sure if I was clear with this explanation. > El 19/11/2012 09:58, "Howard W. Smith, Jr." <smithh032...@gmail.com> > escribió: > > > 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 migrate to Tomcat 7.0.32. :) > > > > > > > > On Mon, Nov 19, 2012 at 10:46 AM, José Luis Cetina <maxtorz...@gmail.com > > >wrote: > > > > > 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. <smithh032...@gmail.com> > > > > > > > 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 @ApplicationScoped and @SessionScoped in my app, but I > may > > > > consider @ViewAccessScoped. > > > > > > > > I already added MyFaces CODI as one of the first steps, when I was > > > > migrating to TomEE with my app. Now, I need to probably change all > (or > > > most > > > > of) my @SessionScoped to @ViewAccessScoped per your recommendation. > > > > > > > > Tell you one thing, prior to migrating to MyFaces Core (some months > > > ago), I > > > > had 2 JSF Managed @SessionScoped and all the other beans were JSF > > managed > > > > @ViewScoped. Since then, I've read some recommendations by other JSF > > > expert > > > > developers that recommend to use @RequestScoped and to avoid > > @ViewScoped > > > > (and I think they even recommended against @SessionScoped, too). > > > > > > > > With all that said, I either continue with @SessionScoped or go with > > CODI > > > > @viewAccessScoped. Looking forward to responses. > > > > > > > > I need to find my way to those JVM settings for TomEE as you advised > in > > > > your email response. :) > > > > > > > > Thanks, > > > > Howard > > > > > > > > > > > > > > > > On Mon, Nov 19, 2012 at 10:31 AM, José Luis Cetina < > > maxtorz...@gmail.com > > > > >wrote: > > > > > > > > > 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 project, do you use some @ViewScope??? If > > yes > > > > let > > > > > me tell you that you have 2 choices, replace @ViewScope with > > > > > @ConversationScoped or start to use CODI and use @ViewAccessScoped. > > > > > > > > > > The second options IMHO is the best, because you dont have to > change > > > > > nothing else. > > > > > > > > > > Why you have to change @ViewScope to @ConversationScoped > > > > > or @ViewAccessScoped this is because with CDI you cant use it, here > > is > > > > > where Apache CODI start to help with thiis. > > > > > > > > > > Here is the dependencies if you need it: > > > > > > > > > > <properties> > > > > > ........ > > > > > > <apache.myfaces.codi.version>1.0.5</apache.myfaces.codi.version> > > > > > </properties> > > > > > > > > > > <!-- MyFaces CODI --> > > > > > <!-- the JSF independent core --> > > > > > <dependency> > > > > > > <groupId>org.apache.myfaces.extensions.cdi.core</groupId> > > > > > <artifactId>myfaces-extcdi-core-api</artifactId> > > > > > <version>${apache.myfaces.codi.version}</version> > > > > > </dependency> > > > > > <dependency> > > > > > > <groupId>org.apache.myfaces.extensions.cdi.core</groupId> > > > > > <artifactId>myfaces-extcdi-core-impl</artifactId> > > > > > <version>${apache.myfaces.codi.version}</version> > > > > > <scope>runtime</scope> > > > > > </dependency> > > > > > > > > > > <!-- the JSF-2.0 specific library, which includes the > JSF-1.2 > > > > parts > > > > > --> > > > > > <dependency> > > > > > > > > <groupId>org.apache.myfaces.extensions.cdi.modules</groupId> > > > > > > <artifactId>myfaces-extcdi-jsf20-module-api</artifactId> > > > > > <version>${apache.myfaces.codi.version}</version> > > > > > <type>jar</type> > > > > > </dependency> > > > > > <dependency> > > > > > > > > <groupId>org.apache.myfaces.extensions.cdi.modules</groupId> > > > > > > <artifactId>myfaces-extcdi-jsf20-module-impl</artifactId> > > > > > <version>${apache.myfaces.codi.version}</version> > > > > > <scope>runtime</scope> > > > > > </dependency> > > > > > > > > > > > > > > > 2012/11/19 Howard W. Smith, Jr. <smithh032...@gmail.com> > > > > > > > > > > > Now that my TomEE/CDI is successfully connecting to database to > > > > validate > > > > > > user login credentials, my web app is now not able to open the > > first > > > > page > > > > > > after successful login. Basically, it is a parent index.xhtml, > > which > > > > has > > > > > > ui:include src="#{bean.page}", and I have been working my way to > > > change > > > > > my > > > > > > code to avoid OpenEJB 'nested' exceptions (beans injecting > > themselves > > > > > into > > > > > > each other, for example, ordersController injects itself into > > > > > > layoutController, and layoutController injecting itself into > > > > > > ordersController, and this is all occurring during @PostConstruct > > of > > > > both > > > > > > controller/beans). > > > > > > > > > > > > Last night (early this morning), before I went to bed, I got past > > the > > > > > > 'nested' exception caused by ordersController and > layoutController > > > > during > > > > > > @PostConstruct, and I got to another exception that may be > another > > > > > 'nested' > > > > > > exception, somewhere else in my code, but I didn't write that > down. > > > > > > Anyway, I kept undeploying my web app, shutdown TomEE, > > > create-n-build > > > > my > > > > > > app (in NetBeans), and then deploy web app to TomEE, and > finally, I > > > got > > > > > the > > > > > > following exception: > > > > > > > > > > > > Exception in thread "http-bio-8080-exec-19" > > > java.lang.OutOfMemoryError: > > > > > > PermGen space > > > > > > > > > > > > I know I need to add JVM properties to work around this, so my 2 > > > > > questions > > > > > > are as follows: > > > > > > > > > > > > 1. Where can I add JVM properties for TomEE? > > > > > > > > > > > > 2. What are some good things to know of avoiding OpenEJB 'nested' > > > > > > exceptions? > > > > > > > > > > > > Thanks, > > > > > > Howard > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > ------------------------------------------------------------------- > > > > > *SCJA. José Luis Cetina* > > > > > ------------------------------------------------------------------- > > > > > > > > > > > > > > > > > > > > > -- > > > ------------------------------------------------------------------- > > > *SCJA. José Luis Cetina* > > > ------------------------------------------------------------------- > > > > > >