<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://luminoussheep.net/mediawiki/index.php?action=history&amp;feed=atom&amp;title=EJB_high_level</id>
	<title>EJB high level - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://luminoussheep.net/mediawiki/index.php?action=history&amp;feed=atom&amp;title=EJB_high_level"/>
	<link rel="alternate" type="text/html" href="https://luminoussheep.net/mediawiki/index.php?title=EJB_high_level&amp;action=history"/>
	<updated>2026-04-16T20:32:46Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://luminoussheep.net/mediawiki/index.php?title=EJB_high_level&amp;diff=53&amp;oldid=prev</id>
		<title>Martin: Created page with &quot;* Separates transaction and security metadata from bean * Provides transaction management, state management, resource pooling, security  * if not using security or transaction...&quot;</title>
		<link rel="alternate" type="text/html" href="https://luminoussheep.net/mediawiki/index.php?title=EJB_high_level&amp;diff=53&amp;oldid=prev"/>
		<updated>2021-09-14T21:24:46Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;* Separates transaction and security metadata from bean * Provides transaction management, state management, resource pooling, security  * if not using security or transaction...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;* Separates transaction and security metadata from bean&lt;br /&gt;
* Provides transaction management, state management, resource pooling, security&lt;br /&gt;
&lt;br /&gt;
* if not using security or transactions question if you need EJB&lt;br /&gt;
&lt;br /&gt;
= EJB3 =&lt;br /&gt;
* No longer have to lookup home and do create. Bean created automatically when looked up.&lt;br /&gt;
* Tend to be called &amp;quot;Entity&amp;quot; in EJB 3 and &amp;quot;Entity Bean&amp;quot; in EJB 2.0&lt;br /&gt;
&lt;br /&gt;
== JPA ==&lt;br /&gt;
Defines:&lt;br /&gt;
* Creation of ORM (Object-Relational Mapping) metadata&lt;br /&gt;
* Entity Manager API - API for CRUD - persistence operations&lt;br /&gt;
* JPQL (Java persistence query language) - searching &amp;amp; retrieving&lt;br /&gt;
&lt;br /&gt;
Designed to also exist outside application server&lt;br /&gt;
&lt;br /&gt;
== Entity Manager ==&lt;br /&gt;
* Reads ORM metadata&lt;br /&gt;
* Persists data - performs CRUD operations&lt;br /&gt;
* Handles life-cycle - performance tuning - cache, transaction management&lt;br /&gt;
&lt;br /&gt;
== JPQL ==&lt;br /&gt;
Supports:&lt;br /&gt;
* inner joins&lt;br /&gt;
* outer joins&lt;br /&gt;
* bulk updates&lt;br /&gt;
* delete&lt;br /&gt;
* sub queries&lt;br /&gt;
* Does not support full sql&lt;br /&gt;
Also supports native queries - exam doesn&amp;#039;t consider this as full sql&lt;br /&gt;
&lt;br /&gt;
== Terminology ==&lt;br /&gt;
=== EJB 3 ===&lt;br /&gt;
* Remote business interface - the @remote interface&lt;br /&gt;
&lt;br /&gt;
* Supports annotations and deployment descriptors&lt;br /&gt;
** deployment descriptor overrides&lt;br /&gt;
*** So can deploy in different environments without changing code&lt;br /&gt;
&lt;br /&gt;
* No longer have to implement lifecycle callbacks&lt;br /&gt;
** can put lifecycle callbacks in a separate class&lt;br /&gt;
  public class FooListener{&lt;br /&gt;
    @PrePassivate public void doPrePassiveStuff() {&lt;br /&gt;
       ....&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  @CallbackListener FooListener&lt;br /&gt;
  @stateful&lt;br /&gt;
  public class FooBean{&lt;br /&gt;
&lt;br /&gt;
=== EJB 2 ===&lt;br /&gt;
* Remote home interface - factory for creating bean&lt;br /&gt;
* Component interface - clients view - interface of the bean&lt;br /&gt;
** remote component interface - remote proxy for accessing the bean&lt;br /&gt;
** local component interface (also known as local client)&lt;br /&gt;
* Business interface - interface implemented by the remote component interface and the bean&lt;br /&gt;
&lt;br /&gt;
= EJB 2 =&lt;br /&gt;
* Home   - javax.ejb.EJBHome - factory pattern to create instance of EJB&lt;br /&gt;
* Remove - javax.ejb.EJBObject - proxy for accessing the bean&lt;br /&gt;
* Bean  &lt;br /&gt;
*# javax.ejb.Session - information to persist&lt;br /&gt;
*## Stateless - Do not hold conversational state - no guarentee the client will call same bean&lt;br /&gt;
*## Stateful  - Can hold state - will be the same bean across client calls e.g. shopping basket&lt;br /&gt;
*##* also use to for workflow&lt;br /&gt;
*# javax.ejb.Entity  - the implementation containing business logic&lt;/div&gt;</summary>
		<author><name>Martin</name></author>
	</entry>
</feed>