EJB 3.0 Puzzlers. Mike Keith, Oracle Corp. Colorado Software Summit: October 21 26, 2007

Size: px
Start display at page:

Download "EJB 3.0 Puzzlers. Mike Keith, Oracle Corp. Colorado Software Summit: October 21 26, 2007"

Transcription

1 EJB 3.0 Puzzlers Mike Keith, Oracle Corp. Slide 1

2 About Me Co-spec Lead of EJB 3.0 (JSR 220) and Java EE 5 (JSR 244) expert group member Currently working on Java EE 6 (JSR 316), EJB 3.1 (JSR 318), and JPA 2.0 (JSR 317) groups Co-author Pro EJB 3: Java Persistence API Persistence/EJB/Container Architect for Oracle 15+ years experience in distributed, server-side and persistence implementations Presenter at numerous conferences and events Slide 2

3 Goal To examine some of the subtleties of EJB 3.0 and JPA (and have fun doing it) Slide 3

4 Rules of the Game 1. Package and import (including static import) statements may be assumed. To conserve space they are not listed. 2. Client code is not completely specified. It is the invocation on session beans or the persistence layer. 3. Some of the simpler classes/interfaces are not specified. They can be assumed to be present and to be defined as expected (as is a persistence.xml file). 4. The print() method is a shorthand for System.out.print(). Slide 4

5 Puzzle #1 Madness to the AnInterface ejb; return ejb.method1(); Answers a) 42 d) EntityNotFoundException b) AnEntity(5) e) Some other exception c) Null f) Depends on implementation Slide 5

6 Puzzle #1 Madness to the public class ABean implements AnInterface EntityManager em; public Object method1() { method2(); return em.find(anentity.class, 5); private void method2() { AnEntity e = new AnEntity(); e.setid(5); em.persist(e); Slide 6

7 Puzzle #1 Madness to the public class AnEntity private int id; public int getid() { return this.id; public void setid(int id) { this.id = id; Slide 7

8 Puzzle #1 Madness to the AnInterface ejb; return ejb.method1(); Answers a) 42 d) EntityNotFoundException b) AnEntity(5) e) Some other exception c) Null f) Depends on implementation Slide 8

9 Puzzle #1 Madness to the public class ABean implements AnInterface EntityManager em; (unitname="myunit") public Object method1() { method2(); return em.find(anentity.class, 5); private void method2() { AnEntity e = new AnEntity(); e.setid(5); em.persist(e); Spec allows a but doesn't specify what it is Slide 9

10 Puzzle #1 Madness to the AnInterface ejb; return ejb.method1(); Answers a) 42 d) EntityNotFoundException b) AnEntity(5) e) Some other exception c) Null f) Depends on implementation Slide 10

11 Puzzle #2 Identity AnInterface ejb; ejb.persist(5); return ejb.method1(5); Answers a) true d) Some other exception b) false e) Depends on implementation c) NullPointerException f) None of the above Slide 11

12 Puzzle #2 EM, unitname= punit ) public class ABean implements AnInterface SessionContext punit ) EntityManager cm_em; public void persist(int id) { cm_em.persist(new AnEntity(id)); public boolean method1(int id) { EntityManager em =(EntityManager)ctx.lookup( EM ); AnEntity e1 = em.find(anentity.class, id) return (e1 == cm_em.find(anentity.class, id)); Slide 12

13 Puzzle #2 Identity public class AnEntity private int id; public AnEntity(int id) { this.setid(id); public int getid() { return this.id; public void setid(int id) { this.id = id; Slide 13

14 Puzzle #2 Identity AnInterface ejb; ejb.persist(); return ejb.method1(); Answers a) true d) Some other exception b) false e) Depends on implementation c) NullPointerException f) None of the above Slide 14

15 Puzzle #2 EM, unitname= punit ) public class ABean implements AnInterface SessionContext punit ) EntityManager cm_em; public void persist(int id) { cm_em.persist(new AnEntity(id)); Injected EM and looked up EM point to the same PC public boolean method1(int id) { EntityManager em =(EntityManager)ctx.lookup( EM ); AnEntity e1 = em.find(anentity.class, id) return (e1 == cm_em.find(anentity.class, id)); Slide 15

16 Puzzle #2 Identity public class AnEntity private int id; No-arg constructor required, but not generated when a single-arg one is declared public AnEntity() { public AnEntity(int id) { this.setid(id); public int getid() { return this.id; public void setid(int id) { this.id = id; Slide 16

17 Puzzle #2 Identity AnInterface ejb; ejb.persist(); return ejb.method1(); Answers a) true d) Some other exception b) false e) Depends on implementation c) NullPointerException f) None of the above Slide 17

18 Puzzle #3 Identity Crisis (Part AnInterface ejb; ejb.persist(); return (ejb.method1() && ejb.method2()); Answers a) true d) Some other exception b) false e) Depends on implementation c) NullPointerException f) None of the above Slide 18

19 Puzzle #3 Identity Crisis (Part public class ABean implements AnInterface punit,type=extended) EntityManager AnotherInterface slbean; AnEntity entity1 = new AnEntity(5); AnEntity entity2 = new AnEntity(10); public void persist() { public boolean method1() { return (entity1 == public boolean method2() { em.persist(entity2); return (entity2 == slbean.method2(10)); Slide 19

20 Puzzle #3 Identity Crisis (Part public class SLBean implements AnotherInterface punit ) EntityManager em; public Object method1(int id) { return em.find(anentity.class, id); public Object method2(int id) { return em.merge(new AnEntity(id)); Slide 20

21 Puzzle #3 Identity Crisis (Part AnInterface ejb; ejb.persist(); return (ejb.method1() && ejb.method2()); Answers a) true d) Some other exception b) false e) Depends on implementation c) NullPointerException f) None of the above Slide 21

22 Puzzle #3 Identity Crisis (Part public class ABean implements AnInterface punit,type=extended) EntityManager AnotherInterface slbean; AnEntity entity1 = new AnEntity(5); AnEntity entity2 = new AnEntity(10); Extended PC is propagated across transaction into each SLSB method public void persist() { public boolean method1() { return (entity1 == public boolean method2() { em.persist(entity2); return (entity2 == slbean.method2(10)); Slide 22

23 Puzzle #3 Identity Crisis (Part public class SLBean implements AnotherInterface punit ) EntityManager em; public Object method1(int id) { return em.find(anentity.class, id); public Object method2(int id) { return em.merge(new AnEntity(id)); Merge returns a managed entity with the same id, which is the same entity persisted in the calling method Slide 23

24 Puzzle #3 Identity Crisis (Part AnInterface ejb; ejb.persist(); return (ejb.method1() && ejb.method2()); Answers a) true d) Some other exception b) false e) Depends on implementation c) NullPointerException f) None of the above Slide 24

25 Puzzle #4 A Merge Without a RemoteInterface ejb; return ejb.method(5); Answers a) null d) Some other exception b) AnEntity(5) e) Depends on implementation c) ClassCastException f) None of the above Slide 25

26 Puzzle #4 A Merge Without public class ABean implements AnInterface punit ) EntityManager em; public Object method(int id) { return em.merge(new AnEntity(id)); Slide 26

27 Puzzle #4 A Merge Without a public class AnEntity int id; String data; public AnEntity() { public AnEntity(int id) { this.setid(id); public int getid() { return this.id; public void setid(int i) { this.id = i; public String getdata() { return this.data; public void setdata(string d) { this.data = d; Slide 27

