bennidi / mbassador-spring Goto Github PK
View Code? Open in Web Editor NEWUse MBassador in Spring environment. Supports conditional event dispatch (e.g. after or before {commit|rollback})
Use MBassador in Spring environment. Supports conditional event dispatch (e.g. after or before {commit|rollback})
Hi,
We'd like to use mbassador-spring in a project, but it's currently a pain to use in builds due to not having published Maven artifacts.
Would you accept a pull request to update pom.xml to do releases to Maven Central using mvn:release-prepare, mvn:release-perform?
There are also good instructions at http://central.sonatype.org/pages/ossrh-guide.html with a Parent POM available to make life easy.
Thanks,
Neale
bennidi, mbassador-spring not compatbile with the latest mbassador core code(which is 1.10 or 1.11 version). so would you mind sparing some time to upgrade to the latest edition.
Could you provide a sample application?
In a service class , I publish an event synchronously using bus.post(event).now()
, the corresponding event handler which is annotated with @handler executes successfully. However if I throw an Exception inside the event handler , the thrown exception cannot be caught and org.springframework.transaction.TransactionSystemException
is caught instead.
Please refer the following codes for more detail :
@Service
@Transactional
public class Service{
public void someAction(){
/**Do some business logic ***/
bus.post(anEvent).now();
}
}
@Service
@Transactional
public class SomeEventHandler{
@Handler
public void handleWithdrawnEvent(Event event) {
/**The event handler code***/
throws new ApplicationException("Oops , some error happens");
}
}
if service.someAction()
executes , my custom ApplicationException
cannot be caught .Instead the following exception is caught instead:
org.springframework.transaction.TransactionSystemException: Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Transaction marked as rollbackOnly
Please add a mechanism to provide auto subscribing to buses. A BeanPostProcessor would be great. Are you interested in any pull request?
I think it's better or good idea to add componet-scan support for multiple @Listener classes to be registed in mbassador. as it's not convenient to use subscribe method to make them integrated manually.(just check that as the guava event with spring did, please refer to https://github.com/armsargis/guava-eventbus-spring)
Please upload mbassador-spring to the public maven repository .Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.