<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Spring Aspect Oriented Programming – An Introduction [Part 2]</title>
	<atom:link href="http://veerasundar.com/blog/2009/04/aspect-oriented-programming-using-spring-aop-an-introduction-part-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://veerasundar.com/blog/2009/04/aspect-oriented-programming-using-spring-aop-an-introduction-part-2/</link>
	<description>Java, web and design</description>
	<lastBuildDate>Wed, 16 May 2012 22:48:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Mahesh Yadav</title>
		<link>http://veerasundar.com/blog/2009/04/aspect-oriented-programming-using-spring-aop-an-introduction-part-2/#comment-2194</link>
		<dc:creator>Mahesh Yadav</dc:creator>
		<pubDate>Tue, 17 Apr 2012 15:28:53 +0000</pubDate>
		<guid isPermaLink="false">http://veerasundar.com/blog/?p=385#comment-2194</guid>
		<description>Missed passing a parameter in the main method at line  hw.sayHello();</description>
		<content:encoded><![CDATA[<p>Missed passing a parameter in the main method at line  hw.sayHello();</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Veera</title>
		<link>http://veerasundar.com/blog/2009/04/aspect-oriented-programming-using-spring-aop-an-introduction-part-2/#comment-458</link>
		<dc:creator>Veera</dc:creator>
		<pubDate>Tue, 12 Jan 2010 08:34:56 +0000</pubDate>
		<guid isPermaLink="false">http://veerasundar.com/blog/?p=385#comment-458</guid>
		<description>Hi Priya,

you can look at this example for a better explanation on Spring AOP - http://veerasundar.com/blog/2010/01/spring-aop-example-profiling-method-execution-time-tutorial/</description>
		<content:encoded><![CDATA[<p>Hi Priya,</p>
<p>you can look at this example for a better explanation on Spring AOP &#8211; <a href="http://veerasundar.com/blog/2010/01/spring-aop-example-profiling-method-execution-time-tutorial/" rel="nofollow">http://veerasundar.com/blog/2010/01/spring-aop-example-profiling-method-execution-time-tutorial/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Veera</title>
		<link>http://veerasundar.com/blog/2009/04/aspect-oriented-programming-using-spring-aop-an-introduction-part-2/#comment-457</link>
		<dc:creator>Veera</dc:creator>
		<pubDate>Mon, 11 Jan 2010 10:10:58 +0000</pubDate>
		<guid isPermaLink="false">http://veerasundar.com/blog/?p=385#comment-457</guid>
		<description>Hi Priya,


Will get back to you shortly with a working solution.</description>
		<content:encoded><![CDATA[<p>Hi Priya,</p>
<p>Will get back to you shortly with a working solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Priya</title>
		<link>http://veerasundar.com/blog/2009/04/aspect-oriented-programming-using-spring-aop-an-introduction-part-2/#comment-456</link>
		<dc:creator>Priya</dc:creator>
		<pubDate>Mon, 11 Jan 2010 06:54:11 +0000</pubDate>
		<guid isPermaLink="false">http://veerasundar.com/blog/?p=385#comment-456</guid>
		<description>Kindly tell me what wrong with my cod

Helloworld.java
----------------------------------------

public class HelloWorld{  
     
 static ApplicationContext ctx;
 static HelloWorld helloWorld;
 
public void sayHello(String name){  
        System.out.println(&quot;Hello &quot; + name);  
 }  


 public static void main(String args[]){ 
     
     ApplicationContext context = new ClassPathXmlApplicationContext(&quot;applicationContext.xml&quot;);
    helloWorld = (HelloWorld)context.getBean(&quot;helloWorldLoggerBean&quot;);
     System.out.println(&quot;HelloWorld:&quot;+helloWorld);
   HelloWorld hw = new HelloWorld();  
   hw.sayHello(&quot;Priya&quot;);  
 }  
} 

 @Aspect 
   public class HelloWorldLoggerAspect{  
      @Pointcut(&quot;execution(* test.*.*(..))&quot;)  
       public void helloWorldMethods(){}  
        @Before(&quot;helloWorldMethods()&quot;) 
        @After(&quot;helloWorldMethods()&quot;)
         public void logMethodCall(){  
            System.out.println(&quot;The Hello World Method has been called.&quot;);  
        }  
     } 

application-context.xml



       
       


I&#039;m getting a warning message in the application-context.xml.Remote location could not be loaded.

I added the Spring-context.jar in my classpath

Kindly reply .</description>
		<content:encoded><![CDATA[<p>Kindly tell me what wrong with my cod</p>
<p>Helloworld.java<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>public class HelloWorld{  </p>
<p> static ApplicationContext ctx;<br />
 static HelloWorld helloWorld;</p>
<p>public void sayHello(String name){<br />
        System.out.println(&#8220;Hello &#8221; + name);<br />
 }  </p>
<p> public static void main(String args[]){ </p>
<p>     ApplicationContext context = new ClassPathXmlApplicationContext(&#8220;applicationContext.xml&#8221;);<br />
    helloWorld = (HelloWorld)context.getBean(&#8220;helloWorldLoggerBean&#8221;);<br />
     System.out.println(&#8220;HelloWorld:&#8221;+helloWorld);<br />
   HelloWorld hw = new HelloWorld();<br />
   hw.sayHello(&#8220;Priya&#8221;);<br />
 }<br />
} </p>
<p> @Aspect<br />
   public class HelloWorldLoggerAspect{<br />
      @Pointcut(&#8220;execution(* test.*.*(..))&#8221;)<br />
       public void helloWorldMethods(){}<br />
        @Before(&#8220;helloWorldMethods()&#8221;)<br />
        @After(&#8220;helloWorldMethods()&#8221;)<br />
         public void logMethodCall(){<br />
            System.out.println(&#8220;The Hello World Method has been called.&#8221;);<br />
        }<br />
     } </p>
<p>application-context.xml</p>
<p>I&#8217;m getting a warning message in the application-context.xml.Remote location could not be loaded.</p>
<p>I added the Spring-context.jar in my classpath</p>
<p>Kindly reply .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Priya</title>
		<link>http://veerasundar.com/blog/2009/04/aspect-oriented-programming-using-spring-aop-an-introduction-part-2/#comment-455</link>
		<dc:creator>Priya</dc:creator>
		<pubDate>Mon, 11 Jan 2010 06:47:07 +0000</pubDate>
		<guid isPermaLink="false">http://veerasundar.com/blog/?p=385#comment-455</guid>
		<description>Hi,

I implemented your sample,but while configuring the application-context.xml,I&#039;m getting

I&#039;m getting Remote location not loaded error.

I added the Spring-context.jar in my classpath</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I implemented your sample,but while configuring the application-context.xml,I&#8217;m getting</p>
<p>I&#8217;m getting Remote location not loaded error.</p>
<p>I added the Spring-context.jar in my classpath</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Veera</title>
		<link>http://veerasundar.com/blog/2009/04/aspect-oriented-programming-using-spring-aop-an-introduction-part-2/#comment-454</link>
		<dc:creator>Veera</dc:creator>
		<pubDate>Fri, 30 Oct 2009 07:47:40 +0000</pubDate>
		<guid isPermaLink="false">http://veerasundar.com/blog/?p=385#comment-454</guid>
		<description>Hi Srikanth,

To explain that point further, I&#039;m quoting from Spring AOP&#039;s documentation:

&lt;blockquote&gt;
Spring AOP only supports method execution join points for Spring beans, so you can think of a pointcut as matching the execution of methods on Spring beans. A pointcut declaration has two parts: a signature comprising a name and any parameters, and a pointcut expression that determines exactly which method executions we are interested in. In the @AspectJ annotation-style of AOP, a pointcut signature is provided by a regular method definition, and the pointcut expression is indicated using the @Pointcut annotation (the method serving as the pointcut signature must have a void return type).
&lt;/blockquote&gt;

so that method is just a signature. It need not to have a function body!</description>
		<content:encoded><![CDATA[<p>Hi Srikanth,</p>
<p>To explain that point further, I&#8217;m quoting from Spring AOP&#8217;s documentation:</p>
<blockquote><p>
Spring AOP only supports method execution join points for Spring beans, so you can think of a pointcut as matching the execution of methods on Spring beans. A pointcut declaration has two parts: a signature comprising a name and any parameters, and a pointcut expression that determines exactly which method executions we are interested in. In the @AspectJ annotation-style of AOP, a pointcut signature is provided by a regular method definition, and the pointcut expression is indicated using the @Pointcut annotation (the method serving as the pointcut signature must have a void return type).
</p></blockquote>
<p>so that method is just a signature. It need not to have a function body!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Veera</title>
		<link>http://veerasundar.com/blog/2009/04/aspect-oriented-programming-using-spring-aop-an-introduction-part-2/#comment-453</link>
		<dc:creator>Veera</dc:creator>
		<pubDate>Thu, 29 Oct 2009 06:43:43 +0000</pubDate>
		<guid isPermaLink="false">http://veerasundar.com/blog/?p=385#comment-453</guid>
		<description>thanks Srikanth.

the pointcut definition tell the Spring AOP to intercept at that point. For example, in the above definition, AOP inserts our code when ever the methods inside the com.veerasundar.aop.demo gets executed.

I hope I answered your question. Do let me know if it needs further explanation.</description>
		<content:encoded><![CDATA[<p>thanks Srikanth.</p>
<p>the pointcut definition tell the Spring AOP to intercept at that point. For example, in the above definition, AOP inserts our code when ever the methods inside the com.veerasundar.aop.demo gets executed.</p>
<p>I hope I answered your question. Do let me know if it needs further explanation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Srikanth</title>
		<link>http://veerasundar.com/blog/2009/04/aspect-oriented-programming-using-spring-aop-an-introduction-part-2/#comment-452</link>
		<dc:creator>Srikanth</dc:creator>
		<pubDate>Thu, 29 Oct 2009 06:02:25 +0000</pubDate>
		<guid isPermaLink="false">http://veerasundar.com/blog/?p=385#comment-452</guid>
		<description>Hi,

  It was good posting, Since i am new to the springs framework i didnt understand [@Pointcut(&quot;execution(* com.veerasundar.aop.demo.*.*(..))&quot;)].

Regards,
Sri</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>  It was good posting, Since i am new to the springs framework i didnt understand [@Pointcut("execution(* com.veerasundar.aop.demo.*.*(..))")].</p>
<p>Regards,<br />
Sri</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: karunakar</title>
		<link>http://veerasundar.com/blog/2009/04/aspect-oriented-programming-using-spring-aop-an-introduction-part-2/#comment-451</link>
		<dc:creator>karunakar</dc:creator>
		<pubDate>Wed, 24 Jun 2009 13:32:56 +0000</pubDate>
		<guid isPermaLink="false">http://veerasundar.com/blog/?p=385#comment-451</guid>
		<description>hi veera...am new to spring  and am willing to start learning creating my own application.can you suggest me a way of doing this.

Am familiar with struts,ejb,webservices,hibernate.please guide me in this regard</description>
		<content:encoded><![CDATA[<p>hi veera&#8230;am new to spring  and am willing to start learning creating my own application.can you suggest me a way of doing this.</p>
<p>Am familiar with struts,ejb,webservices,hibernate.please guide me in this regard</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Veera</title>
		<link>http://veerasundar.com/blog/2009/04/aspect-oriented-programming-using-spring-aop-an-introduction-part-2/#comment-450</link>
		<dc:creator>Veera</dc:creator>
		<pubDate>Sun, 21 Jun 2009 09:29:16 +0000</pubDate>
		<guid isPermaLink="false">http://veerasundar.com/blog/?p=385#comment-450</guid>
		<description>Hi Kumar,

Few things I noticed in your code:

1) Have you declared the @AspectJ support in your &#039;beans.xml&#039; file ?
2) You are creating the HelloWorld object using &#039;new&#039; keyword.

//HelloWorld hw = new HelloWorld();//

but, you should be getting the HelloWorld instance from your spring context. eg;

factory.getBean(helloworldbean);

--

Spring applies AOP to the objects which it is managing.</description>
		<content:encoded><![CDATA[<p>Hi Kumar,</p>
<p>Few things I noticed in your code:</p>
<p>1) Have you declared the @AspectJ support in your &#8216;beans.xml&#8217; file ?<br />
2) You are creating the HelloWorld object using &#8216;new&#8217; keyword.</p>
<p>//HelloWorld hw = new HelloWorld();//</p>
<p>but, you should be getting the HelloWorld instance from your spring context. eg;</p>
<p>factory.getBean(helloworldbean);</p>
<p>&#8211;</p>
<p>Spring applies AOP to the objects which it is managing.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

