Questions tagged [ejb-3.1]

This tag is used for question related to the session bean and message-driven bean component types of the EJB 3.1 programming model.

JSR 318: Enterprise JavaBeans, Version 3.1

Enterprise JavaBeans is an architecture for the development and deployment of component-based business applications. Applications written using the Enterprise JavaBeans architecture are scalable, transactional, and multi-user secure.

The Enterprise JavaBeans 3.0 specification focused on bringing ease-of-use to the EJB API. The purpose of the Enterprise JavaBeans 3.1 specification is to further simplify the EJB architecture by reducing its complexity from the developer's point of view, while also adding new functionality in response to the needs of the community.

The focus will be on the core session bean and message-driven bean component models and their client API. Although the Java Persistence API was developed within EJB 3.0, it will evolve under a separate JSR rather than within EJB 3.1.

1103 questions
10
votes
2 answers

Are CDI event observer methods compatible with EJBs?

I have a Singleton EJB (javax.ejb.Singleton version. sigh.) which has a CDI observer method on it. When I try to deploy this to glassfish 3.1 the server fails to deploy the EAR file without any real explanation - simply saying there was an exception…
jportway
  • 917
  • 8
  • 17
10
votes
4 answers

How to get all EJB timers?

In EJB 3.1 I can get all timers for a specific bean using TimerService#getTimers() on the TimerService instance obtained for that bean. What I actually need however is a system-wide version of this. I.e. I would like to have a list of all Timers in…
rob g.
  • 163
  • 1
  • 5
10
votes
2 answers

Disable Infinispan Clustering in Wildfly 10.1

I have two Wildfly 10.1.0 Final server running on the same machine. Each has the same application deployed but for different clients. Each server is also configured to use Inifinispan 8.2.4 as a second level cache. Now, here is the situation: the…
Manuel
  • 321
  • 4
  • 13
10
votes
2 answers

Add Java EE Security Roles dynamically without using deployment descriptor

I'm developing a Java EE 6 application using Glassfish 3.1, B06. To secure my app, i'm using a JDBCRealm and programmatic security. This works fine to check username and password. But when it comes to declaring security roles, i have a problem: To…
Wolkenarchitekt
  • 20,170
  • 29
  • 111
  • 174
10
votes
6 answers

@JsonIgnore and @JsonBackReference are being Ignored

I'm working with RestEasy, Jboss 7 and EJB 3.1. I'm creating a RESTful web service that returns data in JSON format. The problem is that I have a @ManyToOne relationship on one of my entities which causes an infinite recursion during serialization.…
Ghada
  • 193
  • 1
  • 5
  • 18
10
votes
4 answers

Clean code, stateless session beans and private state

According to clean code by Robert C. Martin methods should have a small signature. The best case would be a method with no parameters at all. Instead it is recommended to use state variables. This is really useful. But what about stateless session…
M. Assassa
  • 151
  • 7
9
votes
5 answers

CDI Injection of an EJB leads to NullPointerException

I am new to Java EE 6 and CDI. I have read a couple of tutorials and the weld documentation. However something that should work from my understanding doesn't so I need help. I have the following situation. I created a Java EE 6 Application with…
Philip Markus
  • 91
  • 1
  • 3
9
votes
2 answers

Cannot run arquillian tests

I'm trying to use Arquillian for some unit tests, however I can't find why they fail when deployed using Maven. This is the class test: package com.ndeveloper.spec.test; import javax.inject.Inject; import junit.framework.Assert; import…
Pablo
  • 3,433
  • 7
  • 44
  • 62
9
votes
4 answers

Why does CMT commit on exit of EJB method, when transaction attribute is "Required"?

I am consistently finding that my already-existing transaction is getting committed inside any method of an EJB marked @ejb.transaction type="Required". Can this be correct? My expectation is, an EJB "requiring" a transaction means: if there's one…
nclark
  • 1,022
  • 1
  • 11
  • 16
9
votes
2 answers

EJB 3.1 container managed concurrency vs. synchronized

I've started reading about the singleton session bean and the annotations used to employ container managed concurrency. I don't see the benfit of this compared to simply using the 'synchronized' keyword, so I suspect there is something important I…
Are Husby
  • 2,089
  • 2
  • 16
  • 14
9
votes
1 answer

Can @Resource be used to inject primitives in EJB3.0?

Using Glassfish, I can setup a string jndi entry: JNDI name: "com/xyzcompany/echo/EchoServiceBean/viewName" Factory Class: org.glassfish.resources.custom.factory.PrimitivesAndStringFactory Properties: value="Testing123" I can then inject this…
Jonathan S. Fisher
  • 8,189
  • 6
  • 46
  • 84
9
votes
2 answers

How should be EJB Stateless Session Bean correctly injected into the web module?

Being completely new to Java EE (but not to Java itself) I'm trying to build a very simple "Enterprise Application" with Hibernate as JPA provider and JSF as the actual UI framework. For this purposes I'm using the NetBeans 7 with GlassFish…
merxbj
  • 381
  • 1
  • 2
  • 7
9
votes
1 answer

Inject Spring beans into EJB3

I'm trying to inject Spring beans into an EJB using @Interceptors(SpringBeanAutowiringInterceptor.class) but I cannot get it working with the beanRefContext.xml examples I've seen. Here's my…
ravun
  • 1,523
  • 9
  • 27
  • 45
9
votes
1 answer

Inject EJB into Eclipselink SessionCustomizer to provide Oracle schema name

In a Java EE 6 application running on GlassFish (3.1.2.2b5), suppose you have a ConfigurationService, which reads some properties files and hands out property values accordingly: @Local public interface ConfigurationService { ... } @Singleton …
zb226
  • 9,586
  • 6
  • 49
  • 79
9
votes
1 answer

Maven repository for EJB 3.1 API

What Maven repository can I use for EJB 3.1 API dependency?
Konrad Garus
  • 53,145
  • 43
  • 157
  • 230
1 2
3
73 74