Skip to content

Commit

Permalink
final
Browse files Browse the repository at this point in the history
  • Loading branch information
begarco committed Feb 28, 2017
1 parent 57eeda7 commit 806c8b9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ after_success:
deploy:
provider: releases
name: ejbadass-transaction-plugin
tag_name: 1.0.2
tag_name: 1.1.0
body: "Plugin to add transactions to EJBadass project."
draft: false
api_key:
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>ejbadass</groupId>
<artifactId>ejbadass-transaction-plugin</artifactId>
<version>1.0.2</version>
<version>1.1.0</version>
<description>Plugin to add transactions to EJBadass project.</description>
<properties>
<jdk.version>1.8</jdk.version>
Expand Down Expand Up @@ -38,7 +38,7 @@
<dependency>
<groupId>com.github.EJBadass</groupId>
<artifactId>ejbadass-api</artifactId>
<version>1.0.2</version>
<version>1.1.0</version>
</dependency>
</dependencies>
</project>
5 changes: 2 additions & 3 deletions src/fr/isima/ejbadass/transaction/TransactionInterceptor.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package fr.isima.ejbadass.transaction;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

import fr.isima.ejbadass.annotation.Inject;
Expand All @@ -15,9 +14,9 @@ public class TransactionInterceptor implements IInterceptor {

@Override
public Object proceed(Object object, Method method, Object[] args)
throws IllegalAccessException, IllegalArgumentException, InvocationTargetException {
throws Exception {
Object result = null;
boolean isRequired = ((Transactional)method.getDeclaredAnnotationsByType(Transactional.class)[0]).value() == TransactionType.REQUIRED;
boolean isRequired = ((Transactional)object.getClass().getMethod(method.getName(), method.getParameterTypes()).getDeclaredAnnotationsByType(Transactional.class)[0]).value() == TransactionType.REQUIRED;
ITransaction transaction = transactionManager.getTransaction(this, isRequired);

if(transaction.isCaller(this))
Expand Down
15 changes: 1 addition & 14 deletions src/fr/isima/ejbadass/transaction/TransactionManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,4 @@ public void close() {
transactions.get().peek().awake();
}

}


/*******************
1- etat des lieux
2- taux de completude
3- reussi pas reussi
4- amelioration
5- nombre de lignes de code
********************/

// TODO voir les problemes d'annotaions sur les interfaces
}

0 comments on commit 806c8b9

Please sign in to comment.