Results 1 to 4 of 4

Thread: Nightly build aop pointcut definition weirdness

  1. #1

    Default Nightly build aop pointcut definition weirdness

    Hi

    After finally getting SpringIDE working (Had to install the springide nightly build and overload xerces and xalan using -Djava.endorsed.dirs in the eclipse startup) all is fine except that I am getting pointcut errors in the following config file:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xmlns:aop="http://www.springframework.org/schema/aop"
    	xmlns:tx="http://www.springframework.org/schema/tx"
    	xsi:schemaLocation="
           http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
           http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
           http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
    
    	<!-- Transaction Managers -->
    	<bean id="txManager"
    		class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
    		<property name="dataSource" ref="dataSource" />
    	</bean>
    	<bean id="creditTxManager"
    		class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
    		<property name="dataSource" ref="creditDataSource" />
    	</bean>
    
    	<!-- Services beans  -->
    	<bean id="issuesServices" class="com.globalfilings.services.IssuesServices">
    		<property name="euAliasDAO" ref="euAliasDAO" />
    	</bean>
    	<bean id="userServices"	class="com.globalfilings.services.UserServices">
    		<property name="userDAO" ref="userDAO" />
    		<property name="userSearchDAO" ref="userSearchDAO" />
    		<property name="userdetailDAO" ref="userDetailsDAO" />
    		<property name="subscriptionDAO" ref="subscriptionDAO" />
    		<property name="subscriptionActionsDAO"	ref="subscriptionActionsDAO" />
    		<property name="portfolioInfoDAO" ref="portfolioInfoDAO" />
    		<property name="transactionDAO" ref="transactionDAO" />
    	</bean>
    	<bean id="searchServices"	class="com.globalfilings.services.SearchServices">
    		<property name="prospectusPlusSearch" ref="prospectusPlusSearchDAO" />
    	</bean>
    
    
    	<!-- AOP Enables transaction options -->
    	<!-- the transactional advice (i.e. what 'happens'; see the <aop:advisor/> bean below) -->
    	<tx:advice id="issuesTxAdvice" transaction-manager="txManager">
    		<!-- the transactional semantics... -->
    		<tx:attributes>
    			<!-- all methods starting with 'select' are read-only -->
    			<tx:method name="select*" read-only="true" />
    			<tx:method name="get*" read-only="true" />
    			<tx:method name="save*" propagation="REQUIRES_NEW" />
    			<!-- other methods use the default transaction settings (see below) -->
    			<tx:method name="*" />
    		</tx:attributes>
    	</tx:advice>
    	<tx:advice id="creditTxAdvice" transaction-manager="creditTxManager">
    		<!-- the transactional semantics... -->
    		<tx:attributes>
    			<!-- 
    				all methods starting with 'select' or 'get' are read-only 
    				all methods that start with save require a new transaction
    			-->
    			<tx:method name="select*" read-only="true" />
    			<tx:method name="get*" read-only="true" />
    			<tx:method name="save*" propagation="REQUIRES_NEW" />
    			<!-- other methods use the default transaction settings (see below) -->
    			<tx:method name="*" />
    		</tx:attributes>
    	</tx:advice>
    
    	<!-- ensure that the above transactional advice runs for any execution
    		of an operation defined by the service interfaces -->
    	<aop:config>
    		<aop:pointcut id="issuesServiceOperation" expression="execution(* com.globalfilings.services.IIssuesServices.*(..))" />
    		<aop:advisor advice-ref="issuesTxAdvice" pointcut-ref="issuesServiceOperation" />
    	</aop:config>
    	<aop:config>
    		<aop:pointcut id="userServiceOperation"	expression="execution(* com.globalfilings.services.IUserServices.*(..))" />
    		<aop:advisor advice-ref="creditTxAdvice" pointcut-ref="userServiceOperation" />
    	</aop:config>
    </beans>
    The errors are in the pontcut beans e.g. for the issuesServicesOperation pointcut the error states that "Referenced bean 'issuesTxAdvice' not found" when the bean is defined a few lines above. The application starts up and appears to work fine too. The datasources and DAOs are defined in a different xml file btw.

    Am I missing something?

    Thanks

    Charlie

  2. #2
    Join Date
    Aug 2004
    Location
    Duesseldorf, Germany
    Posts
    1,210

    Default

    Am I missing something?
    No, you just came across a bug in recent versions. This will be fixed asap.

    Had to install the springide nightly build and overload xerces and xalan using -Djava.endorsed.dirs in the eclipse startup
    That sounds a little scary! What were the errors you experienced?

    Christian
    Christian Dupuis
    SpringSource, a division of VMware
    Lead, SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/cdupuis

  3. #3

    Default ClassCastException

    I didn't keep a copy of the stack trace but it was a ClassCastException to do with XIncludeAwareParserConfiguration.

    After a bit of digging I found it was this Error but I had to include the newest version of xalan as well as xerces. I have no idea where Eclipse gets it's older version of these libs. We are using Eclipse 3.2.2, Spring 2.1 and IBatis 2.3.0.677 as the main app framework with lots of Eclipse plug-ins (SpringIDE, VSS, Abator for IBatis etc. etc.).

    Anyway - Thanks lots for the quick reply. Perversely I'm pretty happy that it is a bug!

    cheers

    Charlie

  4. #4

    Default It is fixed now...

    ...since installing nightly build 2.0.0.v200706130600

    Thanks All (Christian?)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •