event bus for EJB3 target implementation

29 views
Skip to first unread message

Anton Hughes

unread,
Aug 8, 2015, 10:25:10 AM8/8/15
to Sculptor Generator
Hello

I understand that the Event Bus is not available for jboss.

Can you briefly describe what we need to do to get this working?

Thanks

Torsten Juergeleit

unread,
Aug 8, 2015, 12:56:28 PM8/8/15
to Sculptor Generator
The reason for no EventBus implementation in Sculptor (introduced in 2010) for EJB3 is that EJB3 at these times (JEE5) had no support for events but CDI (introduced in JEE6) does.
So nowadays with CDI it should be possible to come up with a Sculptor EventBus implementation for JEE6. This needs the following:
  1. An implementation of Sculptors org.sculptor.framework.event.EventBus interface (similar to the provided CamelEventBusImpl or SpringIntegrationEventBusImpl)
  2. Modifications to the corresponding Sculptor templates (e.g. DomainObjectAnnotationTmpl or ServiceEjbTmpl)  for adding the EventBus-specific annotations, e.g. for CDI @Observes, @Updates or @Qualifier
Instead using JEE6 how about Google Guava or Reactors or Axon ones? These implementations are not limited to JEE and can be used in a plain-vanilla Spring application as well.

/Torsten

Anton Hughes

unread,
Aug 8, 2015, 1:44:01 PM8/8/15
to Sculptor Generator

Hi Torsten

Thanks.

On Saturday, August 8, 2015 at 6:56:28 PM UTC+2, Torsten Juergeleit wrote:
The reason for no EventBus implementation in Sculptor (introduced in 2010) for EJB3 is that EJB3 at these times (JEE5) had no support for events but CDI (introduced in JEE6) does.
So nowadays with CDI it should be possible to come up with a Sculptor EventBus implementation for JEE6. This needs the following:
  1. An implementation of Sculptors org.sculptor.framework.event.EventBus interface (similar to the provided CamelEventBusImpl or SpringIntegrationEventBusImpl)
  2. Modifications to the corresponding Sculptor templates (e.g. DomainObjectAnnotationTmpl or ServiceEjbTmpl)  for adding the EventBus-specific annotations, e.g. for CDI @Observes, @Updates or @Qualifier
Instead using JEE6 how about Google Guava or Reactors or Axon ones? These implementations are not limited to JEE and can be used in a plain-vanilla Spring application as well.

CDI is not coupled to JEE - it can be used in SE. It is also a widely used standard, so it would be good to support it.

Torsten Juergeleit

unread,
Aug 8, 2015, 3:09:38 PM8/8/15
to Sculptor Generator
CDI is not coupled to JEE - it can be used in SE. It is also a widely used standard, so it would be good to support it.

You're right, by using Weld or OpenWebBans as a dependency in a Java SE app we can have CDI here as well. While in JEE applications it may make perfect sense to use CDI for dependency injection personally I don't see any added value compared to existing DI framework like Spring or Guice outside JEE other than it's a "standard". Your mileage may vary :-)

/Torsten
Reply all
Reply to author
Forward
0 new messages