[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2051) please put WEB-INF under view instead of resources (seam-gen)
by Dan Allen (JIRA)
please put WEB-INF under view instead of resources (seam-gen)
-------------------------------------------------------------
Key: JBSEAM-2051
URL: http://jira.jboss.com/jira/browse/JBSEAM-2051
Project: JBoss Seam
Issue Type: Feature Request
Components: Tools
Affects Versions: 2.0.0.CR1
Reporter: Dan Allen
Assigned To: Dan Allen
Fix For: 2.0.x
I am aware that there is no hotter issue than this one. But PAUSE before rejecting it and hear me out.
The current seam-gen project structure is
src
action
model
resources
WEB-INF
META-INF
view
IDEs choke on this structure, but it really comes down to just one folder. The src/ and resources/ directory really aren't a problem. The real problem is that WEB-INF/ just needs to be under view/. Seriously, if that can happen, the IDEs really will be happier. People are not arguing for the sake of arguing. This convention is the way that Sun laid out more than a decade ago and vendors have catered to it ever since (even JBoss). It's not like we woke up one day and said, gee, let's put WEB-INF/ in the folder with web artifacts. Rather than try to change the whole world, can we just move this one folder? I promise I am not arguing to read my own writing.
Proposed structure
src
action
model
resources
META-INF
view
WEB-INF
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4001) Wicket Instrumentation Annotation
by Paul Mooney (JIRA)
Wicket Instrumentation Annotation
---------------------------------
Key: JBSEAM-4001
URL: https://jira.jboss.org/jira/browse/JBSEAM-4001
Project: Seam
Issue Type: Feature Request
Components: Wicket
Reporter: Paul Mooney
Instrument wicket classes which are annotated with a seam annotation (something like @WicketComponent), as well as all of their non-static nested classes (including anonymous).
This would be an alternative to the current approach of using filesets or package patterns to determine which classes to pass to the JavassistInstrumentor (either via ant,maven, or javaagent).
As well, if possible, this may be an alternative to placing wicket classes in WEB-INF/wicket at runtime. In this case some configuration might be needed to enable/disable runtime instrumentation in order to avoid attempts to re-instrument classes which have already been instrumented at buildtime.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4030) Spring integration leaks proxy classes causing permgen leak
by Nicko Cadell (JIRA)
Spring integration leaks proxy classes causing permgen leak
-----------------------------------------------------------
Key: JBSEAM-4030
URL: https://jira.jboss.org/jira/browse/JBSEAM-4030
Project: Seam
Issue Type: Bug
Components: Spring
Affects Versions: 2.1.1.GA
Environment: JVM 1.6.0_10
Reporter: Nicko Cadell
We are using Seam 2.1.1.GA with Spring integration. We have hit an issue where it looks like a new javassist proxy class is being created each time a Seam component is created.
Normally the org.jboss.seam.Component caches the Class<ProxyObject> in its private 'factory' field. Each time a new instance of the component is required this cached class is used to create the instance.
When using the Spring integration the Component is actually a org.jboss.seam.ioc.spring.SpringComponent which extends the org.jboss.seam.ioc.IoCComponent. The SpringComponent asks Spring for the instance and the IoCComponent wraps this in a javassist proxy wrapper.
The issue that we are seeing is that the IoCComponent, in its instantiateJavaBean() method, uses ProxyUtils.enhance() to wrap the bean in javassist proxy, but does not, or is unable to, cache the Class<ProxyObject> created in the Component's 'factory' field. Therefore each time ProxyUtils.enhance() is called it creates a new class with a new name of the form XXX_$$_javassist_XXX using an incrementing counter. These generated classes are never cleaned up by the JVM and cause a slow memory leak.
I can understand that as Seam is asking a 3rd party container (Spring) for the bean instance it cannot control the type of the bean that will be returned. It is possible for the bean to change type while the application is running and Seam would then need to create a new proxy class. However in the typical case the same proxy class can be reused to create a new instance for each new bean instance.
My app has a number of event scoped Seam beans that are created/configured by Spring and the current implementation manges to run the VM out of permgen space in only a few minutes.
A naive fix would be just to cache the proxy class and use it every time, but this would potentially impose additional restrictions on the 3rd party container. A more complete solution would be to use the type (class and interfaces) of the instance obtained from Spring to determine if a new proxy class needs to be built or if the cached proxy class can be reused.
The naive fix approach can be seen in this forum post: http://www.seamframework.org/Community/Seam211GAWithSpringNewJavassistCla...
In our application this resolved the issues we way with many proxy classes being built for each request, and therefore resolved our permgen issues.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4022) ComponentScanner fails with classes in WEB-INF/classes on websphere
by John Eckhart (JIRA)
ComponentScanner fails with classes in WEB-INF/classes on websphere
-------------------------------------------------------------------
Key: JBSEAM-4022
URL: https://jira.jboss.org/jira/browse/JBSEAM-4022
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.1.1.GA
Environment: Websphere 7.0 (also reported on Websphere 6.1)
Reporter: John Eckhart
This bug is a follow-on to 2347 which was rejected. Since it doesn't appear possible to request a bug be "reopened", I've created a new bug to track the problem.
The problem: When a Seam annotated class is included in a WAR file, the filename of the class will be "WEB-INF/classes/com/mycompany/MyClass.class". Theoretically, this IS the filename as the classes are packaged under WEB-INF/classes, however, the classloader does not recognize/ignore "WEB-INF/classes/" as part of the name (which is logical, since the classpath includes everything under this directory). This causes ComponentScanner to throw the following exception: java.lang.NoClassDefFoundError: WEB-INF.classes.com.mycompany.Myclass
The previous issue was rejected with the following rationale: "This turned out to be a user error, not a websphere issues. The classpath was correct, but the user put a META-INF/components.xml in the WAR which causes the scanning error."
However:
Where would the components.xml go if a project is broken into WAR, JAR (for JPA), JAR (for EJB), and finally EAR (containing the mentioned components)?
Based on the examples I've read for WebSphere , the recommended place for components.xml is in the WAR file. Moreover, it would stand to reason that including seam components in the WAR would be beneficial (ie POJO components as backing beans for jsf pages).
I ran into this issue recently in Websphere 7.0 where I had a Seam managed POJO as a backing bean to a JSF page. The bean wouldn't load because of the NoClassDefFoundError. I patched seam to work-around this issue as I didn't see any other solution (JSF backing beans don't belong in my JPA or EJB layers).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years