ejb-3.1

Communicating between cdi session contexts — with database, will proper cdi context be invoked?

I'm having trouble getting sessionscoped beans and ejb stateful beans to communicate between user sessions, within the same java-ee container. Through trial and error I have settled on using a database to pass messages between the user sessions. But now I have a problem, how do I notify a user's...

Java EE 6 - The Persistent Domain Objects pattern - any successes?

I have a moderately complex application using POJOs, and now come to migrated it to EJB3.1 so it can be deployed online, accessed through REST services and benefit from the container environment (persistence being the most major, but transactions would be useful too). I have been away from Java EE...

Why session bean method throw EjbTransactionRolledbackException when RuntimeException was thrown

I am trying to persist the entity with constraint validation, when invoke persist - there is constraint that thrown and the caller get EjbTransactionRolledbackException ... so I try to call the validation explicit and throw ConstraintViolationException / RuntimeException and still the caller get...

injectionPoint.getBean() returns null if bean is an EJB bean in Java EE 7 (CDI 1.1)

I want to get bean from producer method in order to read its properties. In some scenarios the bean is a EJB Singleton bean. I've simplified my code to focus on the problem. My simple qualifier: @Qualifier @Retention(RUNTIME) @Target({TYPE, METHOD, FIELD, PARAMETER}) public @interface InjectMe {}...

EJB 3.1 application deployed as WAR-only: What about ejb-jar.xml?

I have a JavaEE6 application, consisting of Web stuff and EJBs and which is deployed as WAR-only (using EJB3.1). The build is based on Maven. I just read about a new possibility to order the module initialization in Java EE 6 here which i also need for my application. Also, i would like to have an...

CDI: Using Interceptors across different modules / bean archives

My Java EE 6 application consists of a war and an ejb module packaged in ear file. I'm using CDI for DI (i.e. I have a beans.xml file in both modules). I want to use a logging interceptor that is defined in the ejb module in the war module, as well. I've enabled the interceptor in the ejb's beans...

Possible to change ejb parameter at runtime for @Schedule annotation?

Probably a silly question for someone with ejb experience... I want to read and change the minute parameter dynamically for one of my EJB beans that uses the Java EE scheduler via the @Schedule annotation. Anyone know how to do this at runtime as opposed to hardcoding it in the class like below? If...