28 Puzzle #4 A Merge Without a RemoteInterface ejb; return ejb.method(5); Answers a) null d) Some other exception b) AnEntity(5) e) Depends on implementation c) ClassCastException f) None of the above Slide 28

29 Puzzle #4 A Merge Without public class ABean implements AnInterface punit ) EntityManager em; public Object method(int id) { return em.merge(new AnEntity(id)); Slide 29

30 Puzzle #4 A Merge Without a public class AnEntity { implements Serializable int id; String data; Entity is being returned from a remote method so it must be Serializable public AnEntity() { public AnEntity(int id) { this.setid(id); public int getid() { return this.id; public void setid(int i) { this.id = i; public String getdata() { return this.data; public void setdata(string d) { this.data = d; Slide 30

31 Puzzle #4 A Merge Without a RemoteInterface ejb; return ejb.method(5); Answers a) null d) Some other exception b) AnEntity(5) e) Depends on implementation c) ClassCastException f) None of the above Slide 31

32 Puzzle #5 Callback AnInterface ejb; ejb.method1(); Answers a) PreP p p PostP PreU u u PostU b) PreP p PostP PreU PostU p u u c) PreP PostP PreU PostU p p u u d) An exception e) Depends on implementation f) None of the above Slide 32

33 Puzzle #5 Callback public class AnEntity int id; String data; public AnEntity() { public AnEntity(int id) { this.setid(id); public int getid() { return this.id; public void setid(int i) { this.id = i; public String getdata() { return this.data; public void setdata(string d) { this.data public void persistcallback() { print( public void updatecallback() { print( u ); Slide 33

34 Puzzle #5 Callback public class ABean implements AnInterface punit ) EntityManager em; public void method1() { this.method2(); print( PreU ); AnEntity e = em.find(anentity.class, 5); e.setdata( newstring ); print( PostU ); private void method2() { print( PreP ); em.persist(new AnEntity(5)); print( PostP ); Slide 34

35 Puzzle #5 Callback AnInterface ejb; ejb.method1(); Answers a) PreP p p PostP PreU u u PostU b) PreP p PostP PreU PostU p u u c) PreP PostP PreU PostU p p u u d) An exception e) Depends on implementation f) None of the above Slide 35

36 Puzzle #5 Callback public class AnEntity int id; String data; public AnEntity() { public AnEntity(int id) { this.setid(id); public int getid() { return this.id; public void setid(int i) { this.id = i; public String getdata() { return this.data; public void setdata(string d) { this.data public void persistcallback() { print( public void updatecallback() { print( u ); Slide 36

37 Puzzle #5 Callback public class ABean implements AnInterface punit ) EntityManager em; public void method1() { this.method2(); print( PreU ); AnEntity e = em.find(anentity.class, 5); e.setdata( newstring ); print( PostU ); private void method2() { print( PreP ); em.persist(new AnEntity(5)); print( PostP ); Undefined whether PostPersist, PreUpdate, and PostUpdate occur immediately or at commit time Undefined whether PreUpdate and PostUpdate callbacks occur when entity is persisted and updated in the same tx Slide 37

38 Puzzle #5 Callback AnInterface ejb; ejb.method1(); Answers a) PreP p p PostP PreU u u PostU b) PreP p PostP PreU PostU p u u c) PreP PostP PreU PostU p p u u d) An exception e) Depends on implementation f) None of the above Slide 38

39 Puzzle #6 Interceptor AnInterface ejb; ejb.method1(); ejb.method2(); a) m1a m2 m1b m2 Answers b) INT m1a INT m2 m1b INT m2 c) INT m1a m2 m1b INT m2 d) An exception e) Depends on implementation f) None of the above Slide 39

40 Puzzle #6 Interceptor public class ABean implements AnInterface { public void method1() { print( m1a ); method2(); print( m1b ); public void method2() { print( m2 public Object imethod(invocationcontext ic) throws Exception { print( INT ); Slide 40

41 Puzzle #6 Interceptor AnInterface ejb; ejb.method1(); ejb.method2(); a) m1a m2 m1b m2 Answers b) INT m1a INT m2 m1b INT m2 c) INT m1a m2 m1b INT m2 d) An exception e) Depends on implementation f) None of the above Slide 41

42 Puzzle #6 Interceptor public class ABean implements AnInterface { public void method1() { print( m1a ); method2(); print( m1b ); public void method2() { print( m2 public Object imethod(invocationcontext ic) print( INT ); Missing call to ic.proceed() means intercepted method never executes Missing return will actually result in a compile error throws Exception { return ic.proceed(); Slide 42

43 Puzzle #6 Interceptor AnInterface ejb; ejb.method1(); ejb.method2(); a) m1a m2 m1b m2 Answers b) INT m1a INT m2 m1b INT m2 c) INT m1a m2 m1b INT m2 d) An exception e) Depends on implementation f) None of the above Slide 43

44 Puzzle #7 Iffy AnInterface ejb; ejb.method(100); Answers a) INT INT_1 INT_2 Num=100 b) INT_1 INT_2 Num=100 c) INT_1 INT_2 P_INT INT Num=101 d) P_INT INT INT_1 INT_2 Num=101 e) An exception f) None of the above Slide 44

45 Puzzle #7 Int2.class) public class ABean extends ParentClass implements AnInterface { public void method(int num) { print( Num= + public Object imethod(invocationcontext ic) throws Exception { print( INT ); return ic.proceed(); Slide 45

46 Puzzle #7 Iffy Interception public class ParentClass private Object imethod(invocationcontext ic) throws Exception { print( P_INT ); Object[] params = ic.getparameters(); Integer p = (Integer)(params[0]); params[0] = p + 1; ic.setparameters(params); return ic.proceed(); Slide 46

47 Puzzle #7 Iffy Interception public class Int1 public Object imethod(invocationcontext ic) throws Exception { print( INT_1 ); return ic.proceed(); public class Int2 public Object imethod(invocationcontext ic) throws Exception { print( INT_2 ); return ic.proceed(); Slide 47

48 Puzzle #7 Iffy AnInterface ejb; ejb.method(100); Answers a) INT INT_1 INT_2 Num=100 b) INT_1 INT_2 Num=100 c) INT_1 INT_2 P_INT INT Num=101 d) P_INT INT INT_1 INT_2 Num=101 e) An exception f) None of the above Slide 48

49 Puzzle #7 Int2.class) public class ABean extends ParentClass implements AnInterface { public void method(int num) { print( Num= + public Object imethod(invocationcontext ic) throws Exception { print( INT ); return ic.proceed(); Interceptor in bean always executes last in interceptor chain Slide 49

50 Puzzle #7 Iffy Interception public class ParentClass private Object imethod(invocationcontext ic) throws Exception { print( P_INT ); Object[] params = ic.getparameters(); Integer p = (Integer)(params[0]); params[0] = p + 1; ic.setparameters(params); return ic.proceed(); Non-session superclasses may define interceptor methods. They are called in order of hierarchy, top-most first Slide 50

51 Puzzle #7 Iffy Interception public class Int1 public Object imethod(invocationcontext ic) throws Exception { print( INT_1 ); return ic.proceed(); Interceptor classes called first, in order of declaration public class Int2 public Object imethod(invocationcontext ic) throws Exception { print( INT_2 ); return ic.proceed(); Slide 51

52 Puzzle #7 Iffy AnInterface ejb; ejb.method(100); Answers a) INT INT_1 INT_2 Num=100 b) INT_1 INT_2 Num=100 c) INT_1 INT_2 P_INT INT Num=101 d) P_INT INT INT_1 INT_2 Num=101 e) An exception f) None of the above Slide 52

