Home » ejb3

Tag Archives: ejb3

EJB Timer Service Example

1. Introduction In this example we will show how to use EJB Timer Service . The EJB timer service is a container-provided service that allows the Bean Provider to register enterprise beans for timer callbacks to occur according to a calendar-based schedule, at a specified time, or at specified intervals. 2. Create a new EJB Module Open NetBeans IDE, choose ...

Read More »

Expose EJB as a Web Service

With this example we are going to demonstrate how to expose an EJB as a web service. Enterprise beans are Java EE components that implement Enterprise JavaBeans (EJB) technology. Enterprise beans run in the EJB container, a runtime environment within the Application Server (see Container Types). Although transparent to the application developer, the EJB container provides system-level services such as ...

Read More »

Reference EJB in another EJB of different applications

This is an example of how to create a reference of an EJB in another EJB of different applications. Enterprise beans are Java EE components that implement Enterprise JavaBeans (EJB) technology. Enterprise beans run in the EJB container, a runtime environment within the Application Server (see Container Types). Although transparent to the application developer, the EJB container provides system-level services ...

Read More »

Reference EJB in another EJB of the same application

In this example we shall show you how to get a reference of an EJB in another EJB of the same application. Enterprise beans are Java EE components that implement Enterprise JavaBeans (EJB) technology. Enterprise beans run in the EJB container, a runtime environment within the Application Server (see Container Types). Although transparent to the application developer, the EJB container ...

Read More »

Bean managed Transactions

With this example we are going to demonstrate how to handle bean managed transactions using EJBs. Enterprise beans are Java EE components that implement Enterprise JavaBeans (EJB) technology. Enterprise beans run in the EJB container, a runtime environment within the Application Server (see Container Types). Although transparent to the application developer, the EJB container provides system-level services such as transactions ...

Read More »

Use Timer service example

This is an example of how to use the javax.ejb.TimerService in an EJB. The TimerService interface provides enterprise bean components with access to the container-provided Timer Service. The EJB Timer Service allows stateless session beans, singleton session beans, message-driven beans, and EJB 2.x entity beans to be registered for timer callback events at a specified time, after a specified elapsed ...

Read More »

Stateful Session Bean to persist Entity

In this example we shall show you how to use a Stateful Session Bean to persist an Entity. In a stateful session bean, the instance variables represent the state of a unique client-bean session. The state is retained for the duration of the client-bean session. If the client removes the bean or terminates, the session ends and the state disappears. ...

Read More »

Simple Stateless Session Bean example

With this example we are going to demonstrate how to create a simple Stateless Session Bean. A stateless session bean does not maintain state with the client. When a client invokes the methods of a stateless bean, the bean’s instance variables may contain a state specific to that client, but only for the duration of the invocation. When the method ...

Read More »

Stateless Session Bean to persist Entity

This is an example of how to create a Stateless Session Bean to persist an Entity. A stateless session bean does not maintain state with the client. When a client invokes the methods of a stateless bean, the bean’s instance variables may contain a state specific to that client, but only for the duration of the invocation. When the method ...

Read More »