Questions tagged [ejb]

Enterprise JavaBeans (EJB) is a managed, server-side component architecture for modular construction of enterprise applications. The EJB specification is one of several [Java] APIs in the [Java EE] specification.

Enterprise JavaBeans (EJB) is a managed, component architecture for modular construction of enterprise applications which runs on an . The EJB specification is one of several APIs in the specification.

See also and

Tutorials

JBoss 4 EJB 3 Tutorial

JBoss 5 EJB 3 Tutorial

Video Tutorials

EJB Video Training

Reference :

Wikipedia

Oracle

6693 questions
11
votes
7 answers

How to start a background process in Java EE

I want to start a background process in a Java EE (OC4J 10) environment. It seems wrong to just start a Thread with "new Thread" But I can't find a good way for this. Using a JMS queue is difficult in my special case, since my parameters for this…
ptriller
  • 153
  • 1
  • 7
11
votes
3 answers

How do I add EJB capabilities to an Eclipse dynamic web project?

I am developing a simple application with EJB 3.0 using OpenEJB for deployment and Eclipse as an IDE. I created the project as a 'dynamic web application' in Eclipse. When I tried creating the first stateless session bean, I realized that the…
Ragini
  • 155
  • 1
  • 2
  • 7
10
votes
1 answer

Can a transaction be propagated between EJBs from different applications in Weblogic?

We're developing a system that have two main logics; One's a management logic, which is very light; and the other is a processing logic, which is very resource (RAM + CPU) consuming. We decided to have one machine to run the management logic, and…
wafwaf
  • 651
  • 12
  • 24
10
votes
3 answers

JPA ManyToMany, how can JoinTable have a property?

I have a question for designing the ManyToMany in EJB, how can a jointable has a property? Here is an example, the students and courses are ManyToMany, every student have many courses, and many students choose one course. @Entity public…
seaguest
  • 2,510
  • 5
  • 27
  • 45
10
votes
3 answers

Load spring context in an EJB based application

The following is the situation : I have a business layer, that is an EJB project. In fact, there is only one EJB that is created. This EJB is responsible to expose the service classes to other layers, that calls the EJB. I want to introduce spring…
dash27
  • 131
  • 1
  • 1
  • 6
10
votes
2 answers

Understanding managed beans/backing beans

I am learning Java EE 6 and I am trying to grasp the overall image of it. I am reading about JSF and how adding components. I am setting/reading values from the components to a bean which has the @ManagedBean annotation. I have some trouble…
LuckyLuke
  • 47,771
  • 85
  • 270
  • 434
10
votes
7 answers

Problem with JPA Project in Eclipse - error in class annotated @Entity: Table "xxx" cannot be resolved

I'm trying to create simple EJB + JPA project in Eclipse (Indigo). I created new EJB project where: Target: existing Glassfish Server Configuration: EJB Module + GlassFish Deployment Descriptor Files + Java + JPA In window JPA Facet I declare…
Adam Szecowka
  • 675
  • 3
  • 8
  • 20
10
votes
3 answers

Why do we have to manually flush() the EntityManager in a extended PersistenceContext?

In our J2EE application, we use a EJB-3 stateful bean to allow the front code to create, modify and save persistent entities (managed through JPA-2). It looks something like…
Xavier Portebois
  • 3,354
  • 6
  • 33
  • 53
10
votes
2 answers

JPA. How do I subclass existing entity and keep its ID?

Assume I have two classic non-abstract JPA classes: Person and Student. @Entity @Inheritance(strategy = InheritanceType.JOINED) public class Person { @Id @GeneratedValue(strategy = GenerationType.AUTO) private String id; //…
andbi
  • 4,426
  • 5
  • 45
  • 70
10
votes
1 answer

What is the difference between JMS consumer and Message Driven Beans (MDB)

Is there any difference between an asynchronous JMS (Java Messaging Service) consumer vs an actual MDB (Message Driven Bean). The only difference I see is the MDB class has @MessageDriven annotation which the asynchronous JMS consumer doesn't.…
Robin Bajaj
  • 2,002
  • 4
  • 29
  • 47
10
votes
4 answers

Dependency Injection EJB 3 - too many choices?

We are starting a new project based on EJB 3.0. I have a "spring" based background (and love it), so for me loose coupling and testability is a big must have. This post should not be about "ejb vs. spring". It would be perfect if you already have…
Marcel
  • 710
  • 8
  • 23
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
1 answer

Java EE6 Schedule Range

I'm required to have a schedule that runs every 5 minutes from 10 am to 5:45pm, how do I do this with the @Schedule annotation? So far, I'm limited to the @Schedule(hour=10-18;minute=*/5), but they insist I should have it until 5:45pm not 6pm.
Herupkhart
  • 499
  • 4
  • 23
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
2 answers

Managing Concurrent Access in a Singleton Session Bean

I got into a discussion with a co-worker about concurrency management in singleton session beans. From my understanding, after reading the Oracle documentation, if you leave off the @ConcurrencyManagement annotation, then it defaults to…
Evan LaHurd
  • 977
  • 2
  • 14
  • 27