53 Puzzle #8 Schizophrenic AnInterface ejb; ejb.method1(); ejb.method2(); ejb.method3(); return ejb.method4(); Answers a) AnEntity(5, String ) d) null b) AnEntity(5, NewString ) e) An exception c) AnEntity(5, ANewString ) f) None of the above Slide 53

54 Puzzle #8 public class ABean implements AnInterface punit ) EntityManagerFactory UserTransaction punit ) EntityManager em; public void method1() { tx.begin(); EntityManager em = emf.createentitymanager(); AnEntity e = new AnEntity(5); em.persist(e); e.setdata( String ); tx.commit(); em.close(); Slide 54

55 Puzzle #8 Schizophrenic Session public void method2() { AnEntity e = em.find(anentity.class, 5); tx.begin(); e.setdata( New + e.getdata()); tx.commit(); public void method3() { EntityManager em = emf.createentitymanager(); AnEntity e = em.find(anentity.class, 5); tx.begin(); e.setdata( A + e.getdata()); tx.commit(); em.close(); public AnEntity method4() { return em.find(anentity.class, 5); Slide 55

56 Puzzle #8 Schizophrenic AnInterface ejb; ejb.method1(); ejb.method2(); ejb.method3(); return ejb.method4(); Answers a) AnEntity(5, String ) d) null b) AnEntity(5, NewString ) e) An exception c) AnEntity(5, ANewString ) f) None of the above Slide 56

57 Puzzle #8 public class ABean implements AnInterface punit ) EntityManagerFactory UserTransaction punit ) EntityManager em; public void method1() { tx.begin(); EntityManager em = emf.createentitymanager(); AnEntity e = new AnEntity(5); em.persist(e); e.setdata( String ); tx.commit(); em.close(); Slide 57

58 Puzzle #8 Schizophrenic Session public void method2() { AnEntity e = em.find(anentity.class, 5); tx.begin(); e = em.find(anentity.class, 5); e.setdata( New + e.getdata()); tx.commit(); public void method3() { EntityManager em = emf.createentitymanager(); AnEntity e = em.find(anentity.class, 5); tx.begin(); em.jointransaction(); e.setdata( A + e.getdata()); tx.commit(); em.close(); public AnEntity method4() { return em.find(anentity.class, 5); Container-managed PC is scoped at tx, so result of find is detached, not managed Application-managed EM created outside tx is not synchronized with tx. Must explicitly call jointransaction(). Slide 58

59 Puzzle #8 Schizophrenic AnInterface ejb; ejb.method1(); ejb.method2(); ejb.method3(); return ejb.method4(); Answers a) AnEntity(5, String ) d) null b) AnEntity(5, NewString ) e) An exception c) AnEntity(5, ANewString ) f) None of the above Slide 59

60 Puzzle #9 Muddled AnInterface ejb; ejb.persist(); return ejb.method(); a) anentity(5, String, 100) b anentity(5, null, null) c) anentity(5, String, null) d) NullPointerException e) Some other exception Answers f) Depends on implementation Slide 60

61 Puzzle #9 Muddled public class ABean implements AnInterface punit ) EntityManager em; public void persist() { AnEntity e = em.persist(new AnEntity(5)); e.setsdata( String ); e.setintdata(100); public Object method() { return em.find(anentity.class,5); Slide 61

62 Puzzle #9 Muddled public class AnEntity int id; String sdata; Integer idata; public AnEntity() { public AnEntity(int id) { this.setid(id); public int getid() { return this.id; public void setid(int id) { this.id S_DATA ) public String getsdata() { return this.sdata; public void setsdata(string d) { this.sdata = I_DATA ) public Integer getintdata() { return this.idata; public void setintdata(int d) { this.idata = d; Slide 62

63 Puzzle #9 Muddled AnInterface ejb; ejb.persist(); return ejb.method(); a) anentity(5, String, 100) b anentity(5, null, null) c) anentity(5, String, null) d) NullPointerException e) Some other exception Answers f) Depends on implementation Slide 63

64 Puzzle #9 Muddled public class ABean implements AnInterface punit ) EntityManager em; public void persist() { AnEntity e = em.persist(new AnEntity(5)); e.setsdata( String ); e.setintdata(100); public Object method() { return em.find(anentity.class,5); Slide 64

65 Puzzle #9 Muddled public class AnEntity { id; int id; String sdata; Integer idata; Undefined to mix field annotations and property annotations. Must make them all use the same strategy. public AnEntity() { public AnEntity(int id) { public int getid() { return this.id; public void setid(int id) { this.id S_DATA ) public String getsdata() { return this.sdata; public void setsdata(string d) { this.sdata = I_DATA ) public Integer getintdata() { return this.idata; public void setintdata(int d) { this.idata = d; Slide 65

66 Puzzle #9 Muddled AnInterface ejb; ejb.persist(); return ejb.method(); a) anentity(5, String, 100) b anentity(5, null, null) c) anentity(5, String, null) d) NullPointerException e) Some other exception Answers f) Depends on implementation Slide 66

67 Puzzle #10 Cupid Cutting AnInterface ejb; Entity1 e = ejb.persist(); return ejb.query(e); Answers a) 4 d) 0 b) 3 e) An exception c) 1 f) None of the above Slide 67

68 Puzzle #10 Cupid Cutting public class Entity1 int Entity1 List<Entity1> List<Entity2> e2list; public Entity1() { public Entity1(int id) { this.id = id; public int getid() { return id; public List<Entity1> gete1list() { return e1list; public void sete1list(list<entity1> list) { e1list = list; Slide 68

69 Puzzle #10 Cupid Cutting public class Entity2 int Entity1 e1; public Entity2() { public Entity2(int id) { this.id = id; public int getid() { return id; public void sete1(entity1 entity) { e1 = entity; Slide 69

70 Puzzle #10 Cupid Cutting Corners <named-query name="entity1.entity1count"> <query>select COUNT(e1.e1List) FROM Entity1 e1 WHERE e1.id = :id </query> </named-query> <named-query name="entity1.entity2count"> <query>select COUNT(e1.e2List) FROM Entity1 e1 WHERE e1 = :entity1 </query> </named-query> Slide 70

71 Puzzle #10 Cupid Cutting public class ABean implements AnInterface punit ) EntityManager em; public Entity1 persist() { Entity1 a = new Entity1(1); Entity1 b = new Entity1(2); Entity1 c = new Entity1(3); Entity2 d = new Entity2(4); a.gete1list().add(a); a.gete1list().add(b); a.gete1list().add(c); em.persist(a); d.sete1(b); em.persist(d); return a; Slide 71

72 Puzzle #10 Cupid Cutting Corners public long query (Entity1 e) { long result1 = (Long)(em.createNamedQuery("Entity1.entity1Count").setParameter("id", e.getid()).getsingleresult()); long result2 = (Long) (em.createnamedquery("entity1.entity2count").setparameter("entity1", e).getsingleresult()); return result1 + result2; Slide 72

73 Puzzle #10 Cupid Cutting AnInterface ejb; Entity1 e = ejb.persist(); return ejb.query(e); Answers a) 4 d) 0 b) 3 e) An exception c) 1 f) None of the above Slide 73

74 Puzzle #10 Cupid Cutting Corners <named-query name="entity1.entity1count"> <query>select COUNT(e1.e1List) FROM Entity1 e1 WHERE e1.id = :id </query> </named-query> <named-query name="entity1.entity2count"> <query>select COUNT(e1.e2List) FROM Entity1 e1 WHERE e1 = :entity1 </query> </named-query> Slide 74

