EJB Flashcards

1
Q

EJB

A

Enterprise Java Beans

  • one of the several Java APIs for standard manufacture of enterprise software
  • a server-side software element that summarizes the business logic of an application
  • we need an application server (EJB container) such as Jboss, Glassfish, Weblogic, Websphere, etc. to run the EJB application.
  • If you need a component that accesses the database or is accessed from multiple clients
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

JavaBean

A

A type of java class that encapsulates many objects into a single object (the bean)

It follows certain standards:

  1. it should be Serializable (must implement Serializable)
  2. it should have a (public) no-arg constructor
  3. All properties must be private with public getter and setter methods
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

There are 3 types of EJB

A
  • Session Bean
  • Entity Bean
  • Message Drive Bean
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Session Bean

A
  • It stores data of a particular user for a single session. It gets destroyed as soon as the user session terminates.
  • It contains business logic that can be invoked by local, remote, or web service clients.
  • when a client wants to use an application distributed on a server
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Entity Bean

A
  • it represents persistent data storage. user data can be saved to the database via entity beans and later on be retrieved from the database.
  • it is deprecated and now replaced with JPA (Java Persistent API).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

SessionBean Interface

A

it defines methods that the EJB container uses to notify a session bean instance of the instance’s life cycle events

How well did you know this?
1
Not at all
2
3
4
5
Perfectly