[jboss-user] [JBossWS] - AOP with web service

abdujaparov do-not-reply at jboss.com
Mon Oct 22 06:57:40 EDT 2007


Hi I heve developed a web service for jbossws and I would apply an aspect to the methods of this web service.
I have written the aspect code and the xml file for jbossaop and I have installed jboss aop on jboss4.2.1 following the jboss aop instruction (I've copied this directory jboss-aop-jdk50.deployer in the deploy directory of jboss4.2.1).
My war file is composed so:

directory META-INF:

directory WEB-INF:
-file web.xml;
-file jboss-aop.xml;
+directory classes:
-file jboss-aop.xml;
+directory xml:
-XMLJDomWriterStat.class
-XMLSaxReaderStat.class
+directory services:
-ServiceAOP.class;
-ServiceAOPAspect.class.

My web.xml file is so composed:

  | <?xml version="1.0" encoding="UTF-8"?>
  | 
  | <web-app version="2.5"
  |     xmlns="http://java.sun.com/xml/ns/javaee"
  |     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  |     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
  | 
  |    <servlet>
  |     <servlet-name>ServiceAOP</servlet-name>
  |     <servlet-class>service.ServiceAOP</servlet-class>
  |   </servlet>
  |   
  |   <servlet-mapping>
  |     <servlet-name>ServiceAOP</servlet-name>
  |     <url-pattern>/*</url-pattern>
  |   </servlet-mapping>
  |     
  | </web-app>
  | 

My jboss-aop.xml is the following:

  | <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  | <aop>
  |     <aspect class="service.ServiceAOPAspect" scope="PER_VM"/>
  |     <bind pointcut="execution(public double service.ServiceAOP-&gt;fattoriale(int))">
  |         <advice aspect="service.ServiceAOPAspect" name="statistics"/>
  |     </bind>
  | </aop>
  | 

What have I to do for running aop on web service?
Thanks all, bye bye.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4097400#4097400

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4097400



More information about the jboss-user mailing list