75 Puzzle #10 Cupid Cutting Corners public long query (Entity1 e) { long result1 = (Long)(em.createNamedQuery("Entity1.entity1Count").setParameter("id", e.getid()).getsingleresult()); long result2 = (Long) (em.createnamedquery("entity1.entity2count").setparameter("entity1", e).getsingleresult()); return result1 + result2; Slide 75

76 Puzzle #10 Cupid Cutting public class Entity1 int Entity1 cascade=persist) List<Entity1> List<Entity2> e2list; public Entity1() { e1list = new ArrayList<Entity1>(); e2list = new ArrayList<Entity2>(); public Entity1(int id) { this(); this.id = id; OneToMany relationships are bidirectional so the other "mappedby" side must be specified in annotations Collections should be initialized if they are being used when creating new entities in memory Slide 76

77 Puzzle #10 Cupid Cutting public class Entity2 int Entity1 e1; public Entity2() { public Entity2(int id) { this.id = id; public int getid() { return id; public void sete1(entity1 entity) { e1 = entity; Slide 77

78 Puzzle #10 Cupid Cutting public class ABean implements AnInterface punit ) EntityManager em; public Entity1 persist() { Entity1 a = new Entity1(1); Entity1 b = new Entity1(2); Entity1 c = new Entity1(3); Entity2 d = new Entity2(4); a.gete1list().add(a); a.gete1list().add(b); a.gete1list().add(c); em.persist(a); d.sete1(b); em.persist(d); return a; a.sete1(a); b.sete1(a); c.sete1(a); b.gete2list().add(d); Calling add() on an uninitialized List field will cause NPE Both sides of bidirectional relationships must be set Slide 78

79 Puzzle #10 Cupid Cutting AnInterface ejb; Entity1 e = ejb.persist(); return ejb.query(e); Answers a) 4 d) 0 b) 3 e) An exception c) 1 f) None of the above Slide 79

80 Summary EJB 3.0 and JPA are simple to use and can be quickly learned, but it's also a good idea to know the subtleties before attempting to use them in advanced or unusual ways. Slide 80

81 Links and Resources EJB 3.0 Reference Implementation JPA Reference Implementation EJB 3.0 white papers, tutorials and resources Pro EJB 3: Java Persistence API Mike Keith & Merrick Schincariol (Apress) Slide 81

Module 8 The Java Persistence API

Module 8 The Java Persistence API Module 8 The Java Persistence API Objectives Describe the role of the Java Persistence API (JPA) in a Java EE application Describe the basics of Object Relational Mapping Describe the elements and environment

More information

JPA The New Enterprise Persistence Standard

JPA The New Enterprise Persistence Standard JPA The New Enterprise Persistence Standard Mike Keith michael.keith@oracle.com http://otn.oracle.com/ejb3 About Me Co-spec Lead of EJB 3.0 (JSR 220) Java EE 5 (JSR 244) expert group member Co-author Pro

More information

Oracle Exam 1z0-898 Java EE 6 Java Persistence API Developer Certified Expert Exam Version: 8.0 [ Total Questions: 33 ]

Oracle Exam 1z0-898 Java EE 6 Java Persistence API Developer Certified Expert Exam Version: 8.0 [ Total Questions: 33 ] s@lm@n Oracle Exam 1z0-898 Java EE 6 Java Persistence API Developer Certified Expert Exam Version: 8.0 [ Total Questions: 33 ] Question No : 1 Entity lifecycle callback methods may be defined in which

More information

JPA and CDI JPA and EJB

JPA and CDI JPA and EJB JPA and CDI JPA and EJB Concepts: Connection Pool, Data Source, Persistence Unit Connection pool DB connection store: making a new connection is expensive, therefor some number of connections are being

More information

Entity LifeCycle Callback Methods Srikanth Technologies Page : 1

Entity LifeCycle Callback Methods Srikanth Technologies Page : 1 Entity LifeCycle Callback Methods Srikanth Technologies Page : 1 Entity LifeCycle Callback methods A method may be designated as a lifecycle callback method to receive notification of entity lifecycle

More information

EJB 3 Entity Relationships

EJB 3 Entity Relationships Berner Fachhochschule Technik und Informatik EJB 3 Entity Relationships Course Multi Tier Business Applications with Java EE Prof. Dr. Eric Dubuis Berner Fachhochschule Biel Content What are relationships?

More information

EJB 3 Entity Relationships

EJB 3 Entity Relationships Berner Fachhochschule Technik und Informatik EJB 3 Entity Relationships Course Multi Tier Business Applications with Java EE Prof. Dr. Eric Dubuis Berner Fachhochschule Biel Content What are relationships?

More information

Introduction to JPA. Fabio Falcinelli

Introduction to JPA. Fabio Falcinelli Introduction to JPA Fabio Falcinelli Me, myself and I Several years experience in active enterprise development I love to design and develop web and standalone applications using Python Java C JavaScript

More information

Pro JPA 2. Mastering the Java Persistence API. Apress* Mike Keith and Merrick Schnicariol

Pro JPA 2. Mastering the Java Persistence API. Apress* Mike Keith and Merrick Schnicariol Pro JPA 2 Mastering the Java Persistence API Mike Keith and Merrick Schnicariol Apress* Gootents at a Glance g V Contents... ; v Foreword _ ^ Afooyt the Author XXj About the Technical Reviewer.. *....

More information

Java EE Architecture, Part Three. Java EE architecture, part three 1(69)

Java EE Architecture, Part Three. Java EE architecture, part three 1(69) Java EE Architecture, Part Three Java EE architecture, part three 1(69) Content Requirements on the Integration layer The Database Access Object, DAO Pattern Frameworks for the Integration layer Java EE

More information

Metadata driven component development. using Beanlet

Metadata driven component development. using Beanlet Metadata driven component development using Beanlet What is metadata driven component development? It s all about POJOs and IoC Use Plain Old Java Objects to focus on business logic, and business logic

More information

Practice Test. Oracle 1z Java Enterprise Edition 5 Business Component Developer Certified Professional Upgrade Exam. Version: 14.

Practice Test. Oracle 1z Java Enterprise Edition 5 Business Component Developer Certified Professional Upgrade Exam. Version: 14. Oracle 1z0-861 Java Enterprise Edition 5 Business Component Developer Certified Professional Upgrade Exam Practice Test Version: 14.22 QUESTION NO: 1 A developer wants to create a business interface for

More information

Shale and the Java Persistence Architecture. Craig McClanahan Gary Van Matre. ApacheCon US 2006 Austin, TX

Shale and the Java Persistence Architecture. Craig McClanahan Gary Van Matre. ApacheCon US 2006 Austin, TX Shale and the Java Persistence Architecture Craig McClanahan Gary Van Matre ApacheCon US 2006 Austin, TX 1 Agenda The Apache Shale Framework Java Persistence Architecture Design Patterns for Combining

More information

Database Connection using JPA. Working with the Java Persistence API (JPA) consists of using the following interfaces:

Database Connection using JPA. Working with the Java Persistence API (JPA) consists of using the following interfaces: JPA - drugi deo Database Connection using JPA Working with the Java Persistence API (JPA) consists of using the following interfaces: Database Connection using JPA Overview A connection to a database is

More information

Chapter 1 Introducing EJB 1. What is Java EE Introduction to EJB...5 Need of EJB...6 Types of Enterprise Beans...7

