[JBoss AOP] - AOP configuration in AS
by ekobir
Hi All
I need help to configure to use Dynamic AOP in JBOSS AS?
Let me tell you the steps i have done.
1-) Download JBOSS AOP 2.0.0 GA and run build xml(jdk5.0) to install on JBOSS 4.3.0.GA
2-) Change \deploy\jboss-aop-jdk50.deployer\META-INF\jboss-service.xml
| <attribute name="EnableLoadtimeWeaving">true</attribute>
|
3) Wrote interceptor class which implements iterceptor interface
4-) But jboss-aop.xml file under META-INF directory of war archive.
Basically, What I'm trying to do is LTW (load time weaving) on servletContext as it is provided by jboss.
| <aop xmlns="urn:jboss:aop-beans:1.0">
|
| <prepare
| expr="execution(java.lang.Object $instanceof{javax.servlet.ServletContext}->getAttribute(java.lang.String))"/>
|
| </aop>
|
As far as i understood, prepare should be used for dynamic aop...At this point where should I point the interceptor implementation?
Can you send me link or provide an example for dynamic aop in jboss as?
Thanks a lot
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4185185#4185185
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4185185
17 years, 6 months
[Management, JMX/JBoss] - JMX/JBoss + Spring integration + nullable attributes
by gjeudy
Hi,
I'm using Spring 2.x integration with jboss JMX server version 4.2.2.GA and so far it worked great to publish my spring beans as MBeans. However, there is 1 thing I don't get, I have setup a JMX operation method with parameters that accepts java.lang.Long types. That works fine as long as I don't supply a null value.
Can anybody enlighten me on how I can make the parameter optional ?
Here's the stacktrace I get:
java.lang.NumberFormatException: For input string: ""
| java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
| java.lang.Long.parseLong(Long.java:424)
| java.lang.Long.valueOf(Long.java:518)
| sun.beans.editors.LongEditor.setAsText(LongEditor.java:24)
| org.jboss.util.propertyeditor.PropertyEditors.convertValue(PropertyEditors.java:260)
| org.jboss.jmx.adaptor.control.Server.invokeOpByName(Server.java:239)
| org.jboss.jmx.adaptor.control.Server.invokeOp(Server.java:223)
| org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.invokeOp(HtmlAdaptorServlet.java:262)
| org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdaptorServlet.java:100)
| org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doPost(HtmlAdaptorServlet.java:82)
| javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
| javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
|
|
Thank you,
-Guillaume
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4185184#4185184
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4185184
17 years, 6 months