[Microcontainer] - Re: JMX Decorator for POJOs - suggestion
by dward@redhat.com
Adrian,
I appreciate your response, though I think "hacky" was a bit strong... :) I merely thought that a jndi-name attribute could serve as a shorthand for the JNDIBinding annotation that you mentioned. It is very similar to the <attribute name="JNDIName"...> element that one can nest under MBean tags. Is that considered "hacky" as well?
Having a shorthand or "easier" way of doing configuration is not unprecedented in JBoss. For example, people used to have to write mbean *-service.xml files to set up datasources in AS. Now they just have to write a *-ds.xml file, which is a simpler syntax, although under the hood it just gets trasnformed. (Or at least that's how it used to be implemented...)
Last, your repsponse addressed putting the POJO in JNDI. I didn't see what the recommended approach is to expose the POJO as a JMX MBean. Is there an <annotation ..> for that is well?
Thank you.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991656#3991656
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991656
18 years, 1 month
[JBoss Seam] - Seam CR1.2 component name and precedence
by venkateshbr
hello,
We have just upgraded our application from Seam 1.1 Beta 2 to jboss-seam-1.1.0.CR2. From then on i am getting this exception when the classes are being scanned by seam during server startup.
21:10:14,775 INFO [Initialization] initializing Seam
21:10:14,785 INFO [Scanner] scanning: C:\devtools\eprocurement-tomcat\webapps\eprocurement\WEB-INF\classes
21:10:19,542 INFO [Scanner] scanning: /C:/devtools/eprocurement-tomcat/webapps/eprocurement/WEB-INF/lib/jboss-seam.jar
21:10:21,505 ERROR [[/eprocurement]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
java.lang.IllegalStateException: Two components with the same name and precedence: emailSession
at org.jboss.seam.init.Initialization.addComponentDescriptor(Initialization.java:351)
at org.jboss.seam.init.Initialization.installScannedComponentAndRoles(Initialization.java:500)
at org.jboss.seam.init.Initialization.installScannedClass(Initialization.java:449)
at org.jboss.seam.init.Initialization.scanForComponents(Initialization.java:443)
at org.jboss.seam.init.Initialization.init(Initialization.java:426)
at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:33)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
emailSession is an application component defined in components.xml. I pass some properties to this component through components.xml
| <component class="com.OutboundEmailSession">
| <property name="host">emalhost</property>
| <property name="fromAddress">me(a)test.com
| </property>
| <property name="fromName">My Name</property>
| </component>
|
This error disappears when I remove this component declaration from components.xml
I guess when i declare my component in components.xml the component is found twice by seam during initialization
This was working fine when in Beta 2. Is there a change in component precedence which i have to explicitly set for using CR1.2.
regards
Venkatesh
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991655#3991655
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991655
18 years, 1 month
[Clustering/JBoss] - ERROR [[jsp]] Servlet.service() for servlet jsp threw except
by Rajesh.Gajula
Hi,
i have a cluster implemented with three nodes and Running fine with around 30 applications deployed on Sun OS.
now a days, i can see one instance is causing problem and applications are not accesible when the request went to particular node.
I see the below stack trace in server logs.
INFO | jvm 1 | 2006/12/06 12:14:48 | 12:14:48,878 INFO [WebappClassLoader] Illegal access: this web application instanc
e has been stopped already. Could not load org.jboss.net.protocol.jar.Handler. The eventual following stack trace is caused
by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and
has no functional impact.
INFO | jvm 1 | 2006/12/06 12:14:48 | 12:14:48,878 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
INFO | jvm 1 | 2006/12/06 12:14:48 | java.lang.ThreadDeath
INFO | jvm 1 | 2006/12/06 12:14:48 | at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.j
ava:1221)
INFO | jvm 1 | 2006/12/06 12:14:48 | at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
INFO | jvm 1 | 2006/12/06 12:14:48 | at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
INFO | jvm 1 | 2006/12/06 12:14:48 | at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
INFO | jvm 1 | 2006/12/06 12:14:48 | at java.lang.Class.forName0(Native Method)
INFO | jvm 1 | 2006/12/06 12:14:48 | at java.lang.Class.forName(Class.java:164)
The remaining two nodes in the same cluster will process requests during the time....
The affected node only active after restart...
Can any one help me, why i am getting this "java.lang.ThreadDeath" exception and how to resolve this.
Thanks in advance,
-Rajesh Gajula
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991651#3991651
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991651
18 years, 1 month