Chapter 1 Introducing EJB 1. What is Java EE Introduction to EJB...5 Need of EJB...6 Types of Enterprise Beans...7 CONTENTS Chapter 1 Introducing EJB 1 What is Java EE 5...2 Java EE 5 Components... 2 Java EE 5 Clients... 4 Java EE 5 Containers...4 Introduction to EJB...5 Need of EJB...6 Types of Enterprise Beans...7

More information

Practical EJB 3.0. Bill Burke JBoss Fellow Red Hat. Easier for application and framework developers. Professional Open Source

Practical EJB 3.0. Bill Burke JBoss Fellow Red Hat. Easier for application and framework developers. Professional Open Source Practical EJB 3.0 Easier for application and framework developers Bill Burke JBoss Fellow Red Hat JBoss, Inc. 2003-2005. 10/30/2007 1 Agenda Using EJB with JPA How EJBs makes JPA easier for application

More information

The 1st Java professional open source Convention Israel 2006

The 1st Java professional open source Convention Israel 2006 The 1st Java professional open source Convention Israel 2006 The Next Generation of EJB Development Frederic Simon AlphaCSP Agenda Standards, Open Source & EJB 3.0 Tiger (Java 5) & JEE What is EJB 3.0

More information

V3 EJB Test One Pager

V3 EJB Test One Pager V3 EJB Test One Pager Overview 1. Introduction 2. EJB Testing Scenarios 2.1 EJB Lite Features 2.2 API only in Full EJB3.1 3. Document Review 4. Reference documents 1. Introduction This document describes

More information

Fast Track to EJB 3.0 and the JPA Using JBoss

Fast Track to EJB 3.0 and the JPA Using JBoss Fast Track to EJB 3.0 and the JPA Using JBoss The Enterprise JavaBeans 3.0 specification is a deep overhaul of the EJB specification that is intended to improve the EJB architecture by reducing its complexity

More information

"Charting the Course... Mastering EJB 3.0 Applications. Course Summary

Charting the Course... Mastering EJB 3.0 Applications. Course Summary Course Summary Description Our training is technology centric. Although a specific application server product will be used throughout the course, the comprehensive labs and lessons geared towards teaching

More information

SUN Sun Cert Bus Component Developer Java EE Platform 5, Upgrade. Download Full Version :

SUN Sun Cert Bus Component Developer Java EE Platform 5, Upgrade. Download Full Version : SUN 310-092 Sun Cert Bus Component Developer Java EE Platform 5, Upgrade Download Full Version : https://killexams.com/pass4sure/exam-detail/310-092 D. A javax.ejb.nosuchentityexception is thrown. Answer:

More information

The Good, the Bad and the Ugly

The Good, the Bad and the Ugly The Good, the Bad and the Ugly 2 years with Java Persistence API Björn Beskow bjorn.beskow@callistaenterprise.se www.callistaenterprise.se Agenda The Good Wow! Transparency! The Bad Not that transparent

More information

Java EE 6: Develop Business Components with JMS & EJBs

Java EE 6: Develop Business Components with JMS & EJBs Oracle University Contact Us: + 38516306373 Java EE 6: Develop Business Components with JMS & EJBs Duration: 4 Days What you will learn This Java EE 6: Develop Business Components with JMS & EJBs training

More information

1Z Oracle. Java Enterprise Edition 5 Business Component Developer Certified Professional Upgrade

1Z Oracle. Java Enterprise Edition 5 Business Component Developer Certified Professional Upgrade Oracle 1Z0-861 Java Enterprise Edition 5 Business Component Developer Certified Professional Upgrade Download Full Version : https://killexams.com/pass4sure/exam-detail/1z0-861 A. The Version attribute

More information

Dynamic Datasource Routing

Dynamic Datasource Routing Dynamic Datasource Routing Example dynamic-datasource-routing can be browsed at https://github.com/apache/tomee/tree/master/examples/dynamic-datasourcerouting The TomEE dynamic datasource api aims to allow

More information

Java EE Architecture, Part Three. Java EE architecture, part three 1(57)

Java EE Architecture, Part Three. Java EE architecture, part three 1(57) Java EE Architecture, Part Three Java EE architecture, part three 1(57) Content Requirements on the Integration layer The Database Access Object, DAO Pattern Frameworks for the Integration layer Java EE

More information

Topics in Enterprise Information Management

Topics in Enterprise Information Management Topics in Enterprise Information Management Dr. Ilan Kirsh JPA Basics Object Database and ORM Standards and Products ODMG 1.0, 2.0, 3.0 TopLink, CocoBase, Castor, Hibernate,... EJB 1.0, EJB 2.0: Entity

More information

Information systems modelling UML and service description languages

Information systems modelling UML and service description languages Internet Engineering Tomasz Babczyński, Zofia Kruczkiewicz Tomasz Kubik Information systems modelling UML and service description languages Laboratory 4 Design patterns used to build the Integration nad

More information

JPA Entities. Course Multi Tier Business Applications with Java EE. Prof. Dr. Eric Dubuis Berner Fachhochschule Biel. Berner Fachhochschule

JPA Entities. Course Multi Tier Business Applications with Java EE. Prof. Dr. Eric Dubuis Berner Fachhochschule Biel. Berner Fachhochschule Berner Fachhochschule Technik und Informatik JPA Entities Course Multi Tier Business Applications with Java EE Prof. Dr. Eric Dubuis Berner Fachhochschule Biel Content Characteristics of entities Programming

More information

Entities are classes that need to be persisted, usually in a relational database. In this chapter we cover the following topics:

Entities are classes that need to be persisted, usually in a relational database. In this chapter we cover the following topics: Entities are classes that need to be persisted, usually in a relational database. In this chapter we cover the following topics: EJB 3 entities Java persistence API Mapping an entity to a database table

More information

EJB 3 Entities. Course Multi Tier Business Applications with Java EE. Prof. Dr. Eric Dubuis Berner Fachhochschule Biel. Berner Fachhochschule

EJB 3 Entities. Course Multi Tier Business Applications with Java EE. Prof. Dr. Eric Dubuis Berner Fachhochschule Biel. Berner Fachhochschule Berner Fachhochschule Technik und Informatik EJB 3 Entities Course Multi Tier Business Applications with Java EE Prof. Dr. Eric Dubuis Berner Fachhochschule Biel Content Characteristics of entities Programming

More information

Stateful Session Beans

Stateful Session Beans Berner Fachhochschule Technik und Informatik Stateful Session Beans Course Multi Tier Business Applications with Java EE Prof. Dr. Eric Dubuis Berner Fachhochschule Biel Content Characteristics of stateful

More information

Enterprise JavaBeans 3.1

Enterprise JavaBeans 3.1 SIXTH EDITION Enterprise JavaBeans 3.1 Andrew Lee Rubinger and Bill Burke O'REILLY* Beijing Cambridge Farnham Kbln Sebastopol Tokyo Table of Contents Preface xv Part I. Why Enterprise JavaBeans? 1. Introduction

More information

JPA. Java Persistence API

JPA. Java Persistence API JPA Java Persistence API Introduction The Java Persistence API provides an object/relational mapping facility for managing relational data in Java applications Created as part of EJB 3.0 within JSR 220

More information

Injection Of Entitymanager

Injection Of Entitymanager Injection Of Entitymanager Example injection-of-entitymanager can be browsed at https://github.com/apache/tomee/tree/master/examples/injection-ofentitymanager This example shows use of @PersistenceContext

More information

Apache OpenJPA. Bean Validation Integration in JPA 2.0. July 17, Copyright 2009, The Apache Software Foundation

