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
12
votes
1 answer

How to expose an EJB 3.1 as a REST Web Service?

I discovered a new feature in java restful when using EJB 3.1 while reading an article at Adam Bien's blog. The thing is that Stateless and Singleton beans can be exposed as root resources. But how? I tried to do it this…
javing
  • 12,307
  • 35
  • 138
  • 211
12
votes
2 answers

@EJB annotation in clients

Using NetBeans, I do the following in the class containing main(), and it works: import javax.ejb.EJB; public class Master { @EJB TestBeanARemote x; public static void main(String[] args) { Master m = new Master(); …
Jeff Ferland
  • 17,832
  • 7
  • 46
  • 76
12
votes
2 answers

Using Spring MVC 3.0 and @EJB annotation wtihout mappedName?

I am making a new Java webapp with Spring MVC 3.0 and want to use as much standard Java EE 6 stuff as I can. (I'm on Glassfish 3.1.1.) The real driver is wanting to use an MVC web framework rather than JSF. So I'm looking for the best way to…
wrschneider
  • 17,913
  • 16
  • 96
  • 176
12
votes
6 answers

Threading in an Application Server

I have a Java program/thread that I want to deploy into an Application Server (GlassFish). The thread should run as a "service" that starts when the Application Server starts and stops when the Application Server closes. How would I go about doing…
mainstringargs
  • 13,563
  • 35
  • 109
  • 174
12
votes
1 answer

sessionscoped managed bean vs stateful ejb

If I have a @ManagedBean that's @SessionScoped, why would I use a @Stateful EJB? I used it before for shopping carts and maintaining a conversational state, but since a managed bean will be kept during the user session I can store state there, then…
arg20
  • 4,893
  • 1
  • 50
  • 74
12
votes
1 answer

EJB explanation regarding EAR vs WAR

I have just begun reading up on EJBs. Even as I venture into it I have a few questions based on what I have heard about them. Do applications using EJBs always have to be deployed as an EAR? Can applications containing EJBs be deployed just like…
Anand Sunderraman
  • 7,900
  • 31
  • 90
  • 150
12
votes
2 answers

EJB Vs WebService? Performance point of view

Well We have situation to decide now. I thought stackoverflow is best place to discuss. Background: We have 2 JVMs Enterprise Application server and one application deployed on each of them. we need to enable the business functionality invocation…
Chetan
  • 1,507
  • 7
  • 30
  • 43
12
votes
2 answers

Using the client jar in EJB 3 and design patterns

I'm new to EJB 3 and pretty confused with some doubts which Google didn't provide with a satisfactory answer. I'm trying to create a framework with some base classes and some utility methods which my other applications can use. All applications are…
jobinbasani
  • 2,075
  • 6
  • 47
  • 66
12
votes
5 answers

Call method in EJB on JBoss startup

I'm looking for an entry point in an EJB deployed on JBoss. Servlets have the load-on-startup tag to use in its web.xml. I'm searching for similar init() functionality for an EJB.
aelgn
  • 821
  • 1
  • 11
  • 17
12
votes
2 answers

javax.security.sasl.SaslException: Authentic Failed while connecting to Jboss 7 server from remote client

I have standalone Java client(Running from within eclipse ) that I wish to connect to an external server . If the server is localhost then i see no problems at all . However whenever i try to connect to the external server where I always gets the…
rockstar
  • 3,512
  • 6
  • 40
  • 63
12
votes
2 answers

What are the main differences between EJB 2.0 and EJB 3.0 in the orientation of an object

I want to try EJB and I am studying the theory behind EJB 3.0. I know that in EJB 3.0 you don't have to use deployment descriptor but you can use annotations, and also you don't have to write Home and Remote Interfaces. Are there any other key…
Avraam Mavridis
  • 8,698
  • 19
  • 79
  • 133
12
votes
2 answers

Error invoking timeout for timer - could not obtain lock within 5MINUTES at EJB 3 timerservice

I have an application running on jboss 6.1 that defines a lot of dinamyc timers at the startup (e.g doSomething every minute) based on informations already persisted on the database. The timers are created programmatically based on these…
jonfornari
  • 530
  • 1
  • 4
  • 20
12
votes
2 answers

How does the EJB client locate the EJB server without url?

I am new to Java EE. At present I am going through The Java EE 6 Tutorial, Volume 1 (Basic Concepts Beta) by Sun Microsystems. To escape from monotonous reading time to time I play with few Java EE projects/codes written by others. I came from SE.…
S A
  • 123
  • 1
  • 1
  • 4
12
votes
3 answers

Is still useful to implement EJB with RMI when you can implement Web Services (SOA/REST)?

This might sound similar to this, but it's not. I kind of understand EJB and RMI, and I have been working with web services under SOA for a while. I want to know why is useful to work using EJB exposing remote interfaces under RMI instead of…
Christian Vielma
  • 15,263
  • 12
  • 53
  • 60
11
votes
1 answer

@Singleton in Java EJB

I have an EJB that needs to be a singleton and stateful since it's going to be a sort of connection pool. My questions are: If I define an EJB with @Singleton annotation, will it then be stateful by default or do I have to define it with @Stateful…
Marthin
  • 6,413
  • 15
  • 58
  • 95