[7 Mar 2012 | No Comment | 1,809 views]

  • A singleton session bean instance’s life starts when the container invokes the newInstance method on the session bean class to create the singleton bean instance.
  • Next, the container performs any dependency injection as specified by the metadata annotations on the

Read more…

[7 Mar 2012 | No Comment | 1,991 views]
  • The EJB container is responsible for determining when to initialize a singleton session bean instance.
  • However, the Singleton Session bean can be requested to be initialized by the container upon application startup. This is called eager initialization and can be

Read more…

[7 Mar 2012 | No Comment | 2,518 views]

Business Interface

Create the bean interface and mark it either as @Remote, @Local or @WebService.

Remote Interface

Local Interface

Web service interface

Bean implementation class

Create a class which implements the business interface. Mark this class as singleton session bean Read more…

[7 Mar 2012 | No Comment | 5,519 views]

The @Singletion annotation is used to mark the class as Singleton Session Bean. This annotation’s specification is as follows.

@Target(value=TYPE) @Retention(value=RUNTIME) public @interface Singleton { String description() default “”; String name() default “”; String mappedName() default “”; }

where, Read more…

[7 Mar 2012 | No Comment | 3,572 views]
  • Available from EJB 3.1, Singleton Session Beans are business objects having a global shared state within a JVM.
  • The @Singleton annotation is used to mark the class as Singleton Session Bean.
  • They are instantiated once per application and exist

Read more…

[7 Mar 2012 | 2 Comments | 3,097 views]
  • The application container can pool instances of stateless session beans to increase performance.
  • When the client requests an operation on the bean, the container can assign an available instance from the pool reducing instance creation overhead.
  • After completion the bean

Read more…

[7 Mar 2012 | One Comment | 7,997 views]

  • A stateless session bean instance’s life starts when the container invokes the newInstance method on the session bean class to create a new session bean instance.
  • Next, the container performs any dependency injection as specified by metadata annotations on the

Read more…

[7 Mar 2012 | One Comment | 9,462 views]

The lifecycle callbacks are methods defined in the bean class but not in business interface which the container calls when specific lifecycle event or transition occurs. The following two annotations are used to define lifecycle callbacks on stateless session beans. Read more…

[7 Mar 2012 | One Comment | 1,830 views]

Business Interface

Create the bean interface and mark it either as @Remote, @Local or @WebService.

Remote Interface

Local Interface

Web service interface

Bean implementation class

Create a class which implements the business interface. Mark this class as stateless session bean Read more…

[7 Mar 2012 | No Comment | 6,090 views]

The @Stateless annotation is used to mark the class as Stateless Session Bean. This annotation’s specification is as follows.

@Target(value=TYPE) @Retention(value=RUNTIME) public @interface Stateless { String description() default “”; String name() default “”; String mappedName() default “”; }

where, Read more…