Apache OpenJPA.  Bean Validation Integration in JPA 2.0. July 17, Copyright 2009, The Apache Software Foundation Apache OpenJPA http://openjpa.apache.org/ Bean Validation Integration in JPA 2.0 July 17, 2009 Copyright 2009, The Apache Software Foundation Legal This presentation is based on Early Access levels of

More information

Refactoring to Seam. NetBeans. Brian Leonard Sun Microsystems, Inc. 14o

Refactoring to Seam. NetBeans. Brian Leonard Sun Microsystems, Inc. 14o Refactoring to Seam NetBeans Brian Leonard Sun Microsystems, Inc. 14o AGENDA 2 > The Java EE 5 Programming Model > Introduction to Seam > Refactor to use the Seam Framework > Seam Portability > Q&A Java

More information

Java Persistence API (JPA) Entities

Java Persistence API (JPA) Entities Java Persistence API (JPA) Entities JPA Entities JPA Entity is simple (POJO) Java class satisfying requirements of JavaBeans specification Setters and getters must conform to strict form Every entity must

More information

Java- EE Web Application Development with Enterprise JavaBeans and Web Services

Java- EE Web Application Development with Enterprise JavaBeans and Web Services Java- EE Web Application Development with Enterprise JavaBeans and Web Services Duration:60 HOURS Price: INR 8000 SAVE NOW! INR 7000 until December 1, 2011 Students Will Learn How to write Session, Message-Driven

More information

Session 13. Reading. A/SettingUpJPA.htm JPA Best Practices

Session 13. Reading.  A/SettingUpJPA.htm JPA Best Practices Session 13 DB Persistence (JPA) Reading Reading Java EE 7 Tutorial chapters 37-39 NetBeans/Derby Tutorial www.oracle.com/webfolder/technetwork/tutorials/obe/java/settingupjp A/SettingUpJPA.htm JPA Best

More information

Exploring EJB3 With JBoss Application Server Part 6.2

Exploring EJB3 With JBoss Application Server Part 6.2 By Swaminathan Bhaskar 01/24/2009 Exploring EJB3 With JBoss Application Server Part 6.2 In this part, we will continue to explore Entity Beans Using Java Persistence API (JPA). Thus far, we have seen examples

More information

object/relational persistence What is persistence? 5

object/relational persistence What is persistence? 5 contents foreword to the revised edition xix foreword to the first edition xxi preface to the revised edition xxiii preface to the first edition xxv acknowledgments xxviii about this book xxix about the

More information

J2EE - Version: 25. Developing Enterprise Applications with J2EE Enterprise Technologies

J2EE - Version: 25. Developing Enterprise Applications with J2EE Enterprise Technologies J2EE - Version: 25 Developing Enterprise Applications with J2EE Enterprise Technologies Developing Enterprise Applications with J2EE Enterprise Technologies J2EE - Version: 25 5 days Course Description:

More information

CO Java EE 6: Develop Database Applications with JPA

CO Java EE 6: Develop Database Applications with JPA CO-77746 Java EE 6: Develop Database Applications with JPA Summary Duration 4 Days Audience Database Developers, Java EE Developers Level Professional Technology Java EE 6 Delivery Method Instructor-led

More information

JVA-163. Enterprise JavaBeans

JVA-163. Enterprise JavaBeans JVA-163. Enterprise JavaBeans Version 3.0.2 This course gives the experienced Java developer a thorough grounding in Enterprise JavaBeans -- the Java EE standard for scalable, secure, and transactional

More information

