Changeset 1315


Ignore:
Timestamp:
12/19/11 16:16:54 (9 years ago)
Author:
philsmart
Message:
 
Location:
raptor-mua/trunk
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • raptor-mua/trunk/pom.xml

    r1308 r1315  
    312312        </dependency> 
    313313        
     314        <dependency> 
     315                <groupId>org.aspectj</groupId> 
     316                <artifactId>aspectjweaver</artifactId> 
     317                <version>1.6.12</version> 
     318        </dependency> 
    314319    </dependencies> 
    315320 
  • raptor-mua/trunk/src/main/config/mua-core.xml

    r1312 r1315  
    66    governing permissions and limitations under the License. --> 
    77<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    8     xmlns:jaxws="http://cxf.apache.org/jaxws" 
     8    xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:aop="http://www.springframework.org/schema/aop" 
    99    xsi:schemaLocation=" 
    1010        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd 
    11         http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"> 
     11        http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd 
     12    http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd"> 
    1213 
    1314 
     
    1819 
    1920    <!-- WEB SERVICE ENDPOINT INTERFACE (SEI) SETUP --> 
    20     <jaxws:endpoint id="muaEndpoint"  
    21             implementor="#muaEndpointInterface" address="/MultiUnitAggregator"> 
     21    <jaxws:endpoint id="muaEndpoint" implementor="#muaEndpointInterface" address="/MultiUnitAggregator"> 
    2222        <jaxws:serviceFactory> 
    2323            <ref bean='jaxws-and-aegis-service-factory' /> 
     
    140140 
    141141    <bean id="capabilitiesConstructor" class="uk.ac.cardiff.raptormua.engine.CapabilitiesConstructor"> 
    142          <property name="statisticsHandler"> 
     142        <property name="statisticsHandler"> 
    143143            <ref bean="statisticalUnits" /> 
    144144        </property> 
     
    146146            <ref bean="storageEngine"></ref> 
    147147        </property> 
    148          <property name="metadata"> 
     148        <property name="metadata"> 
    149149            <ref bean="MUAMetadata"></ref> 
    150150        </property> 
     
    260260    </bean> 
    261261 
    262     <bean name="resourceStorageEngine" class="uk.ac.cardiff.raptor.store.ResourceStorageEngine"> 
     262    <bean name="resourceStorageEngine" class="uk.ac.cardiff.raptor.store.DefaultResourceStorageEngine"> 
    263263        <property name="dataConnection"> 
    264264            <ref bean="dataConnectionImpl" /> 
     
    279279        <property name="sessionFactory" ref="muaSessionFactory" /> 
    280280    </bean> 
     281 
     282 
     283    <!-- AOP cross cuts --> 
     284 
     285    <bean name="performanceAdvice" class="uk.ac.cardiff.raptormua.engine.runtimestatistics.PerformanceInterceptor" /> 
     286 
     287     <aop:config> 
     288        <aop:aspect id="performanceAspect" ref="performanceAdvice"> 
     289            <aop:pointcut id="resourceStorageLayer" expression="execution(* uk.ac.cardiff.raptor.store.DefaultResourceStorageEngine.performAsynchronousResourceStoragePipeline(*))" /> 
     290            <aop:around pointcut-ref="resourceStorageLayer" method="traceSave" /> 
     291        </aop:aspect> 
     292    </aop:config>  
     293 
    281294 
    282295    <!-- Load all other bean definitions --> 
  • raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/engine/MUAEngine.java

    r1312 r1315  
    300300     * @param resourceMetadata the resource metadata 
    301301     */ 
    302     public void saveAndApplyResourceClassification(List<ResourceMetadata> resourceMetadata) 
    303             throws TransactionInProgressException { 
    304         int transactionId = (int) (Math.random() * 1000000); 
    305         resourceStorageEngine.performAsynchronousResourceStoragePipeline(transactionId, resourceMetadata); 
    306  
     302    public void saveAndApplyResourceClassification(List<ResourceMetadata> resourceMetadata) { 
     303        resourceStorageEngine.performAsynchronousResourceStoragePipeline(resourceMetadata); 
    307304    } 
    308305 
  • raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/service/impl/MUAProcessImpl.java

    r1186 r1315  
    254254    public void saveResourceMetadata(List<ResourceMetadata> resourceMetadata) { 
    255255        log.info("Saving resource metadata (classification) for {} resources", resourceMetadata.size()); 
    256         try { 
    257             engine.saveAndApplyResourceClassification(resourceMetadata); 
    258         } catch (TransactionInProgressException e) { 
    259             log.error("Error trying to save resource metdata to this MUA, {}", e); 
    260         } 
     256        engine.saveAndApplyResourceClassification(resourceMetadata); 
    261257 
    262258    } 
Note: See TracChangeset for help on using the changeset viewer.