SlideShare une entreprise Scribd logo
1  sur  64
Télécharger pour lire hors ligne
1 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
EJB: Simple, Light & Powerful backbone of 
Java EE 
Jagadish Ramu 
2 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
3 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 
San Francisco 
September 30–October 4, 2012
The following is intended to outline our general product 
direction. It is intended for information purposes only, 
and may not be incorporated into any contract. 
It is not a commitment to deliver any material, code, or 
functionality, and should not be relied upon in making 
purchasing decisions. The development, release, and 
timing of any features or functionality described for 
Oracle’s products remains at the sole discretion of Oracle. 
4 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Program Agenda 
• EJB – Evolution 
• EJB 3.0 
• EJB 3.1 – Features 
• EJB 3.2 – In progress 
• Q & A 
5 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
EJB 1.0 – EJB 2.1 
Very powerful, but too complex 
Services designed for container, not application 
Got the job done, but at the cost of complexity 
Heavyweight programming model 
Lots of classes and interfaces needed to be supplied 
– Lots of boilerplate code 
Complex XML deployment descriptor required 
6 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
EJB 3.0 
Major changes: Ease of Development 
Reduced number of classes developer needs to produce 
“POJO” classes and interfaces 
– No need to implement the javax.ejb.* interfaces 
– Optional home and component interfaces 
Leverage Java language metadata annotations 
– Injection instead of lookup 
Optional XML descriptor 
7 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
EJB 3.0 
Major changes: Ease of Development (Cont) 
Configuration by exception 
– Use defaults for common cases 
Interceptors 
Simplification of entity bean persistence 
– Lightweight “POJO” entities, not components 
– Support for inheritance 
– Standard O/R mapping 
8 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
EJB 3.1 
Ease of Use Improvements 
• Optional Local Business Interfaces 
• Simplified Packaging 
• Portable JNDI Names 
9 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Session Bean - Local Business Interface 
10 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Session Bean with “No-interface” View 
@Stateless 
public class HelloBean { 
public String sayHello(String msg) { 
return “Hello “ + msg; 
} 
} 
@EJB 
HelloBean h; 
... 
h.sayHello(“bob”); 
11 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
EJB 3.1 
Ease of Use Improvements 
• Optional Local Business Interfaces 
• Simplified Packaging 
• Portable JNDI Names 
12 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
JavaTM EE Platform 5 Packaging 
foo.ear 
foo_web.war 
WEB-INF/web.xml 
WEB-INF/classes/ 
com/acme/FooServlet.class 
WEB-INF/classes 
com/acme/Foo.class 
foo_ejb.jar 
com/acme/FooBean.class 
com/acme/Foo.class 
13 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 
foo.ear 
lib/foo_common.jar 
com/acme/Foo.class 
foo_web.war 
WEB-INF/web.xml 
WEB-INF/classes/ 
com/acme/FooServlet.class 
foo_ejb.jar 
com/acme/FooBean.class 
OR
EJB 3.1 Simplified Packaging 
14 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 
foo.war 
WEB-INF/classes/com/acme/ 
FooServlet.class 
FooBean.class
EJB 3.1 
Ease of Use Improvements 
• Optional Local Business Interfaces 
• Simplified Packaging 
• Portable JNDI Names 
15 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
EJB 3.1 
Portable Global JNDI Name Syntax 
Only within EAR 
Base name of EAR 
(or application.xml) 
java:global[/<app­name>]/< 
module­name>/< 
bean­name> 
[!<fully­qualified­interface­name>] 
16 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 
Base name of ejb-jar/WAR 
(or ejb-jar.xml/web.xml) 
Unqualified name of the bean class 
Annotation/name attribute 
Or ejb-jar.xml 
• Derived from metadata (annotations/ DD) 
• Until now, only java:comp 
• Local & Remote business 
• No-interface 
• Also in java:app, java:module
Portable JNDI Name: Sample 
package com.acme; 
@Stateless 
public class HelloBean 
java:global/hello/HelloBean 
java:global/hello/HelloBean!com.acme.Hello 
java:app/hello/HelloBean 
java:app/hello/HelloBean!com.acme.Hello 
java:module/HelloBean 
java:module/HelloBean!com.acme.Hello 
17 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 
implements Hello 
If deployed as hello.jar, JNDI entries are:
Session Bean lookup 
// session bean lookup from a Module 
InitialContext ic = new InitialContext(); 
HelloBean hello = (HelloBean) 
ic.lookup(“java:module/HelloBean”); 
hello.sayHello(“bob”); 
// Global session bean lookup 
InitialContext ic = new InitialContext(); 
Hello hello = (Hello) 
ic.lookup(“java:global/hello/HelloBean”); 
hello.sayHello(“bob”); 
18 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
New Features 
• Singletons 
• Startup / Shutdown callbacks 
• Asynchronous session bean invocations 
• Calendar-based timers / Automatic timer creation 
• EJB 3.1 Lite 
• Embeddable API 
19 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Singletons 
• New session bean component type 
• Provides easy sharing of state within application 
• Designed for concurrent access 
• One bean instance per bean type per VM 
• Lots in common with stateless / stateful EJBs 
• Provides Local, Remote, Web Service client view 
• Supports CMT/BMT 
• Same container services are available 
­resource 
managers, timer service, method authorization, etc. 
20 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Simple Singleton 
@Singleton 
public class SharedBean { 
private SharedData data = new SharedData(); 
public int getIntData() { 
return data.getIntValue(); 
} 
public void setIntValue(int value) { 
data.setIntValue(value); 
} 
} 
21 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Container Managed Concurrency 
@Singleton 
@Lock(READ) 
public class SharedBean { 
private SharedData data = newSharedData(); 
public int getIntValue() { 
return data.getIntValue(); 
} 
@Lock(WRITE) 
@AccessTimeout(value=1, unit=SECONDS) 
public void updateIntValue(int v) { 
data.update(v); 
} 
} 
22 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Bean Managed Concurrency 
@Singleton 
@ConcurrencyManagement(BEAN) 
public class SharedBean { 
private SharedData data = new SharedData(); 
public synchronized int getData() { 
return data.getXYZ(); 
} 
public void update(...) { 
... 
synchronized (this) { 
data.setXYZ(...); 
} 
} 
23 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
New Features 
• Singletons 
• Startup / Shutdown callbacks 
• Asynchronous session bean invocations 
• Calendar-based timers / Automatic timer creation 
• EJB 3.1 Lite 
• Embeddable API 
24 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Startup / Shutdown Callbacks 
@Singleton 
@Startup 
@DependsOn(“InitializationBean”) 
public class StartupBean { 
@PostConstruct 
private void onStartup() { 
// Create a new EJB Timer 
} 
@PreDestroy 
private void onShutdown() { ... } 
} 
25 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
New Features 
• Singletons 
• Startup / Shutdown callbacks 
• Asynchronous session bean invocations 
• Calendar-based timers / Automatic timer creation 
• EJB 3.1 Lite 
• Embeddable API 
26 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Asynchronous Session Bean Invocations 
• Async processing in JavaEE 5 apps 
­JavaEE 
apps resorted to JMS / MDBs 
­Must 
know JMS APIs and setup JMS Queue etc. 
• EJB 3.1 makes it very easy 
­Annotate 
your method with @Asynchronous 
­Control 
returns to the client before actual method invocation 
­Persistent 
27 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 
delivery guarantees are not required by spec
Async Computation Example 
@Stateless 
@Asynchronous 
public class SimpleAsyncEJB { 
public Future<Integer> addNumbers(int n1, int n2) { 
Integer result; 
result = n1 + n2; 
try { 
// simulate JPA queries + reading file system 
Thread.currentThread().sleep(2000); 
} catch (InterruptedException ex) { 
ex.printStackTrace(); 
} 
return new AsyncResult(result); 
} 
} 
28 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Asynchronous method results 
• If you need to retrieve the results asynchronusly 
­Return 
type java.util.concurrent.Future 
• Result value is returned via Future.get() 
­Also 
supports Future.get(long, TimeUnit) 
­Can 
use Future.isDone() 
• Client exception wrapped by ExecutionException 
­getCause() 
29 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 
returns same exception as would have been thrown by a synchronous 
invocation
New Features 
• Singletons 
• Startup / Shutdown callbacks 
• Asynchronous session bean invocations 
• Calendar-based timers / Automatic timer creation 
• EJB “Lite” 
• Embeddable API 
30 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Timer Service Features 
• Calendar-based timeouts 
• Automatic timer creation 
• Non-persistent Timers 
31 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
EJB 3.1 - Timers 
• Calendar-based Timers – cron like semantics 
• Every Mon & Wed midnight @Schedule(dayOfWeek=”Mon,Wed”) 
• 2pm on Last Thur of Nov of every year 
(hour=”14”, dayOfMonth=”Last Thu”, month=”Nov”) 
• Every 5 minutes of every hour 
(minute=”*/5”, hour=”*”) 
• Every 10 seconds starting at 30 
(second=”30/10”) 
• Every 14th minute within the hour, for the hours 1 and 2 am 
(minute=”*/14”, hour=”1,2”) 
32 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Calendar Based Expressions 
• Numeric attributes 
­second, 
33 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 
minute 
․Allowable values : [0,59] 
․Default : “0” 
­hour 
․Allowable values : [0,23] 
․Default : “0” 
­year 
․Allowable values : four-digit value 
․Default : “*”
Calendar Based Expressions 
• Other attributes 
­dayOfWeek 
․Allowable values : 
[0,7] or {“Sun”, ..., “Sat”} 
․Default : “*” 
­month 
․Allowable values : 
[1,12] or {“Jan”, ..., “Dec”} 
․Default : “*” 
34 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Calendar Based Expressions 
• Other attributes 
­dayOfMonth 
․Allowable values : 
[1,31] or [-7, -1] or “Last” 
or {“1st”, “2nd”, “3rd”, “4th”, “5th”, 
“Last”} {“Sun”, “Mon”, “Tue”, “Wed”, “Thu”, 
“Fri”, “Sat”} 
․Default : “*” 
35 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Attribute Syntax 
• Single value : minute = “30” 
• List : month = “Jan, Jul, Dec” 
• Range : dayOfWeek = “Mon-Fri” or 
dayOfMonth = “27-3” 
• Wild card : hour = “*” 
• Increment : minute = “*/10” 
• Range/List Combination : minute = “1-10, 20-30” 
36 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Non-persistent Timers 
@Singleton 
public class CacheBean { 
private Cache cache; 
@Schedule(minute=”*/5”, hour=”*”, 
37 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 
persistent=false) 
@Lock(WRITE) 
private void refresh() { ... } 
@Lock(READ) 
public String getXYZ() { ... } 
}
New Features 
• Singletons 
• Startup / Shutdown callbacks 
• Asynchronous session bean invocations 
• Calendar-based timers / Automatic timer creation 
• EJB “Lite” 
• Embeddable API 
38 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
EJB 3.1 “Lite” API 
• Small subset of EJB 3.1 API required by Java EE 
Platform 6 Web Profile 
• Broadens the availability of EJB technology 
­Without 
losing portability 
• Any 3.1 Lite application can be deployed to Web Profile 
and Full Java EE 6 Platform 
­Made 
possible by simplified .war packaging 
39 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
EJB Lite – Feature comparison 
40 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
New Features 
• Singletons 
• Startup / Shutdown callbacks 
• Asynchronous session bean invocations 
• Calendar-based timers / Automatic timer creation 
• EJB “Lite” 
• Embeddable API 
41 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Example: Local Stateless Session Bean 
@Stateless 
@Local(Bank.class) 
public class BankBean implements Bank { 
@PersistenceContext 
EntityManager accountDB; 
public double deposit(double amount) { 
... 
} 
public double withdraw(double amount) { 
... 
} 
42 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Example: Test Client Execution 
% java -classpath bankClient.jar : 
43 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 
bank.jar : 
javaee.jar : 
<vendor_rt>.jar 
com.acme.BankTester
Example: Embeddable API 
public class BankTester { 
public static void main(String[] args) { 
EJBContainer container = 
EJBContainer.createEJBContainer(); 
// Acquire Local EJB reference 
Bank bank = (Bank) container.getContext(). 
lookup(“java:global/bank/BankBean”); 
double balance = bank.deposit(100.00); 
... 
container.close(); 
} 
44 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Embeddable API 
• Portable API for running EJB components in same process 
as client code 
• Same component behavior / life cycle as server-side 
­CMT/ 
BMT, injection, threading guarantees, etc. 
• “Single Application” model 
• Only required to support 3.1 “Lite” API 
­Vendors 
can optionally support additional functionality 
45 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Discussions in EJB 3.2 Expert Group 
What are we discussing? 
Cleanup 
Optional features (pruning) 
New features 
Separating components and services 
Further pruning 
46 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Optional Features 
What we are discussing 
EJB 3.2 Optional Chapters 
Separate document 
Approved by Java EE Platform EG 
EJB Containers will not be required to support: 
– CMP 
– BMP 
– JAX-RPC 
47 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
New SFSB 
What we are discussing 
Support for transactions in life-cycle callbacks 
PostConstruct/PreDestroy 
PrePassivate/PostActivate 
48 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
EJB 3.2 Lite Requirements 
What we are discussing 
Non-persistent timers 
Asynchronous invocations 
49 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
New in Asynchronous Invocations 
What we are discussing 
Client code be able to decide if to call a business method 
asynchronously? 
– Look up special context? 
– Helper classes? 
Do we need AsyncListener to be notified of outcome? 
50 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
New in MDBs 
What we are discussing 
How to simplify MDB? 
Some requirements from JMS 2.0 Expert Group 
– Synchronizing XML with annotations 
– Support for simplified API 
51 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
MDB 
Current usage 
@MessageDriven(mappedName="jms/ejb_mdb_Queue”) 
public class SimpleMDB implements MessageListener { 
public void onMessage(Message message) { 
… 
} 
} 
52 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
MDB – What if? 
One of many options 
@MessageDriven 
public class SimpleMDB { 
@TBDAnnotation(tbdAttr="jms/ejb_mdb_Queue”) 
public void processMessages(Message message) { 
… 
} 
} 
53 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
New in Configuration 
What we are discussing 
QoS annotations or attributes 
– @MaxConcurrency ? 
• Number of concurrent Async methods that could be served 
– @PoolSize ? 
• Bean pool size 
54 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Common Enterprise Services 
What we are discussing 
Services available for all (most?) Managed Beans 
By default available for EJBs 
Can be opt-in in other Managed Beans 
55 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Transactions as Common Enterprise Services 
What we are discussing 
Support for Container-Managed Transactions (CMT) in 
Managed Beans 
Subset of transaction attributes(?) 
– REQUIRED, REQUIRES_NEW, NOT_SUPPORTED 
– MANDATORY, NEVER 
– SUPPORTS 
BMT are already supported (UserTransaction) 
56 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Other Common Enterprise Services 
What we are discussing 
Asynchronous invocations 
– Are they useful to be standardized for all Managed Beans? 
– How to reconcile differences 
Timer Service? 
– ScheduleExpression 
– @Schedule 
@Lock? 
57 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Proposing Optional? 
What we are discussing 
2.x Home and component interfaces? 
– EJBHome/EJBLocalHome/EJBObject/EJBLocalOb ject 
CORBA interoperability? 
Can become optional in Java EE 8 
58 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
59 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
EJB 3.2 
Get Involved… 
Find info: http://java.net/projects/ejb-spec 
– Subscribe, listen and discuss: 
users@ejb-spec.java.net 
– Browse email archives: 
http://java.net/projects/ejb-spec/lists/jsr345-experts/archive 
– Read current version of the spec: 
http://java.net/projects/ejb-spec/downloads 
– File issues or feature requests: 
http://java.net/jira/browse/EJB_SPEC 
60 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
61 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 
Q&A
62 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
EJB: Simple, Light & Powerful backbone of 
Java EE 
Classic Duke Future Tech Duke 
63 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
64 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Contenu connexe

Tendances

Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and Ryan Cuprak
 
Workshop Framework(J2EE/OSGi/RCP)
Workshop Framework(J2EE/OSGi/RCP)Workshop Framework(J2EE/OSGi/RCP)
Workshop Framework(J2EE/OSGi/RCP)Summer Lu
 
Faster java ee builds with gradle [con4921]
Faster java ee builds with gradle [con4921]Faster java ee builds with gradle [con4921]
Faster java ee builds with gradle [con4921]Ryan Cuprak
 
Micronaut: Evolving Java for the Microservices and Serverless Era
Micronaut: Evolving Java for the Microservices and Serverless EraMicronaut: Evolving Java for the Microservices and Serverless Era
Micronaut: Evolving Java for the Microservices and Serverless Eragraemerocher
 
Spring framework
Spring frameworkSpring framework
Spring frameworkAircon Chen
 
Spring Framework - Core
Spring Framework - CoreSpring Framework - Core
Spring Framework - CoreDzmitry Naskou
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework Serhat Can
 
Micronaut Deep Dive - Devoxx Belgium 2019
Micronaut Deep Dive - Devoxx Belgium 2019Micronaut Deep Dive - Devoxx Belgium 2019
Micronaut Deep Dive - Devoxx Belgium 2019graemerocher
 
Camel oneactivemq posta-final
Camel oneactivemq posta-finalCamel oneactivemq posta-final
Camel oneactivemq posta-finalChristian Posta
 
2015 JavaOne EJB/CDI Alignment
2015 JavaOne EJB/CDI Alignment2015 JavaOne EJB/CDI Alignment
2015 JavaOne EJB/CDI AlignmentDavid Blevins
 
OpenNTF Domino API (ODA): Super-Charging Domino Development
OpenNTF Domino API (ODA): Super-Charging Domino DevelopmentOpenNTF Domino API (ODA): Super-Charging Domino Development
OpenNTF Domino API (ODA): Super-Charging Domino DevelopmentPaul Withers
 
Introduction to Micronaut - JBCNConf 2019
Introduction to Micronaut - JBCNConf 2019Introduction to Micronaut - JBCNConf 2019
Introduction to Micronaut - JBCNConf 2019graemerocher
 
Engage 2015 - 10 Mistakes You and Every XPages Developer Make. Yes, I said YOU!
Engage 2015 - 10 Mistakes You and Every XPages Developer Make. Yes, I said YOU!Engage 2015 - 10 Mistakes You and Every XPages Developer Make. Yes, I said YOU!
Engage 2015 - 10 Mistakes You and Every XPages Developer Make. Yes, I said YOU!Serdar Basegmez
 
JavaOne 2011: Migrating Spring Applications to Java EE 6
JavaOne 2011: Migrating Spring Applications to Java EE 6JavaOne 2011: Migrating Spring Applications to Java EE 6
JavaOne 2011: Migrating Spring Applications to Java EE 6Bert Ertman
 
Spring introduction
Spring introductionSpring introduction
Spring introductionManav Prasad
 
Spring Framework 4.0 to 4.1
Spring Framework 4.0 to 4.1Spring Framework 4.0 to 4.1
Spring Framework 4.0 to 4.1Sam Brannen
 
Java spring framework
Java spring frameworkJava spring framework
Java spring frameworkRajiv Gupta
 
Solving Enterprise Integration with Apache Camel
Solving Enterprise Integration with Apache CamelSolving Enterprise Integration with Apache Camel
Solving Enterprise Integration with Apache CamelChristian Posta
 
Java EE and Google App Engine
Java EE and Google App EngineJava EE and Google App Engine
Java EE and Google App EngineArun Gupta
 

Tendances (20)

Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and
 
Workshop Framework(J2EE/OSGi/RCP)
Workshop Framework(J2EE/OSGi/RCP)Workshop Framework(J2EE/OSGi/RCP)
Workshop Framework(J2EE/OSGi/RCP)
 
Faster java ee builds with gradle [con4921]
Faster java ee builds with gradle [con4921]Faster java ee builds with gradle [con4921]
Faster java ee builds with gradle [con4921]
 
Micronaut: Evolving Java for the Microservices and Serverless Era
Micronaut: Evolving Java for the Microservices and Serverless EraMicronaut: Evolving Java for the Microservices and Serverless Era
Micronaut: Evolving Java for the Microservices and Serverless Era
 
Spring framework
Spring frameworkSpring framework
Spring framework
 
Spring Framework - Core
Spring Framework - CoreSpring Framework - Core
Spring Framework - Core
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
Micronaut Deep Dive - Devoxx Belgium 2019
Micronaut Deep Dive - Devoxx Belgium 2019Micronaut Deep Dive - Devoxx Belgium 2019
Micronaut Deep Dive - Devoxx Belgium 2019
 
Camel oneactivemq posta-final
Camel oneactivemq posta-finalCamel oneactivemq posta-final
Camel oneactivemq posta-final
 
2015 JavaOne EJB/CDI Alignment
2015 JavaOne EJB/CDI Alignment2015 JavaOne EJB/CDI Alignment
2015 JavaOne EJB/CDI Alignment
 
OpenNTF Domino API (ODA): Super-Charging Domino Development
OpenNTF Domino API (ODA): Super-Charging Domino DevelopmentOpenNTF Domino API (ODA): Super-Charging Domino Development
OpenNTF Domino API (ODA): Super-Charging Domino Development
 
Introduction to Micronaut - JBCNConf 2019
Introduction to Micronaut - JBCNConf 2019Introduction to Micronaut - JBCNConf 2019
Introduction to Micronaut - JBCNConf 2019
 
Engage 2015 - 10 Mistakes You and Every XPages Developer Make. Yes, I said YOU!
Engage 2015 - 10 Mistakes You and Every XPages Developer Make. Yes, I said YOU!Engage 2015 - 10 Mistakes You and Every XPages Developer Make. Yes, I said YOU!
Engage 2015 - 10 Mistakes You and Every XPages Developer Make. Yes, I said YOU!
 
JavaOne 2011: Migrating Spring Applications to Java EE 6
JavaOne 2011: Migrating Spring Applications to Java EE 6JavaOne 2011: Migrating Spring Applications to Java EE 6
JavaOne 2011: Migrating Spring Applications to Java EE 6
 
Spring introduction
Spring introductionSpring introduction
Spring introduction
 
Spring Framework 4.0 to 4.1
Spring Framework 4.0 to 4.1Spring Framework 4.0 to 4.1
Spring Framework 4.0 to 4.1
 
Java spring framework
Java spring frameworkJava spring framework
Java spring framework
 
Spring Framework Rohit
Spring Framework RohitSpring Framework Rohit
Spring Framework Rohit
 
Solving Enterprise Integration with Apache Camel
Solving Enterprise Integration with Apache CamelSolving Enterprise Integration with Apache Camel
Solving Enterprise Integration with Apache Camel
 
Java EE and Google App Engine
Java EE and Google App EngineJava EE and Google App Engine
Java EE and Google App Engine
 

Similaire à EJB 3.2 - Java EE 7 - Java One Hyderabad 2012

55 New Features in Java SE 8
55 New Features in Java SE 855 New Features in Java SE 8
55 New Features in Java SE 8Simon Ritter
 
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesJavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesMert Çalışkan
 
GlassFish in Production Environments
GlassFish in Production EnvironmentsGlassFish in Production Environments
GlassFish in Production EnvironmentsBruno Borges
 
Oracle ADF Architecture TV - Development - Programming Best Practices
Oracle ADF Architecture TV - Development - Programming Best PracticesOracle ADF Architecture TV - Development - Programming Best Practices
Oracle ADF Architecture TV - Development - Programming Best PracticesChris Muir
 
10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
10 Tips for Java EE 7 with PrimeFaces - JavaOne 201310 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013Martin Fousek
 
Ebs performance tuning session feb 13 2013---Presented by Oracle
Ebs performance tuning session  feb 13 2013---Presented by OracleEbs performance tuning session  feb 13 2013---Presented by Oracle
Ebs performance tuning session feb 13 2013---Presented by OracleAkash Pramanik
 
Ugf9796 weblogic for ebs and obiee
Ugf9796 weblogic for ebs and obieeUgf9796 weblogic for ebs and obiee
Ugf9796 weblogic for ebs and obieeBerry Clemens
 
Node.js and Oracle Database: New Development Techniques
Node.js and Oracle Database: New Development TechniquesNode.js and Oracle Database: New Development Techniques
Node.js and Oracle Database: New Development TechniquesChristopher Jones
 
Serverless Java - Challenges and Triumphs
Serverless Java - Challenges and TriumphsServerless Java - Challenges and Triumphs
Serverless Java - Challenges and TriumphsDavid Delabassee
 
Batch Applications for the Java Platform
Batch Applications for the Java PlatformBatch Applications for the Java Platform
Batch Applications for the Java PlatformSivakumar Thyagarajan
 
Presentation oracle exalogic elastic cloud
Presentation   oracle exalogic elastic cloudPresentation   oracle exalogic elastic cloud
Presentation oracle exalogic elastic cloudsolarisyougood
 
Java is Container Ready - Vaibhav - Container Conference 2018
Java is Container Ready - Vaibhav - Container Conference 2018Java is Container Ready - Vaibhav - Container Conference 2018
Java is Container Ready - Vaibhav - Container Conference 2018CodeOps Technologies LLP
 
OTN Developer Days - Java EE 6
OTN Developer Days - Java EE 6OTN Developer Days - Java EE 6
OTN Developer Days - Java EE 6glassfish
 
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"GlobalLogic Ukraine
 

Similaire à EJB 3.2 - Java EE 7 - Java One Hyderabad 2012 (20)

55 New Features in Java SE 8
55 New Features in Java SE 855 New Features in Java SE 8
55 New Features in Java SE 8
 
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesJavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
 
GlassFish in Production Environments
GlassFish in Production EnvironmentsGlassFish in Production Environments
GlassFish in Production Environments
 
Java ee7 1hour
Java ee7 1hourJava ee7 1hour
Java ee7 1hour
 
Oracle ADF Architecture TV - Development - Programming Best Practices
Oracle ADF Architecture TV - Development - Programming Best PracticesOracle ADF Architecture TV - Development - Programming Best Practices
Oracle ADF Architecture TV - Development - Programming Best Practices
 
Java Cloud and Container Ready
Java Cloud and Container ReadyJava Cloud and Container Ready
Java Cloud and Container Ready
 
10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
10 Tips for Java EE 7 with PrimeFaces - JavaOne 201310 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
 
Ebs performance tuning session feb 13 2013---Presented by Oracle
Ebs performance tuning session  feb 13 2013---Presented by OracleEbs performance tuning session  feb 13 2013---Presented by Oracle
Ebs performance tuning session feb 13 2013---Presented by Oracle
 
Java Spring
Java SpringJava Spring
Java Spring
 
Ugf9796 weblogic for ebs and obiee
Ugf9796 weblogic for ebs and obieeUgf9796 weblogic for ebs and obiee
Ugf9796 weblogic for ebs and obiee
 
JDK 10 Java Module System
JDK 10 Java Module SystemJDK 10 Java Module System
JDK 10 Java Module System
 
Node.js and Oracle Database: New Development Techniques
Node.js and Oracle Database: New Development TechniquesNode.js and Oracle Database: New Development Techniques
Node.js and Oracle Database: New Development Techniques
 
Serverless Java - Challenges and Triumphs
Serverless Java - Challenges and TriumphsServerless Java - Challenges and Triumphs
Serverless Java - Challenges and Triumphs
 
Batch Applications for the Java Platform
Batch Applications for the Java PlatformBatch Applications for the Java Platform
Batch Applications for the Java Platform
 
Presentation oracle exalogic elastic cloud
Presentation   oracle exalogic elastic cloudPresentation   oracle exalogic elastic cloud
Presentation oracle exalogic elastic cloud
 
Java is Container Ready - Vaibhav - Container Conference 2018
Java is Container Ready - Vaibhav - Container Conference 2018Java is Container Ready - Vaibhav - Container Conference 2018
Java is Container Ready - Vaibhav - Container Conference 2018
 
OTN Developer Days - Java EE 6
OTN Developer Days - Java EE 6OTN Developer Days - Java EE 6
OTN Developer Days - Java EE 6
 
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"
 
Java 101
Java 101Java 101
Java 101
 
DesktopApps.pptx
DesktopApps.pptxDesktopApps.pptx
DesktopApps.pptx
 

Plus de Jagadish Prasath

Java EE 7 in practise - OTN Hyderabad 2014
Java EE 7 in practise - OTN Hyderabad 2014Java EE 7 in practise - OTN Hyderabad 2014
Java EE 7 in practise - OTN Hyderabad 2014Jagadish Prasath
 
JAX RS 2.0 - OTN Bangalore 2013
JAX RS 2.0 - OTN Bangalore 2013JAX RS 2.0 - OTN Bangalore 2013
JAX RS 2.0 - OTN Bangalore 2013Jagadish Prasath
 
What's new in JMS 2.0 - OTN Bangalore 2013
What's new in JMS 2.0 - OTN Bangalore 2013What's new in JMS 2.0 - OTN Bangalore 2013
What's new in JMS 2.0 - OTN Bangalore 2013Jagadish Prasath
 
Experiences in building a PaaS Platform - Java One SFO 2012
Experiences in building a PaaS Platform - Java One SFO 2012Experiences in building a PaaS Platform - Java One SFO 2012
Experiences in building a PaaS Platform - Java One SFO 2012Jagadish Prasath
 
PaaS enabling Java EE applications through service meta-data and policies - J...
PaaS enabling Java EE applications through service meta-data and policies - J...PaaS enabling Java EE applications through service meta-data and policies - J...
PaaS enabling Java EE applications through service meta-data and policies - J...Jagadish Prasath
 
PaaSing a Java EE Application
PaaSing a Java EE ApplicationPaaSing a Java EE Application
PaaSing a Java EE ApplicationJagadish Prasath
 
Java EE 6 - Deep Dive - Indic Threads, Pune - 2010
Java EE 6 - Deep Dive - Indic Threads, Pune - 2010Java EE 6 - Deep Dive - Indic Threads, Pune - 2010
Java EE 6 - Deep Dive - Indic Threads, Pune - 2010Jagadish Prasath
 
Connector Architecture 1.6 - Tech-days 2010, Hyderabad.
Connector Architecture 1.6 - Tech-days 2010, Hyderabad.Connector Architecture 1.6 - Tech-days 2010, Hyderabad.
Connector Architecture 1.6 - Tech-days 2010, Hyderabad.Jagadish Prasath
 

Plus de Jagadish Prasath (8)

Java EE 7 in practise - OTN Hyderabad 2014
Java EE 7 in practise - OTN Hyderabad 2014Java EE 7 in practise - OTN Hyderabad 2014
Java EE 7 in practise - OTN Hyderabad 2014
 
JAX RS 2.0 - OTN Bangalore 2013
JAX RS 2.0 - OTN Bangalore 2013JAX RS 2.0 - OTN Bangalore 2013
JAX RS 2.0 - OTN Bangalore 2013
 
What's new in JMS 2.0 - OTN Bangalore 2013
What's new in JMS 2.0 - OTN Bangalore 2013What's new in JMS 2.0 - OTN Bangalore 2013
What's new in JMS 2.0 - OTN Bangalore 2013
 
Experiences in building a PaaS Platform - Java One SFO 2012
Experiences in building a PaaS Platform - Java One SFO 2012Experiences in building a PaaS Platform - Java One SFO 2012
Experiences in building a PaaS Platform - Java One SFO 2012
 
PaaS enabling Java EE applications through service meta-data and policies - J...
PaaS enabling Java EE applications through service meta-data and policies - J...PaaS enabling Java EE applications through service meta-data and policies - J...
PaaS enabling Java EE applications through service meta-data and policies - J...
 
PaaSing a Java EE Application
PaaSing a Java EE ApplicationPaaSing a Java EE Application
PaaSing a Java EE Application
 
Java EE 6 - Deep Dive - Indic Threads, Pune - 2010
Java EE 6 - Deep Dive - Indic Threads, Pune - 2010Java EE 6 - Deep Dive - Indic Threads, Pune - 2010
Java EE 6 - Deep Dive - Indic Threads, Pune - 2010
 
Connector Architecture 1.6 - Tech-days 2010, Hyderabad.
Connector Architecture 1.6 - Tech-days 2010, Hyderabad.Connector Architecture 1.6 - Tech-days 2010, Hyderabad.
Connector Architecture 1.6 - Tech-days 2010, Hyderabad.
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 

Dernier (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

EJB 3.2 - Java EE 7 - Java One Hyderabad 2012

  • 1. 1 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 2. EJB: Simple, Light & Powerful backbone of Java EE Jagadish Ramu 2 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 3. 3 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. San Francisco September 30–October 4, 2012
  • 4. The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 4 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 5. Program Agenda • EJB – Evolution • EJB 3.0 • EJB 3.1 – Features • EJB 3.2 – In progress • Q & A 5 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 6. EJB 1.0 – EJB 2.1 Very powerful, but too complex Services designed for container, not application Got the job done, but at the cost of complexity Heavyweight programming model Lots of classes and interfaces needed to be supplied – Lots of boilerplate code Complex XML deployment descriptor required 6 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 7. EJB 3.0 Major changes: Ease of Development Reduced number of classes developer needs to produce “POJO” classes and interfaces – No need to implement the javax.ejb.* interfaces – Optional home and component interfaces Leverage Java language metadata annotations – Injection instead of lookup Optional XML descriptor 7 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 8. EJB 3.0 Major changes: Ease of Development (Cont) Configuration by exception – Use defaults for common cases Interceptors Simplification of entity bean persistence – Lightweight “POJO” entities, not components – Support for inheritance – Standard O/R mapping 8 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 9. EJB 3.1 Ease of Use Improvements • Optional Local Business Interfaces • Simplified Packaging • Portable JNDI Names 9 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 10. Session Bean - Local Business Interface 10 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 11. Session Bean with “No-interface” View @Stateless public class HelloBean { public String sayHello(String msg) { return “Hello “ + msg; } } @EJB HelloBean h; ... h.sayHello(“bob”); 11 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 12. EJB 3.1 Ease of Use Improvements • Optional Local Business Interfaces • Simplified Packaging • Portable JNDI Names 12 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 13. JavaTM EE Platform 5 Packaging foo.ear foo_web.war WEB-INF/web.xml WEB-INF/classes/ com/acme/FooServlet.class WEB-INF/classes com/acme/Foo.class foo_ejb.jar com/acme/FooBean.class com/acme/Foo.class 13 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. foo.ear lib/foo_common.jar com/acme/Foo.class foo_web.war WEB-INF/web.xml WEB-INF/classes/ com/acme/FooServlet.class foo_ejb.jar com/acme/FooBean.class OR
  • 14. EJB 3.1 Simplified Packaging 14 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. foo.war WEB-INF/classes/com/acme/ FooServlet.class FooBean.class
  • 15. EJB 3.1 Ease of Use Improvements • Optional Local Business Interfaces • Simplified Packaging • Portable JNDI Names 15 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 16. EJB 3.1 Portable Global JNDI Name Syntax Only within EAR Base name of EAR (or application.xml) java:global[/<app­name>]/< module­name>/< bean­name> [!<fully­qualified­interface­name>] 16 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Base name of ejb-jar/WAR (or ejb-jar.xml/web.xml) Unqualified name of the bean class Annotation/name attribute Or ejb-jar.xml • Derived from metadata (annotations/ DD) • Until now, only java:comp • Local & Remote business • No-interface • Also in java:app, java:module
  • 17. Portable JNDI Name: Sample package com.acme; @Stateless public class HelloBean java:global/hello/HelloBean java:global/hello/HelloBean!com.acme.Hello java:app/hello/HelloBean java:app/hello/HelloBean!com.acme.Hello java:module/HelloBean java:module/HelloBean!com.acme.Hello 17 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. implements Hello If deployed as hello.jar, JNDI entries are:
  • 18. Session Bean lookup // session bean lookup from a Module InitialContext ic = new InitialContext(); HelloBean hello = (HelloBean) ic.lookup(“java:module/HelloBean”); hello.sayHello(“bob”); // Global session bean lookup InitialContext ic = new InitialContext(); Hello hello = (Hello) ic.lookup(“java:global/hello/HelloBean”); hello.sayHello(“bob”); 18 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 19. New Features • Singletons • Startup / Shutdown callbacks • Asynchronous session bean invocations • Calendar-based timers / Automatic timer creation • EJB 3.1 Lite • Embeddable API 19 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 20. Singletons • New session bean component type • Provides easy sharing of state within application • Designed for concurrent access • One bean instance per bean type per VM • Lots in common with stateless / stateful EJBs • Provides Local, Remote, Web Service client view • Supports CMT/BMT • Same container services are available ­resource managers, timer service, method authorization, etc. 20 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 21. Simple Singleton @Singleton public class SharedBean { private SharedData data = new SharedData(); public int getIntData() { return data.getIntValue(); } public void setIntValue(int value) { data.setIntValue(value); } } 21 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 22. Container Managed Concurrency @Singleton @Lock(READ) public class SharedBean { private SharedData data = newSharedData(); public int getIntValue() { return data.getIntValue(); } @Lock(WRITE) @AccessTimeout(value=1, unit=SECONDS) public void updateIntValue(int v) { data.update(v); } } 22 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 23. Bean Managed Concurrency @Singleton @ConcurrencyManagement(BEAN) public class SharedBean { private SharedData data = new SharedData(); public synchronized int getData() { return data.getXYZ(); } public void update(...) { ... synchronized (this) { data.setXYZ(...); } } 23 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 24. New Features • Singletons • Startup / Shutdown callbacks • Asynchronous session bean invocations • Calendar-based timers / Automatic timer creation • EJB 3.1 Lite • Embeddable API 24 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 25. Startup / Shutdown Callbacks @Singleton @Startup @DependsOn(“InitializationBean”) public class StartupBean { @PostConstruct private void onStartup() { // Create a new EJB Timer } @PreDestroy private void onShutdown() { ... } } 25 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 26. New Features • Singletons • Startup / Shutdown callbacks • Asynchronous session bean invocations • Calendar-based timers / Automatic timer creation • EJB 3.1 Lite • Embeddable API 26 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 27. Asynchronous Session Bean Invocations • Async processing in JavaEE 5 apps ­JavaEE apps resorted to JMS / MDBs ­Must know JMS APIs and setup JMS Queue etc. • EJB 3.1 makes it very easy ­Annotate your method with @Asynchronous ­Control returns to the client before actual method invocation ­Persistent 27 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. delivery guarantees are not required by spec
  • 28. Async Computation Example @Stateless @Asynchronous public class SimpleAsyncEJB { public Future<Integer> addNumbers(int n1, int n2) { Integer result; result = n1 + n2; try { // simulate JPA queries + reading file system Thread.currentThread().sleep(2000); } catch (InterruptedException ex) { ex.printStackTrace(); } return new AsyncResult(result); } } 28 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 29. Asynchronous method results • If you need to retrieve the results asynchronusly ­Return type java.util.concurrent.Future • Result value is returned via Future.get() ­Also supports Future.get(long, TimeUnit) ­Can use Future.isDone() • Client exception wrapped by ExecutionException ­getCause() 29 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. returns same exception as would have been thrown by a synchronous invocation
  • 30. New Features • Singletons • Startup / Shutdown callbacks • Asynchronous session bean invocations • Calendar-based timers / Automatic timer creation • EJB “Lite” • Embeddable API 30 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 31. Timer Service Features • Calendar-based timeouts • Automatic timer creation • Non-persistent Timers 31 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 32. EJB 3.1 - Timers • Calendar-based Timers – cron like semantics • Every Mon & Wed midnight @Schedule(dayOfWeek=”Mon,Wed”) • 2pm on Last Thur of Nov of every year (hour=”14”, dayOfMonth=”Last Thu”, month=”Nov”) • Every 5 minutes of every hour (minute=”*/5”, hour=”*”) • Every 10 seconds starting at 30 (second=”30/10”) • Every 14th minute within the hour, for the hours 1 and 2 am (minute=”*/14”, hour=”1,2”) 32 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 33. Calendar Based Expressions • Numeric attributes ­second, 33 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. minute ․Allowable values : [0,59] ․Default : “0” ­hour ․Allowable values : [0,23] ․Default : “0” ­year ․Allowable values : four-digit value ․Default : “*”
  • 34. Calendar Based Expressions • Other attributes ­dayOfWeek ․Allowable values : [0,7] or {“Sun”, ..., “Sat”} ․Default : “*” ­month ․Allowable values : [1,12] or {“Jan”, ..., “Dec”} ․Default : “*” 34 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 35. Calendar Based Expressions • Other attributes ­dayOfMonth ․Allowable values : [1,31] or [-7, -1] or “Last” or {“1st”, “2nd”, “3rd”, “4th”, “5th”, “Last”} {“Sun”, “Mon”, “Tue”, “Wed”, “Thu”, “Fri”, “Sat”} ․Default : “*” 35 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 36. Attribute Syntax • Single value : minute = “30” • List : month = “Jan, Jul, Dec” • Range : dayOfWeek = “Mon-Fri” or dayOfMonth = “27-3” • Wild card : hour = “*” • Increment : minute = “*/10” • Range/List Combination : minute = “1-10, 20-30” 36 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 37. Non-persistent Timers @Singleton public class CacheBean { private Cache cache; @Schedule(minute=”*/5”, hour=”*”, 37 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. persistent=false) @Lock(WRITE) private void refresh() { ... } @Lock(READ) public String getXYZ() { ... } }
  • 38. New Features • Singletons • Startup / Shutdown callbacks • Asynchronous session bean invocations • Calendar-based timers / Automatic timer creation • EJB “Lite” • Embeddable API 38 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 39. EJB 3.1 “Lite” API • Small subset of EJB 3.1 API required by Java EE Platform 6 Web Profile • Broadens the availability of EJB technology ­Without losing portability • Any 3.1 Lite application can be deployed to Web Profile and Full Java EE 6 Platform ­Made possible by simplified .war packaging 39 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 40. EJB Lite – Feature comparison 40 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 41. New Features • Singletons • Startup / Shutdown callbacks • Asynchronous session bean invocations • Calendar-based timers / Automatic timer creation • EJB “Lite” • Embeddable API 41 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 42. Example: Local Stateless Session Bean @Stateless @Local(Bank.class) public class BankBean implements Bank { @PersistenceContext EntityManager accountDB; public double deposit(double amount) { ... } public double withdraw(double amount) { ... } 42 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 43. Example: Test Client Execution % java -classpath bankClient.jar : 43 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. bank.jar : javaee.jar : <vendor_rt>.jar com.acme.BankTester
  • 44. Example: Embeddable API public class BankTester { public static void main(String[] args) { EJBContainer container = EJBContainer.createEJBContainer(); // Acquire Local EJB reference Bank bank = (Bank) container.getContext(). lookup(“java:global/bank/BankBean”); double balance = bank.deposit(100.00); ... container.close(); } 44 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 45. Embeddable API • Portable API for running EJB components in same process as client code • Same component behavior / life cycle as server-side ­CMT/ BMT, injection, threading guarantees, etc. • “Single Application” model • Only required to support 3.1 “Lite” API ­Vendors can optionally support additional functionality 45 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 46. Discussions in EJB 3.2 Expert Group What are we discussing? Cleanup Optional features (pruning) New features Separating components and services Further pruning 46 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 47. Optional Features What we are discussing EJB 3.2 Optional Chapters Separate document Approved by Java EE Platform EG EJB Containers will not be required to support: – CMP – BMP – JAX-RPC 47 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 48. New SFSB What we are discussing Support for transactions in life-cycle callbacks PostConstruct/PreDestroy PrePassivate/PostActivate 48 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 49. EJB 3.2 Lite Requirements What we are discussing Non-persistent timers Asynchronous invocations 49 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 50. New in Asynchronous Invocations What we are discussing Client code be able to decide if to call a business method asynchronously? – Look up special context? – Helper classes? Do we need AsyncListener to be notified of outcome? 50 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 51. New in MDBs What we are discussing How to simplify MDB? Some requirements from JMS 2.0 Expert Group – Synchronizing XML with annotations – Support for simplified API 51 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 52. MDB Current usage @MessageDriven(mappedName="jms/ejb_mdb_Queue”) public class SimpleMDB implements MessageListener { public void onMessage(Message message) { … } } 52 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 53. MDB – What if? One of many options @MessageDriven public class SimpleMDB { @TBDAnnotation(tbdAttr="jms/ejb_mdb_Queue”) public void processMessages(Message message) { … } } 53 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 54. New in Configuration What we are discussing QoS annotations or attributes – @MaxConcurrency ? • Number of concurrent Async methods that could be served – @PoolSize ? • Bean pool size 54 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 55. Common Enterprise Services What we are discussing Services available for all (most?) Managed Beans By default available for EJBs Can be opt-in in other Managed Beans 55 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 56. Transactions as Common Enterprise Services What we are discussing Support for Container-Managed Transactions (CMT) in Managed Beans Subset of transaction attributes(?) – REQUIRED, REQUIRES_NEW, NOT_SUPPORTED – MANDATORY, NEVER – SUPPORTS BMT are already supported (UserTransaction) 56 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 57. Other Common Enterprise Services What we are discussing Asynchronous invocations – Are they useful to be standardized for all Managed Beans? – How to reconcile differences Timer Service? – ScheduleExpression – @Schedule @Lock? 57 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 58. Proposing Optional? What we are discussing 2.x Home and component interfaces? – EJBHome/EJBLocalHome/EJBObject/EJBLocalOb ject CORBA interoperability? Can become optional in Java EE 8 58 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 59. 59 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 60. EJB 3.2 Get Involved… Find info: http://java.net/projects/ejb-spec – Subscribe, listen and discuss: users@ejb-spec.java.net – Browse email archives: http://java.net/projects/ejb-spec/lists/jsr345-experts/archive – Read current version of the spec: http://java.net/projects/ejb-spec/downloads – File issues or feature requests: http://java.net/jira/browse/EJB_SPEC 60 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 61. 61 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Q&A
  • 62. 62 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 63. EJB: Simple, Light & Powerful backbone of Java EE Classic Duke Future Tech Duke 63 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 64. 64 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.