= "categories") 1 public class Category implements java.io.serializable { 2 private static final long serialversionuid = 1L;

= categories) 1 public class Category implements java.io.serializable { 2 private static final long serialversionuid = 1L; @Entity @Table(name = "categories") 1 public class Category implements java.io.serializable { 2 private static final long serialversionuid = 1L; @Id @GeneratedValue 3 private Long id; 4 private String

More information

Author: Chen, Nan Date: Feb 18, 2010

Author: Chen, Nan Date: Feb 18, 2010 Migrate a JEE6 Application with JPA 2.0, EJB 3.1, JSF 2.0, and Servlet 3.0 from Glassfish v3 to WebSphere Application Server v8 Author: Chen, Nan nanchen@cn.ibm.com Date: Feb 18, 2010 2010 IBM Corporation

More information

Web Application Development Using JEE, Enterprise JavaBeans and JPA

Web Application Development Using JEE, Enterprise JavaBeans and JPA Web Application Development Using JEE, Enterprise Java and JPA Duration: 5 days Price: $2795 *California residents and government employees call for pricing. Discounts: We offer multiple discount options.

More information

Web Application Development Using JEE, Enterprise JavaBeans and JPA

Web Application Development Using JEE, Enterprise JavaBeans and JPA Web Application Development Using JEE, Enterprise Java and JPA Duration: 35 hours Price: $750 Delivery Option: Attend training via an on-demand, self-paced platform paired with personal instructor facilitation.

More information

Apache OpenWebBeans and DeltaSpike Deep Dive Mark Struberg Gerhard Petracek

Apache OpenWebBeans and DeltaSpike Deep Dive Mark Struberg Gerhard Petracek CDI @ Apache OpenWebBeans and DeltaSpike Deep Dive Mark Struberg Gerhard Petracek Agenda CDI and its terms Why OpenWebBeans? Portable CDI Extensions CDI by example with DeltaSpike CDI is a... JCP specification

More information

Java EE 7: Back-End Server Application Development

Java EE 7: Back-End Server Application Development Oracle University Contact Us: Local: 0845 777 7 711 Intl: +44 845 777 7 711 Java EE 7: Back-End Server Application Development Duration: 5 Days What you will learn The Java EE 7: Back-End Server Application

More information

Monday, November 21, 2011

Monday, November 21, 2011 Hibernate Puzzlers Patrycja Wegrzynowicz CTO of Yonita, Inc. About Me 10+ years of professional experience as software developer, architect, and head of software R&D PhD in Computer Science Patterns and

More information

5/2/2017. The entity manager. The entity manager. Entities lifecycle and manipulation

5/2/2017. The entity manager. The entity manager. Entities lifecycle and manipulation Entities lifecycle and manipulation Software Architectures and Methodologies - JPA: Entities lifecycle and manipulation Dipartimento di Ingegneria dell'informazione Laboratorio Tecnologie del Software

More information

Java Persistence API. Patrick Linskey EJB Team Lead BEA Systems Oracle

Java Persistence API. Patrick Linskey EJB Team Lead BEA Systems Oracle Java Persistence API Patrick Linskey EJB Team Lead BEA Systems Oracle plinskey@bea.com Patrick Linskey EJB Team Lead at BEA JPA 1, 2 EG Member Agenda JPA Basics What s New ORM Configuration APIs Queries

More information

JPA. Java persistence API

JPA. Java persistence API JPA Java persistence API JPA Entity classes JPA Entity classes are user defined classes whose instances can be stored in a database. JPA Persistable Types The term persistable types refers to data types

More information

Java EE Application Assembly & Deployment Packaging Applications, Java EE modules. Model View Controller (MVC)2 Architecture & Packaging EJB Module

Java EE Application Assembly & Deployment Packaging Applications, Java EE modules. Model View Controller (MVC)2 Architecture & Packaging EJB Module Java Platform, Enterprise Edition 5 (Java EE 5) Core Java EE Java EE 5 Platform Overview Java EE Platform Distributed Multi tiered Applications Java EE Web & Business Components Java EE Containers services

More information

How to Develop a Simple Crud Application Using Ejb3 and Web Dynpro

How to Develop a Simple Crud Application Using Ejb3 and Web Dynpro How to Develop a Simple Crud Application Using Ejb3 and Web Dynpro Applies to: SAP Web Dynpro Java 7.1 SR 5. For more information, visit the User Interface Technology homepage. Summary The objective of

More information

Exploring EJB3 With JBoss Application Server Part 6.3

Exploring EJB3 With JBoss Application Server Part 6.3 By Swaminathan Bhaskar 02/07/2009 Exploring EJB3 With JBoss Application Server Part 6.3 In this part, we will continue to explore Entity Beans Using Java Persistence API (JPA). In the previous part, we

More information

<Insert Picture Here> Productive JavaEE 5.0 Development

<Insert Picture Here> Productive JavaEE 5.0 Development Productive JavaEE 5.0 Development Frank Nimphius Principle Product Manager Agenda Introduction Annotations EJB 3.0/JPA Dependency Injection JavaServer Faces JAX-WS Web Services Better

More information

CO Java EE 7: Back-End Server Application Development

CO Java EE 7: Back-End Server Application Development CO-85116 Java EE 7: Back-End Server Application Development Summary Duration 5 Days Audience Application Developers, Developers, J2EE Developers, Java Developers and System Integrators Level Professional

More information

ENTERPRISE JAVABEANS TM (EJB TM ) 3.1 TECHNOLOGY

ENTERPRISE JAVABEANS TM (EJB TM ) 3.1 TECHNOLOGY ENTERPRISE JAVABEANS TM (EJB TM ) 3.1 TECHNOLOGY Kenneth Saks Senior Staff Engineer SUN Microsystems TS-5343 Learn what is planned for the next version of Enterprise JavaBeans (EJB ) technology 2008 JavaOne

More information

Exam Questions 1Z0-895

Exam Questions 1Z0-895 Exam Questions 1Z0-895 Java Platform, Enterprise Edition 6 Enterprise JavaBeans Developer Certified Expert Exam https://www.2passeasy.com/dumps/1z0-895/ QUESTION NO: 1 A developer needs to deliver a large-scale

More information

JSR 299: Web Beans. Web Beans Expert Group. Version: Public Review

JSR 299: Web Beans. Web Beans Expert Group. Version: Public Review JSR 299: Web Beans Web Beans Expert Group Version: Public Review Table of Contents 1. Architecture... 1 1.1. Contracts... 1 1.2. Supported environments... 1 1.3. Relationship to other specifications...

More information

Developing Applications with Java EE 6 on WebLogic Server 12c

Developing Applications with Java EE 6 on WebLogic Server 12c Developing Applications with Java EE 6 on WebLogic Server 12c Duration: 5 Days What you will learn The Developing Applications with Java EE 6 on WebLogic Server 12c course teaches you the skills you need

More information

WHAT IS EJB. Security. life cycle management.

WHAT IS EJB. Security. life cycle management. EJB WHAT IS EJB EJB is an acronym for enterprise java bean. It is a specification provided by Sun Microsystems to develop secured, robust and scalable distributed applications. To run EJB application,

More information

Introduction to CDI Contexts and Dependency Injection

Introduction to CDI Contexts and Dependency Injection Introduction to CDI CDI overview A set of interlocking functionality: typesafe dependency injection, contextual lifecycle management for injectable objects, events interceptors, decorators, Based around

More information

Courses For Event Java Advanced Summer Training 2018

Courses For Event Java Advanced Summer Training 2018 Courses For Event Java Advanced Summer Training 2018 Java Fundamentals Oracle Java SE 8 Advanced Java Training Java Advanced Expert Edition Topics For Java Fundamentals Variables Data Types Operators Part

More information

Fun with EJB and OpenEJB. David #OpenEJB

Fun with EJB and OpenEJB. David #OpenEJB Fun with EJB and OpenEJB David Blevins @dblevins #OpenEJB The Basics - History Timeline 1999 - Founded in Exoffice - EJB 1.1 level 2001 - Integrated in Apple s WebObjects 2002 - Moved to SourceForge 2003

More information

ITcertKing. The latest IT certification exam materials. IT Certification Guaranteed, The Easy Way!

ITcertKing.  The latest IT certification exam materials. IT Certification Guaranteed, The Easy Way! ITcertKing The latest IT certification exam materials http://www.itcertking.com IT Certification Guaranteed, The Easy Way! Exam : 1Z0-860 Title : Java Enterprise Edition 5 Business Component Developer

More information

Information systems modelling UML and service description languages

Information systems modelling UML and service description languages Internet Engineering Tomasz Babczyński, Zofia Kruczkiewicz Tomasz Kubik Information systems modelling UML and service description languages Laboratory 4 Design patterns used to build the Integration nad

More information

Class, Variable, Constructor, Object, Method Questions

Class, Variable, Constructor, Object, Method Questions Class, Variable, Constructor, Object, Method Questions http://www.wideskills.com/java-interview-questions/java-classes-andobjects-interview-questions https://www.careerride.com/java-objects-classes-methods.aspx

More information

Holon Platform JPA Datastore Module - Reference manual. Version 5.2.1

Holon Platform JPA Datastore Module - Reference manual. Version 5.2.1 Holon Platform JPA Datastore Module - Reference manual Version 5.2.1 Table of Contents 1. Introduction.............................................................................. 1 1.1. Sources and contributions.............................................................

More information

Sun_RealExamQuestions.Com_ _v _197q_By-Scott

Sun_RealExamQuestions.Com_ _v _197q_By-Scott Sun_RealExamQuestions.Com_310-091_v2011-11-08_197q_By-Scott Number: 310-091 Passing Score: 590 Time Limit: 145 min File Version: 2011-11-08 Exam : Sun 310-091 Version : 2011-11-08 Questions : 197 If you

More information

Seam 3. Pete Muir JBoss, a Division of Red Hat

Seam 3. Pete Muir JBoss, a Division of Red Hat Seam 3 Pete Muir JBoss, a Division of Red Hat Road Map Introduction Java EE 6 Java Contexts and Dependency Injection Seam 3 Mission Statement To provide a fully integrated development platform for building

More information

TheServerSide.com. Part 3 of dependency injection in Java EE 6

TheServerSide.com. Part 3 of dependency injection in Java EE 6 TheServerSide.com Part 3 of dependency injection in Java EE 6 This series of articles introduces Contexts and Dependency Injection for Java EE (CDI), a key part of the Java EE 6 platform. Standardized

More information

Developing Java EE 5 Applications from Scratch

Developing Java EE 5 Applications from Scratch Developing Java EE 5 Applications from Scratch Copyright Copyright 2006 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without

More information

Deployment. See Packaging and deployment processes

Deployment. See Packaging and deployment processes Index A Address instance, 85 Aggregate average response time (AART), 282 Application assembler, deployment roles external requirements conflict and redundant, 343 dependencies, 341 references, 341 342

More information

Introduction to Java Enterprise Edition For Database Application Developer

Introduction to Java Enterprise Edition For Database Application Developer CMP 420/758 Introduction to Java Enterprise Edition For Database Application Developer Department of Mathematics and Computer Science Lehman College, the CUNY 1 Java Enterprise Edition Developers today

More information

Dynamic DAO Implementation

Dynamic DAO Implementation Dynamic DAO Implementation Example dynamic-dao-implementation can be browsed at https://github.com/apache/tomee/tree/master/examples/dynamic-daoimplementation Many aspects of Data Access Objects (DAOs)

More information

Spring Framework 2.0 New Persistence Features. Thomas Risberg

Spring Framework 2.0 New Persistence Features. Thomas Risberg Spring Framework 2.0 New Persistence Features Thomas Risberg Introduction Thomas Risberg Independent Consultant, springdeveloper.com Committer on the Spring Framework project since 2003 Supporting the

More information

COE318 Lecture Notes Week 10 (Nov 7, 2011)

COE318 Lecture Notes Week 10 (Nov 7, 2011) COE318 Software Systems Lecture Notes: Week 10 1 of 5 COE318 Lecture Notes Week 10 (Nov 7, 2011) Topics More about exceptions References Head First Java: Chapter 11 (Risky Behavior) The Java Tutorial:

More information

Advanced Web Systems 9- Hibernate annotations, Spring integration, Aspect Oriented Programming. A. Venturini

Advanced Web Systems 9- Hibernate annotations, Spring integration, Aspect Oriented Programming. A. Venturini Advanced Web Systems 9- Hibernate annotations, Spring integration, Aspect Oriented Programming A. Venturini Contents Hibernate Core Classes Hibernate and Annotations Data Access Layer with Spring Aspect

More information

Oracle EXAM - 1Z Java EE 6 Enterprise JavaBeans Developer Certified Expert Exam. Buy Full Product.

Oracle EXAM - 1Z Java EE 6 Enterprise JavaBeans Developer Certified Expert Exam. Buy Full Product. Oracle EXAM - 1Z0-895 Java EE 6 Enterprise JavaBeans Developer Certified Expert Exam Buy Full Product http://www.examskey.com/1z0-895.html Examskey Oracle 1Z0-895 exam demo product is here for you to test

More information

Business-Driven Software Engineering (6.Vorlesung) Bean Interaction, Configuration, Transactions, Security Thomas Gschwind <thg at zurich.ibm.

Business-Driven Software Engineering (6.Vorlesung) Bean Interaction, Configuration, Transactions, Security Thomas Gschwind <thg at zurich.ibm. Business-Driven Software Engineering (6.Vorlesung) Bean Interaction, Configuration, Transactions, Security Thomas Gschwind Agenda Bean Interaction and Configuration Bean Lookup

More information

Topics. Advanced Java Programming. Transaction Definition. Background. Transaction basics. Transaction properties

Topics. Advanced Java Programming. Transaction Definition. Background. Transaction basics. Transaction properties Advanced Java Programming Transactions v3 Based on notes by Wayne Brooks & Monson-Haefel, R Enterprise Java Beans 3 rd ed. Topics Transactions background Definition, basics, properties, models Java and

More information

<Insert Picture Here> Exploring Java EE 6 The Programming Model Explained

<Insert Picture Here> Exploring Java EE 6 The Programming Model Explained Exploring Java EE 6 The Programming Model Explained Lee Chuk Munn chuk-munn.lee@oracle.com The following is intended to outline our general product direction. It is intended for information

More information

Java EE Architecture, Part Three. Java EE architecture, part three 1(24)

Java EE Architecture, Part Three. Java EE architecture, part three 1(24) Java EE Architecture, Part Three Java EE architecture, part three 1(24) Content Requirements on the Integration layer The Database Access Object, DAO Pattern JPA Performance Issues Java EE architecture,

More information

Object-Relational Mapping is NOT serialization! You can perform queries on each field!

Object-Relational Mapping is NOT serialization! You can perform queries on each field! ORM Object-Relational Mapping is NOT serialization! You can perform queries on each field! Using hibernate stand-alone http://www.hibernatetutorial.com/ Introduction to Entities The Sun Java Data Objects

More information

PATTERNS & BEST PRACTICES FOR CDI

PATTERNS & BEST PRACTICES FOR CDI PATTERNS & BEST PRACTICES FOR CDI SESSION 20181 Ryan Cuprak e-formulation Analyst, Author, Connecticut Java Users Group President Reza Rahman Resin Developer, Java EE/EJB/JMS JCP expert, Author EJB 3 in

More information

Enterprise JavaBeans. Layer:03. Session

Enterprise JavaBeans. Layer:03. Session Enterprise JavaBeans Layer:03 Session Agenda Build stateless & stateful session beans. Describe the bean's lifecycle. Describe the server's swapping mechanism. Last Revised: 10/2/2001 Copyright (C) 2001

More information

New Features in EJB 3.1

New Features in EJB 3.1 New Features in EJB 3.1 Sangeetha S E-Commerce Research Labs, Infosys Technologies Limited 2010 Infosys Technologies Limited Agenda New Features in EJB 3.1 No Interface View EJB Components in WAR Singleton

More information

Thu 10/26/2017. Created RESTful Web Service, JavaDB, Java Persistence API, Glassfish server in NetBeans 8

Thu 10/26/2017. Created RESTful Web Service, JavaDB, Java Persistence API, Glassfish server in NetBeans 8 Created RESTful Web Service, JavaDB, Java Persistence API, Glassfish server in NetBeans 8 1 tutorial at http://www.oracle.com/webfolder/technetwork/tutorials/obe/java/restfulwebservices/restfulwebservices.htm

More information

OCP JavaEE 6 EJB Developer Study Notes

OCP JavaEE 6 EJB Developer Study Notes OCP JavaEE 6 EJB Developer Study Notes by Ivan A Krizsan Version: April 8, 2012 Copyright 2010-2012 Ivan A Krizsan. All Rights Reserved. 1 Table of Contents Table of Contents... 2 Purpose... 9 Structure...

More information

Transactions and Transaction Managers

Transactions and Transaction Managers Transactions and Transaction Managers There are many transactional resources Databases Messaging middleware As programmers, we want abstract transactions: we do not want to deal with some transaction API

More information

Apache OpenJPA User's Guide

Apache OpenJPA User's Guide Apache OpenJPA User's Guide Apache OpenJPA User's Guide 1. Introduction 1 1. OpenJPA.. 3 1.1. About This Document. 3 2. Java Persistence API 4 1. Introduction. 9 1.1. Intended Audience 9 1.2. Lightweight

More information

Testing Transactions BMT

Testing Transactions BMT Testing Transactions BMT Example testing-transactions-bmt can be browsed at https://github.com/apache/tomee/tree/master/examples/testing-transactions-bmt Shows how to begin, commit and rollback transactions

More information

What data persistence means? We manipulate data (represented as object state) that need to be stored

What data persistence means? We manipulate data (represented as object state) that need to be stored 1 Data Persistence What data persistence means? We manipulate data (represented as object state) that need to be stored persistently to survive a single run of the application queriably to be able to retrieve/access

More information

Apache TomEE Tomcat with a kick

Apache TomEE Tomcat with a kick Apache TomEE Tomcat with a kick David Blevins dblevins@apache.org @dblevins Jonathan Gallimore jgallimore@apache.org @jongallimore Apache TomEE: Overview Java EE 6 Web Profile certification in progress

More information

Table of Contents EJB 3.1 and JPA 2

Table of Contents EJB 3.1 and JPA 2 Table of Contents EJB 3.1 and JPA 2 Enterprise JavaBeans and the Java Persistence API 1 Workshop Overview 2 Workshop Objectives 3 Workshop Agenda 4 Course Prerequisites 5 Labs 6 Session 1: Introduction

More information

Magento Technical Guidelines

Magento Technical Guidelines Magento Technical Guidelines Eugene Shakhsuvarov, Software Engineer @ Magento 2018 Magento, Inc. Page 1 Magento 2 Technical Guidelines Document which describes the desired technical state of Magento 2

More information