[JBoss Portal] - portlet doView called when not displayed in region
by esmith1
During the rendering of a page in the Dashboard I am seeing that all portlets assigned to the page, regardless of their assigned layout region, have their doView() method called. This is an unnecessary performance overhead; only portlets which will be rendered should have their doView() called.
For a simple test I created a HelloWorldJSPPortlet and added 2 log.error() calls which display output on the console showing the portlet is executing its doView, and displaying the portlet instance/window-specific value.
In Configure Dashboard I used the "generic" layout and assigned the portlet to both the left and the center regions. In the portlet VIEW I told the left one its name was alpha and the center one its name was zeta. All good so far and the console shows both alpha and zeta doView.
I then enter Configure Dashboard and change the layout to "1column" (center region only), return to the Dashboard which correctly shows only zeta, BUT the console shows that both alpha and zeta were asked for their doView which is overkill because alpha will never be displayed in this layout.
12:44:17,196 ERROR [HelloWorldJSPPortlet] in doView
| 12:44:41,457 ERROR [HelloWorldJSPPortlet] yourname: alpha
| 12:44:41,488 ERROR [HelloWorldJSPPortlet] in doView
| 12:44:41,488 ERROR [HelloWorldJSPPortlet] yourname: zeta
|
This can become a performance problem when a user has slow performing portlets in the other regions which are not displaying (or dozens of portlets in those regions), yet the user doesnt realize that to improve performance they need to go into the dashboard, change the layout back so they can see the obscured region, delete the offending portlet(s), then change the layout to the one they wanted.
Our preferred solution is that rendering of a dashboard page should only call doView for the portlets which will be displayed on that page (e.g. only portlets belonging to regions belonging to the layout being used).
We like the ability to "go back" to a layout used previously and see the portlet windows still assigned to it, so we are not enthusiastic about the solution which would delete portlet windows from regions (which dont exist in the new layout) during the layout change activity in Configure Dashboard.
Last, as a temporary workaround, is there any way a portlet doView() method can determine both: what region it is mapped to, and whether that region will be rendered/belongs to the layout being used for the dashboard? If so, I could have all doView() methods simply return; under that condition.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4178911#4178911
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4178911
17 years, 7 months
[Installation, Configuration & DEPLOYMENT] - Re: Problem with java.lang.OutOfMemoryError
by thetikigod
Periodically when developing and redeploying web apps, an error will occur and the JBoss AS will crash, burn, and will require a restart. Most of the time, the error is an out of memory error and will appear in the console as follows:
| 10:10:22,640 ERROR [MainDeployer] Could not create deployment: file:(yourFile)
| java.lang.OutOfMemoryError: PermGen space
|
To fix this you will need to modify the run file, again. There are two options: increase the size of the PermGen or allow garbage collection on PermGen . Each method has its pro/cons. Increasing the size of the PermGen will only delay the errors longer, because the memory will be used up eventually. If all you are looking to do is increase the time between restarts, this is a viable solution. If low memory is an issue or if the error must be prevented altogether, then garbage collection should be permitted on PermGen. With this solution, you may run the risk of garbage collecting classes that will be used again (this has not been tested). Both may be used which may lessen the risk that classes will be collected before their time. Realize that this does not eliminate the risk. Note that both methods will require JBoss AS to be restarted.
Increase Memory Size of PermGen:
1. Navigate to JBOSS_HOME/bin/.
2. Open the run.conf (run.bat for windows) file for editing.
3. Add the following after the remote debugging lines:
In run.conf:
| # Memory configuration to delay PermGen: OutOfMemoryError(s)
| JAVA_OPTS="$JAVA_OPTS -XX:MaxPermSize=512m"
|
In run.bat:
| rem Memory configuration to delay PermGen: OutOfMemoryError(s)
| set JAVA_OPTS=-XX:MaxPermSize=512m %JAVA_OPTS%
|
4. Save the file.
5. PermGen will be configured with a larger memory space.
*Note: A size other than 512 may be used.
Garbage Collection on PermGen
1. Navigate to JBOSS_HOME/bin/.
2. Open the run.conf (run.bat for windows) file for editing.
3. Add the following after the remote debugging lines:
In run.conf:
| # Garbage Collection configuration to fix PermGen: OutOfMemoryError(s)
| JAVA_OPTS="$JAVA_OPTS -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled"
|
In run.bat:
| rem Garbage Collection configuration to fix PermGen: OutOfMemoryError(s)
| set JAVA_OPTS= -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled %JAVA_OPTS%
|
4. Save the file.
5. PermGen will be configured to be garbage collected.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4178906#4178906
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4178906
17 years, 7 months
[Installation, Configuration & DEPLOYMENT] - Re: Is it possible to configure deployment directory locatio
by mouck
Thanks for your reply PeterJ,
but now i have :
19:01:44,834 ERROR [AbstractKernelController] Error installing to Configured: name=VFSDeploymentScanner state=Instantiated
| java.lang.RuntimeException: Error configuring property: URIList for VFSDeploymentScanner
| at org.jboss.kernel.plugins.dependency.ConfigureAction.dispatchSetProperty(ConfigureAction.java:114)
| at org.jboss.kernel.plugins.dependency.ConfigureAction.setAttributes(ConfigureAction.java:87)
| at org.jboss.kernel.plugins.dependency.ConfigureAction.installActionInternal(ConfigureAction.java:44)
| at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
| at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
| at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
| at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
| at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
| at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBean(AbstractKernelDeployer.java:331)
| at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBeans(AbstractKernelDeployer.java:309)
| at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deploy(AbstractKernelDeployer.java:130)
| at org.jboss.kernel.plugins.deployment.BasicKernelDeployer.deploy(BasicKernelDeployer.java:76)
| at org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer.deploy(BasicXMLDeployer.java:88)
| at org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer.deploy(BasicXMLDeployer.java:158)
| at org.jboss.bootstrap.microcontainer.ServerImpl.doStart(ServerImpl.java:115)
| at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:398)
| at org.jboss.Main.boot(Main.java:209)
| at org.jboss.Main$1.run(Main.java:544)
| at java.lang.Thread.run(Unknown Source)
| Caused by: java.io.IOException: No context factory for C:/DEV_JAVA/eclipse/workspace-150/Framework-IHM/webapp/
| at org.jboss.virtual.VFS.getVFS(VFS.java:88)
| at org.jboss.system.server.profileservice.VFSScanner.getVFforURI(VFSScanner.java:582)
| at org.jboss.system.server.profileservice.VFSScanner.addURI(VFSScanner.java:280)
| at org.jboss.system.server.profileservice.VFSScanner.setURIList(VFSScanner.java:179)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
| at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
| at org.jboss.beans.info.plugins.DefaultPropertyInfo.set(DefaultPropertyInfo.java:143)
| at org.jboss.beans.info.plugins.BeanInfoUtil.set(BeanInfoUtil.java:177)
| at org.jboss.beans.info.plugins.AbstractBeanInfo.setProperty(AbstractBeanInfo.java:289)
| at org.jboss.kernel.plugins.dependency.PropertyDispatchWrapper.execute(PropertyDispatchWrapper.java:89)
| at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
| at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
| at org.jboss.kernel.plugins.dependency.ConfigureAction.dispatchSetProperty(ConfigureAction.java:109)
| ... 25 more
| Failed to boot JBoss:
| java.lang.IllegalStateException: Incompletely deployed:
any idea?
thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4178877#4178877
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4178877
17 years, 7 months