SlideShare uma empresa Scribd logo
1 de 54
Baixar para ler offline
1
About	
  me	
  
3	
  
Eugene	
  Fedorenko	
  
	
  
Master	
  principal	
  R&D	
  architect	
  
adfprac=ce-­‐fedor.blogspot.com	
  
@fisbudo	
  
	
  
	
  
	
  
	
  
	
  
The	
  Briefing	
  
4	
  
ADF BC Transaction
Shared Transaction
Transaction Commit Cycle
ADF BC Save Points
ADF Model Transaction
Data Control Frame
Programmatic Approach
Q&A
Data Control Scope
Task Flow Transaction Options
Transaction Definition
5	
  
Transac=on	
  
Ø  A logical unit-of-work with a start and end
Ø  Must be entirely completed or aborted
Ø  If the start state is valid, the end state is valid
Ø  Is not affected by and does not affect any other transaction
Ø  State management of uncommitted changes
6	
  
7	
  
ADF	
  Business	
  Components	
  
ADF	
  Faces	
  
ADF	
  Task	
  Flows	
  
ADF	
  Data	
  Controls	
  /	
  ADF	
  Bindings	
  
DB	
  
Transac=on	
  Management	
  in	
  Oracle	
  ADF	
  
Giant	
  Stride	
  Entry	
  
8	
  
The	
  Briefing	
  
9	
  
ADF BC Transaction
Shared Transaction
Transaction Commit Cycle
ADF BC Save Points
ADF Model Transaction
Data Control Frame
Programmatic Approach
Q&A
Data Control Scope
Task Flow Transaction Options
Transaction Definition
Oracle	
  ADF	
  BC	
  Revisited	
  
10	
  
View	
  Object	
  
	
  
Nested	
  Applica?on	
  Module	
  
	
  
	
  
En?ty	
  Object	
  
	
  
DB	
  Transac=on	
  Object	
  
11	
  
JDBC	
  Connec?on	
  
DB	
  
View	
  Object	
  
	
  
Nested	
  Applica?on	
  Module	
  
	
  
	
  
En?ty	
  Object	
  
	
  
	
  
	
  
Shared	
  Transac=on	
  
12	
  
JDBC	
  Connec?on	
  
DB	
  
View	
  Object	
  
	
  
En?ty	
  Object	
  
	
  
	
  
	
  
View	
  Object	
   View	
  Object	
  
Ø  Based on jbo.shared.txn property
Ø  Designed for shared Application Modules
Ø  Used for not-shared root AMs to reduce number of DB
connections	
  
Shared	
  Transac=on	
  
13	
  
The	
  Briefing	
  
14	
  
ADF BC Transaction
Shared Transaction
Transaction Commit Cycle
ADF BC Save Points
ADF Model Transaction
Data Control Frame
Programmatic Approach
Q&A
Data Control Scope
Task Flow Transaction Options
Transaction Definition
Ø  Validation Listener List
Ø  Entities for validation
Ø  Transaction Post Listener List
Ø  Dirty entities
Ø  Transaction Listener List
Ø  AMs and entities listening to commit phase
	
  
DB	
  Transac=on	
  Listeners	
  
15	
  
16	
  
	
  
DB	
  Transac?on	
  
	
  
Commit	
  Cycle	
  
	
  
AM	
  
	
  
	
  
En?ty	
  
	
  Commit	
  
beforeValidate	
  
validate	
  
aFerValidate	
  
postChanges	
  
lock	
  
prepareForDML	
  
doDML	
  
beforeCommit	
  
doCommit	
  
beforeCommit	
  
aFerCommit	
  
aFerCommit	
  
Ø  Validation
Ø  Raises validation exception
Ø  Post Changes
Ø  Rollbacks DB to savepoint
Ø  Restores state of posted entities
Ø  Raises an exception
Ø  Before Commit or Commit
Ø  Rollbacks DB to savepoint
Ø  Raises an exception
Ø  Does not restore state of posted entities by default
	
  
Failure	
  at	
  Commit	
  Cycle	
  
17	
  
Ø  Validation logic in beforeCommit method
Ø  Deferrable constraints
Ø  jbo.txn.handleafterpostexc = true
Ø  Forces in memory passivation snapshot
Ø  Activation of all AMs with all VO instances
Error	
  at	
  Commit	
  phase	
  
18	
  
	
  public	
  void	
  beforeCommit(Transac?onEvent	
  e)	
  {	
  
	
  	
  	
  	
  if	
  (	
  !isDataValid()	
  )	
  
	
  	
  	
  	
  	
  	
  	
  throw	
  new	
  Valida?onExcep?on(VALIDATION_EXCEPTION);	
  
	
  	
  }	
  
CONSTRAINT	
  "CK_DIVEBOAT_WIDTH"	
  CHECK	
  (WIDTH<5)	
  
DEFERRABLE	
  INITIALLY	
  DEFERRED	
  
The	
  Briefing	
  
19	
  
ADF BC Transaction
Shared Transaction
Transaction Commit Cycle
ADF BC Save Points
ADF Model Transaction
Data Control Frame
Programmatic Approach
Q&A
Data Control Scope
Task Flow Transaction Options
Transaction Definition
Ø  Invoke a PL/SQL procedure
Ø  Modify entity attributes
Ø  Invoke another PL/SQL procedure
Ø  Commit the transaction
	
  
	
  public	
  class	
  AppModuleImpl	
  extends	
  Applica?onModuleImpl	
  {	
  
	
  
	
  	
  public	
  void	
  someBusinessServiceMethod()	
  {	
  	
  	
  
	
  	
  	
  	
  	
  	
  invokePLSQLProcedure1();	
  	
  	
  
	
  	
  	
  	
  	
  	
  modifySomeA^ributes();	
  	
  	
  
	
  	
  	
  	
  	
  	
  invokePLSQLProcedure2();	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  	
  	
  	
  	
  	
  getDBTransac?on().commit();	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  	
  	
  }	
  	
  
Business	
  Service	
  Method	
  
20	
  
Ø  passivateStateForUndo
Ø  Makes a snapshot with AM’s state
Ø  activateStateForUndo
Ø  Restores AM’s state from snapshot
Ø  Rollbacks the transaction
	
  public	
  class	
  AppModuleImpl	
  extends	
  Applica?onModuleImpl	
  {	
  
	
  
	
  	
  private	
  String	
  passivateStateForUndo()	
  {	
  	
  	
  
	
  	
  	
  	
  	
  	
  String	
  savePoint	
  =	
  super.passivateStateForUndo(null,	
  null,	
  PASSIVATE_UNDO_FLAG);	
  	
  	
  
	
  	
  	
  	
  	
  	
  return	
  savePoint;	
  	
  	
  
	
  	
  	
  }	
  	
  
	
  
	
  	
  private	
  void	
  ac?vateStateForUndo(String	
  savePointId)	
  {	
  	
  	
  
	
  	
  	
  	
  	
  	
  	
  super.ac?vateStateForUndo(savePointId,	
  	
  ACTIVATE_UNDO_FLAG);	
  	
  	
  	
  	
  	
  
	
  	
  	
  }	
  	
  	
  
	
  
Managing	
  Savepoints	
  with	
  ADF	
  BC	
  
21	
  
 
	
  public	
  class	
  AppModuleImpl	
  extends	
  Applica?onModuleImpl	
  {	
  
	
  
	
  public	
  void	
  someBusinessServiceMethod()	
  {	
  	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  String	
  spid	
  =	
  passivateStateForUndo();	
  	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  try	
  {	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  invokePLSQLProcedure1();	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  modifySomeA^ributes();	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  invokePLSQLProcedure2();	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  getDBTransac?on().commit();	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  }	
  catch	
  (Run?meExcep?on	
  e)	
  {	
  	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  ac=vateStateForUndo(spid);	
  	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  throw	
  new	
  JboExcep?on(e);	
  	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  }	
  	
  	
  
	
  	
  	
  	
  }	
  	
  	
  
Managing	
  Savepoints	
  with	
  ADF	
  BC	
  
22	
  
The	
  Briefing	
  
23	
  
ADF BC Transaction
Shared Transaction
Transaction Commit Cycle
ADF BC Save Points
ADF Model Transaction
Data Control Frame
Programmatic Approach
Q&A
Data Control Scope
Task Flow Transaction Options
Transaction Definition
Oracle	
  ADF	
  Model	
  
24	
  
ADF	
  Faces	
  
ADF	
  Bindings	
  
DB	
  
ADF	
  Data	
  Controls	
  
ADF	
  Task	
  Flows	
  
ADF	
  Business	
  Components	
  
Ø  ADF BC
Ø  EJB
Ø  Bean
Ø  WebService (SOAP/REST)
Ø  URL
Ø  JMX
Ø  BAM
Ø  Placeholder
Ø  Custom Data Controls
	
  
	
  
	
  
ADF	
  Data	
  Controls	
  
25	
  
Mul=ple	
  Data	
  Controls	
  
26	
  
REST	
  API	
  
DB	
  
ADF	
  BC	
  
Global	
  Divers	
  
Accommoda?on
Data	
  Control	
  Frame	
  
27	
  
REST	
  API	
  
DB	
  
ADF	
  BC	
  
Data	
  Control	
  Frame	
  
Global	
  Divers	
  
Accommoda?on
BC	
  Data	
  Control	
  
REST	
  Data	
  Control	
  
Transac=on	
  
Oracle	
  ADF	
  Controller	
  
28	
  
ADF	
  Faces	
  
	
  
ADF	
  Bindings	
  
	
  
DB	
  
ADF	
  Data	
  Controls	
  
ADF	
  Task	
  Flows	
  
ADF	
  Business	
  Components	
  
 
	
  
	
  
Task	
  Flow	
  
29	
  
 
	
  
	
  
Task	
  Flow	
  Transac=on	
  Op=ons	
  
30	
  
Ø  Shared Data Control Frame
Ø  Data Control Instance (same type & name)
Ø AM instance
Ø VO instances
Ø  Transaction Handler
Ø DB Transaction Object
Ø DB Connection
Ø Entity Cache
Ø  Default Option for BTF
	
  
	
  
Shared	
  Data	
  Control	
  Scope	
  
31	
  
Ø  Isolated Data Control Frame
Ø  Data Control Instance (same type & name)
Ø AM instance
Ø VO instances
Ø  Transaction Handler
Ø DB Transaction Object
Ø DB Connection
Ø Entity Cache
Ø  Always for UTF
	
  
	
  
Isolated	
  Data	
  Control	
  Scope	
  
32	
  
The	
  Briefing	
  
33	
  
ADF BC Transaction
Shared Transaction
Transaction Commit Cycle
ADF BC Save Points
ADF Model Transaction
Data Control Frame
Programmatic Approach
Q&A
Data Control Scope
Task Flow Transaction Options
Transaction Definition
Data	
  Control	
  Frame	
  #1	
  
Data	
  Control	
  Frames	
  
34	
  
Main.jspx	
  
UTF	
  
Menu	
  
BTF	
  
Data	
  Control	
  Frame	
  #2	
  
Divers	
  
BTF	
  
Log	
  Book	
  
Record	
  
BTF	
  
Data	
  Control	
  Frame	
  #3	
  
Dive	
  Sites	
  
BTF	
  
 
Task	
  Flow	
  Transac=on	
  Op=ons	
  
35	
  
	
  	
  	
  	
  	
  <transac?on>	
  
	
  	
  	
  	
  	
  	
  	
  	
  <new-­‐transac?on/>	
  
	
  	
  	
  	
  	
  </transac?on>	
  	
  
	
  
Ø  Starts a new transaction on Data Control Frame
Ø  Supports Both Data Control Scopes
Ø  Isolated
Ø  Shared
Ø Called from UTF
Ø The caller has ”No Controller Transaction”
Ø  Must Finish the Transaction
	
  
	
  
Always	
  Begin	
  New	
  Transac=on	
  (new-­‐transac=on)	
  
36	
  
Ø  Only Transaction starter can finish it
Ø  Always Begin New Transaction
Ø  Use Existing Transaction if Possible (no caller’s transaction)
	
  
	
  
Commit	
  and	
  Rollback	
  on	
  Return	
  
37	
  
38	
  
	
  
Data	
  Control	
  Frame	
  
	
  
Task	
  Flow	
  Commit	
  
	
  
Transac?on	
  
	
  
	
  
Data	
  Control	
  
	
  Commit	
  
commit	
  
commitTransac?on	
  
commit	
  
	
  
DB	
  Transac?on	
  
	
  
For	
  each	
  data	
  control	
  
Ø  Prematurely Terminated Task Flow
Ø  Finished not via return activities
Ø  Task Flow’s container is not rendered anymore
Ø  Has been refreshed by the parent
Ø  Task Flow owns the transaction
Ø  Auto-rollback behavior
	
  
	
  
Prematurely	
  Terminated	
  Transac=on	
  
39	
  
The	
  Briefing	
  
40	
  
ADF BC Transaction
Shared Transaction
Transaction Commit Cycle
ADF BC Save Points
ADF Model Transaction
Data Control Frame
Programmatic Approach
Q&A
Data Control Scope
Task Flow Transaction Options
Transaction Definition
Ø  Joins an existing transaction
Ø  Supports Only Shared Data Control Scope
Ø  Isolated is disabled
Ø  Can not Finish the Transaction
	
  
	
  
Always	
  Use	
  Exis=ng	
  Transac=on	
  (requires-­‐exis=ng-­‐transac=on)	
  
41	
  
Ø  Created by default when shared transaction is reused
Ø  Used to restore model state on task flow exit
Ø  ”No Save Point on Task Flow Entry” to prevent creation
	
  
	
  
Task	
  Flow	
  Save	
  Points	
  
42	
  
Ø  Root AM requires a dedicated DB connection
Ø  Parent and Child Task Flows should share Transaction
Ø  Too many DB connections for multi-root-AMs application
	
  
	
  
Root	
  AM	
  Connec=on	
  Challenge	
  
43	
  
Divers	
  VO	
   Log	
  Book	
  VO	
  
Divers Root AM Log Book Root AM
Log Book Record BTFDivers BTF
Ø  Root AMs refer to the same data source
Ø  Task Flows use Transaction Options
Ø  Any but <No Controller Transaction>
Ø  Value for jbo.shared.txn is generated
Ø  Transaction is shared
	
  
	
  
Root	
  AM	
  Connec=on	
  Sharing	
  
44	
  
JDBC	
  Connec?on	
  
Divers	
  VO	
  
	
  
	
  
Log	
  Book	
  VO	
  
Divers Root AM Log Book Root AM
The	
  Briefing	
  
45	
  
ADF BC Transaction
Shared Transaction
Transaction Commit Cycle
ADF BC Save Points
ADF Model Transaction
Data Control Frame
Programmatic Approach
Q&A
Data Control Scope
Task Flow Transaction Options
Transaction Definition
Ø  Dynamic transaction option
Ø  Isolated Data Control Scope
Ø  Always Begin New Transaction
Ø  Shared Data Control Scope
Ø There is open transaction
Ø  Always Use Existing Transaction
Ø There is No open transaction
Ø  Always Begin New Transaction
	
  
	
  
Use	
  Exis=ng	
  Transac=on	
  if	
  Possible	
  (requires-­‐transac=on)	
  
46	
  
Ø  Switches Off controller transaction management
Ø  Does not start a transaction on task flow entry
Ø  Does not create a save point on task flow entry
Ø  Does not restore to save point
Ø  Does not rollback or commit transaction
	
  
	
  
No	
  Controller	
  Transac=on	
  
47	
  
Ø  Get current binding context
Ø  Get current Data Control Frame
Ø  Start a new transaction on the frame
	
  
	
  public	
  void	
  startTransac?on()	
  {	
  
	
  	
  	
  	
  BindingContext	
  context	
  =	
  BindingContext.getCurrent();	
  
	
  	
  	
  	
  	
  	
  
	
  	
  	
  	
  	
  //Get	
  the	
  name	
  of	
  Data	
  Control	
  Frame	
  
	
  	
  	
  	
  String	
  dcFrameName	
  =	
  context.getCurrentDataControlFrame();	
  
	
  	
  	
  	
  	
  //Get	
  Data	
  Control	
  Frame	
  
	
  	
  	
  	
  DataControlFrame	
  dcFrame	
  =	
  context.findDataControlFrame(dcFrameName);	
  
	
  	
  	
  	
  	
  
	
  	
  	
  	
  	
  //Start	
  Transac?on	
  
	
  	
  	
  	
  dcFrame.beginTransac?on(new	
  Transac?onProper?es());	
  
	
  	
  }	
  
	
  
	
  
	
  
Start	
  a	
  Transac=on	
  
48	
  
Ø  Get current binding context
Ø  Get current Data Control Frame
Ø  Commit or Rollback transaction
	
  
	
  public	
  void	
  finishTransac?on()	
  {	
  
	
  	
  	
  	
  BindingContext	
  context	
  =	
  BindingContext.getCurrent();	
  	
  	
  	
  	
  	
  
	
  	
  	
  	
  	
  //Get	
  the	
  name	
  of	
  Data	
  Control	
  Frame	
  
	
  	
  	
  	
  String	
  dcFrameName	
  =	
  context.getCurrentDataControlFrame();	
  
	
  	
  	
  	
  	
  //Get	
  Data	
  Control	
  Frame	
  
	
  	
  	
  	
  DataControlFrame	
  dcFrame	
  =	
  context.findDataControlFrame(dcFrameName);	
  
	
  	
  	
  	
  	
  
	
  	
  	
  	
  	
  //Finish	
  Transac?on	
  
	
  	
  	
  	
  	
  if	
  (doRollback)	
  dcFrame.rollback();	
  
	
  	
  	
  	
  	
  	
  	
  else	
  dcFrame.commit();	
  	
  	
  
	
  
}	
  
	
  
Finish	
  a	
  Transac=on	
  
49	
  
Ø  Create Save Point
Ø  Save Save Point handle in pageFlowScope bean
Ø  Restore Save Point
	
  
	
  private	
  SavepointHandle	
  savepointHandle;	
  
	
  	
  	
  
	
  	
  public	
  void	
  createSavePoint()	
  {	
  
	
  	
  	
  	
  DataControlFrame	
  dcFrame	
  =	
  getCurrentDataControlFrame();	
  
	
  	
  	
  	
  savepointHandle	
  =	
  dcFrame.createSavepoint();	
  	
  
	
  	
  }	
  
	
  
	
  	
  public	
  void	
  restoreSavePoint()	
  {	
  
	
  	
  	
  	
  DataControlFrame	
  dcFrame	
  =	
  getCurrentDataControlFrame();	
  
	
  	
  	
  	
  dcFrame.restoreSavepoint(savepointHandle);	
  
	
  	
  }	
  
Create	
  Savepoint	
  &	
  Restore	
  to	
  Savepoint	
  
50	
  
 
	
  
	
  
CRUD	
  Task	
  Flow	
  
51	
  
Safety	
  Stop.	
  Ques=ons	
  &	
  Answers	
  
52	
  
ADF BC Transaction
Shared Transaction
Transaction Commit Cycle
ADF BC Save Points
ADF Model Transaction
Data Control Frame
Programmatic Approach
Q&A
Data Control Scope
Task Flow Transaction Options
Transaction Definition
53
Join Your Community!
Tonight from 8:00 – 10:00 in Sheraton I
ADF Monday Night Foosball
What is more fun than foosball and beer at your best
friend’s house? Well, how about a foosball tournament
with a whole bunch of friends at Kscope16? Join your
fellow ADF enthusiasts for some great networking and
friendly competition.
54

Mais conteúdo relacionado

Mais procurados

Continuous Deployment Practices, with Production, Test and Development Enviro...
Continuous Deployment Practices, with Production, Test and Development Enviro...Continuous Deployment Practices, with Production, Test and Development Enviro...
Continuous Deployment Practices, with Production, Test and Development Enviro...Amazon Web Services
 
The Play Framework at LinkedIn
The Play Framework at LinkedInThe Play Framework at LinkedIn
The Play Framework at LinkedInYevgeniy Brikman
 
WebAssembly WASM Introduction Presentation
WebAssembly WASM Introduction PresentationWebAssembly WASM Introduction Presentation
WebAssembly WASM Introduction PresentationBrad Beiermann
 
P2P Cycle -Oracle Apps
P2P Cycle -Oracle AppsP2P Cycle -Oracle Apps
P2P Cycle -Oracle AppsManu MK
 
Oracle ame complete setup
Oracle ame complete setupOracle ame complete setup
Oracle ame complete setuprahul chowdary
 
How to remove disable an oa framework personalization (doc id 304670
How to remove  disable an oa framework personalization (doc id 304670How to remove  disable an oa framework personalization (doc id 304670
How to remove disable an oa framework personalization (doc id 304670Ahmad Mkade
 
Wordpress essential training - Wordpress Presentation PPT
Wordpress essential training - Wordpress Presentation PPTWordpress essential training - Wordpress Presentation PPT
Wordpress essential training - Wordpress Presentation PPTAbdulla2410
 
WordPress Course Outline
WordPress Course OutlineWordPress Course Outline
WordPress Course OutlineIT Ki Dunya
 
Merging Newly Acquired Companies into Oracle EBS
Merging Newly Acquired Companies into Oracle EBSMerging Newly Acquired Companies into Oracle EBS
Merging Newly Acquired Companies into Oracle EBSEmtec Inc.
 
Fusion absence management explained with examples
Fusion absence management   explained with examplesFusion absence management   explained with examples
Fusion absence management explained with examplesmshabrawi
 
Building a Multi-tenanted SaaS with Node.js
Building a Multi-tenanted SaaS with Node.jsBuilding a Multi-tenanted SaaS with Node.js
Building a Multi-tenanted SaaS with Node.jsEoin Shanaghy
 
Big Data Analytics Using Hadoop Cluster On Amazon EMR
Big Data Analytics Using Hadoop Cluster  On Amazon EMRBig Data Analytics Using Hadoop Cluster  On Amazon EMR
Big Data Analytics Using Hadoop Cluster On Amazon EMRIMC Institute
 

Mais procurados (20)

Data migration
Data migrationData migration
Data migration
 
Oracle eAM - Right Fit To Oil & Gas Industries
Oracle eAM - Right Fit To Oil & Gas IndustriesOracle eAM - Right Fit To Oil & Gas Industries
Oracle eAM - Right Fit To Oil & Gas Industries
 
Multi org-r12
Multi org-r12Multi org-r12
Multi org-r12
 
Continuous Deployment Practices, with Production, Test and Development Enviro...
Continuous Deployment Practices, with Production, Test and Development Enviro...Continuous Deployment Practices, with Production, Test and Development Enviro...
Continuous Deployment Practices, with Production, Test and Development Enviro...
 
The Play Framework at LinkedIn
The Play Framework at LinkedInThe Play Framework at LinkedIn
The Play Framework at LinkedIn
 
Oracle Applications R12 Sourcing Training
Oracle Applications R12 Sourcing TrainingOracle Applications R12 Sourcing Training
Oracle Applications R12 Sourcing Training
 
WebAssembly WASM Introduction Presentation
WebAssembly WASM Introduction PresentationWebAssembly WASM Introduction Presentation
WebAssembly WASM Introduction Presentation
 
Fusion Goals and Performance Management
Fusion Goals and Performance ManagementFusion Goals and Performance Management
Fusion Goals and Performance Management
 
P2P Cycle -Oracle Apps
P2P Cycle -Oracle AppsP2P Cycle -Oracle Apps
P2P Cycle -Oracle Apps
 
Oracle ame complete setup
Oracle ame complete setupOracle ame complete setup
Oracle ame complete setup
 
How to remove disable an oa framework personalization (doc id 304670
How to remove  disable an oa framework personalization (doc id 304670How to remove  disable an oa framework personalization (doc id 304670
How to remove disable an oa framework personalization (doc id 304670
 
Wordpress essential training - Wordpress Presentation PPT
Wordpress essential training - Wordpress Presentation PPTWordpress essential training - Wordpress Presentation PPT
Wordpress essential training - Wordpress Presentation PPT
 
WordPress Course Outline
WordPress Course OutlineWordPress Course Outline
WordPress Course Outline
 
Merging Newly Acquired Companies into Oracle EBS
Merging Newly Acquired Companies into Oracle EBSMerging Newly Acquired Companies into Oracle EBS
Merging Newly Acquired Companies into Oracle EBS
 
Fusion absence management explained with examples
Fusion absence management   explained with examplesFusion absence management   explained with examples
Fusion absence management explained with examples
 
Building a Multi-tenanted SaaS with Node.js
Building a Multi-tenanted SaaS with Node.jsBuilding a Multi-tenanted SaaS with Node.js
Building a Multi-tenanted SaaS with Node.js
 
Big Data Analytics Using Hadoop Cluster On Amazon EMR
Big Data Analytics Using Hadoop Cluster  On Amazon EMRBig Data Analytics Using Hadoop Cluster  On Amazon EMR
Big Data Analytics Using Hadoop Cluster On Amazon EMR
 
Spring Security 3
Spring Security 3Spring Security 3
Spring Security 3
 
Maximo 7.6.0.8
Maximo 7.6.0.8Maximo 7.6.0.8
Maximo 7.6.0.8
 
Extensions in OAF
Extensions in OAF Extensions in OAF
Extensions in OAF
 

Semelhante a Deep Dive into Oracle ADF Transactions

nter-pod Revolutions: Connected Enterprise Solution in Oracle EPM Cloud
nter-pod Revolutions: Connected Enterprise Solution in Oracle EPM Cloud nter-pod Revolutions: Connected Enterprise Solution in Oracle EPM Cloud
nter-pod Revolutions: Connected Enterprise Solution in Oracle EPM Cloud Alithya
 
Ruslan Platonov - Transactions
Ruslan Platonov - TransactionsRuslan Platonov - Transactions
Ruslan Platonov - TransactionsDmitry Buzdin
 
Customizing Change Management
Customizing Change ManagementCustomizing Change Management
Customizing Change ManagementAras
 
Effective Spring Transaction Management
Effective Spring Transaction ManagementEffective Spring Transaction Management
Effective Spring Transaction ManagementUMA MAHESWARI
 
20061122 JBoss-World Experiences with JBoss jBPM
20061122 JBoss-World Experiences with JBoss jBPM20061122 JBoss-World Experiences with JBoss jBPM
20061122 JBoss-World Experiences with JBoss jBPMcamunda services GmbH
 
ColdFusion ORM - Part II
ColdFusion ORM - Part II  ColdFusion ORM - Part II
ColdFusion ORM - Part II Rupesh Kumar
 
Automatically Documenting Program Changes
Automatically Documenting Program ChangesAutomatically Documenting Program Changes
Automatically Documenting Program ChangesRay Buse
 
Tzu-Li (Gordon) Tai - Stateful Stream Processing with Apache Flink
Tzu-Li (Gordon) Tai - Stateful Stream Processing with Apache FlinkTzu-Li (Gordon) Tai - Stateful Stream Processing with Apache Flink
Tzu-Li (Gordon) Tai - Stateful Stream Processing with Apache FlinkVerverica
 
Cadence: The Only Workflow Platform You'll Ever Need
Cadence: The Only Workflow Platform You'll Ever NeedCadence: The Only Workflow Platform You'll Ever Need
Cadence: The Only Workflow Platform You'll Ever NeedMaxim Fateev
 
Evolutionary db development
Evolutionary db development Evolutionary db development
Evolutionary db development Open Party
 
Transaction and concurrency pitfalls in Java
Transaction and concurrency pitfalls in JavaTransaction and concurrency pitfalls in Java
Transaction and concurrency pitfalls in JavaErsen Öztoprak
 
Flows - what you should know before implementing
Flows - what you should know before implementingFlows - what you should know before implementing
Flows - what you should know before implementingDoria Hamelryk
 
SQL Server 2008 Upgrade
SQL Server 2008 UpgradeSQL Server 2008 Upgrade
SQL Server 2008 UpgradeTed Noga
 
Getting Reactive with CycleJS and XStream
Getting Reactive with CycleJS and XStream Getting Reactive with CycleJS and XStream
Getting Reactive with CycleJS and XStream TechExeter
 
Test strategies for data processing pipelines, v2.0
Test strategies for data processing pipelines, v2.0Test strategies for data processing pipelines, v2.0
Test strategies for data processing pipelines, v2.0Lars Albertsson
 

Semelhante a Deep Dive into Oracle ADF Transactions (20)

nter-pod Revolutions: Connected Enterprise Solution in Oracle EPM Cloud
nter-pod Revolutions: Connected Enterprise Solution in Oracle EPM Cloud nter-pod Revolutions: Connected Enterprise Solution in Oracle EPM Cloud
nter-pod Revolutions: Connected Enterprise Solution in Oracle EPM Cloud
 
Ruslan Platonov - Transactions
Ruslan Platonov - TransactionsRuslan Platonov - Transactions
Ruslan Platonov - Transactions
 
Customizing Change Management
Customizing Change ManagementCustomizing Change Management
Customizing Change Management
 
Unit 3
Unit 3Unit 3
Unit 3
 
Effective Spring Transaction Management
Effective Spring Transaction ManagementEffective Spring Transaction Management
Effective Spring Transaction Management
 
20061122 JBoss-World Experiences with JBoss jBPM
20061122 JBoss-World Experiences with JBoss jBPM20061122 JBoss-World Experiences with JBoss jBPM
20061122 JBoss-World Experiences with JBoss jBPM
 
ColdFusion ORM - Part II
ColdFusion ORM - Part II  ColdFusion ORM - Part II
ColdFusion ORM - Part II
 
Automatically Documenting Program Changes
Automatically Documenting Program ChangesAutomatically Documenting Program Changes
Automatically Documenting Program Changes
 
Tzu-Li (Gordon) Tai - Stateful Stream Processing with Apache Flink
Tzu-Li (Gordon) Tai - Stateful Stream Processing with Apache FlinkTzu-Li (Gordon) Tai - Stateful Stream Processing with Apache Flink
Tzu-Li (Gordon) Tai - Stateful Stream Processing with Apache Flink
 
Coding style for good synthesis
Coding style for good synthesisCoding style for good synthesis
Coding style for good synthesis
 
Data Access with JDBC
Data Access with JDBCData Access with JDBC
Data Access with JDBC
 
WCM Transfer Services
WCM Transfer Services WCM Transfer Services
WCM Transfer Services
 
Cadence: The Only Workflow Platform You'll Ever Need
Cadence: The Only Workflow Platform You'll Ever NeedCadence: The Only Workflow Platform You'll Ever Need
Cadence: The Only Workflow Platform You'll Ever Need
 
Evolutionary db development
Evolutionary db development Evolutionary db development
Evolutionary db development
 
Transaction and concurrency pitfalls in Java
Transaction and concurrency pitfalls in JavaTransaction and concurrency pitfalls in Java
Transaction and concurrency pitfalls in Java
 
Flows - what you should know before implementing
Flows - what you should know before implementingFlows - what you should know before implementing
Flows - what you should know before implementing
 
SQL Server 2008 Upgrade
SQL Server 2008 UpgradeSQL Server 2008 Upgrade
SQL Server 2008 Upgrade
 
Module04
Module04Module04
Module04
 
Getting Reactive with CycleJS and XStream
Getting Reactive with CycleJS and XStream Getting Reactive with CycleJS and XStream
Getting Reactive with CycleJS and XStream
 
Test strategies for data processing pipelines, v2.0
Test strategies for data processing pipelines, v2.0Test strategies for data processing pipelines, v2.0
Test strategies for data processing pipelines, v2.0
 

Último

Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfIdiosysTechnologies1
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 

Último (20)

Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdf
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 

Deep Dive into Oracle ADF Transactions

  • 1. 1
  • 2.
  • 3. About  me   3   Eugene  Fedorenko     Master  principal  R&D  architect   adfprac=ce-­‐fedor.blogspot.com   @fisbudo            
  • 4. The  Briefing   4   ADF BC Transaction Shared Transaction Transaction Commit Cycle ADF BC Save Points ADF Model Transaction Data Control Frame Programmatic Approach Q&A Data Control Scope Task Flow Transaction Options Transaction Definition
  • 6. Transac=on   Ø  A logical unit-of-work with a start and end Ø  Must be entirely completed or aborted Ø  If the start state is valid, the end state is valid Ø  Is not affected by and does not affect any other transaction Ø  State management of uncommitted changes 6  
  • 7. 7   ADF  Business  Components   ADF  Faces   ADF  Task  Flows   ADF  Data  Controls  /  ADF  Bindings   DB   Transac=on  Management  in  Oracle  ADF  
  • 9. The  Briefing   9   ADF BC Transaction Shared Transaction Transaction Commit Cycle ADF BC Save Points ADF Model Transaction Data Control Frame Programmatic Approach Q&A Data Control Scope Task Flow Transaction Options Transaction Definition
  • 10. Oracle  ADF  BC  Revisited   10   View  Object     Nested  Applica?on  Module       En?ty  Object    
  • 11. DB  Transac=on  Object   11   JDBC  Connec?on   DB   View  Object     Nested  Applica?on  Module       En?ty  Object        
  • 12. Shared  Transac=on   12   JDBC  Connec?on   DB   View  Object     En?ty  Object         View  Object   View  Object  
  • 13. Ø  Based on jbo.shared.txn property Ø  Designed for shared Application Modules Ø  Used for not-shared root AMs to reduce number of DB connections   Shared  Transac=on   13  
  • 14. The  Briefing   14   ADF BC Transaction Shared Transaction Transaction Commit Cycle ADF BC Save Points ADF Model Transaction Data Control Frame Programmatic Approach Q&A Data Control Scope Task Flow Transaction Options Transaction Definition
  • 15. Ø  Validation Listener List Ø  Entities for validation Ø  Transaction Post Listener List Ø  Dirty entities Ø  Transaction Listener List Ø  AMs and entities listening to commit phase   DB  Transac=on  Listeners   15  
  • 16. 16     DB  Transac?on     Commit  Cycle     AM       En?ty    Commit   beforeValidate   validate   aFerValidate   postChanges   lock   prepareForDML   doDML   beforeCommit   doCommit   beforeCommit   aFerCommit   aFerCommit  
  • 17. Ø  Validation Ø  Raises validation exception Ø  Post Changes Ø  Rollbacks DB to savepoint Ø  Restores state of posted entities Ø  Raises an exception Ø  Before Commit or Commit Ø  Rollbacks DB to savepoint Ø  Raises an exception Ø  Does not restore state of posted entities by default   Failure  at  Commit  Cycle   17  
  • 18. Ø  Validation logic in beforeCommit method Ø  Deferrable constraints Ø  jbo.txn.handleafterpostexc = true Ø  Forces in memory passivation snapshot Ø  Activation of all AMs with all VO instances Error  at  Commit  phase   18    public  void  beforeCommit(Transac?onEvent  e)  {          if  (  !isDataValid()  )                throw  new  Valida?onExcep?on(VALIDATION_EXCEPTION);      }   CONSTRAINT  "CK_DIVEBOAT_WIDTH"  CHECK  (WIDTH<5)   DEFERRABLE  INITIALLY  DEFERRED  
  • 19. The  Briefing   19   ADF BC Transaction Shared Transaction Transaction Commit Cycle ADF BC Save Points ADF Model Transaction Data Control Frame Programmatic Approach Q&A Data Control Scope Task Flow Transaction Options Transaction Definition
  • 20. Ø  Invoke a PL/SQL procedure Ø  Modify entity attributes Ø  Invoke another PL/SQL procedure Ø  Commit the transaction    public  class  AppModuleImpl  extends  Applica?onModuleImpl  {        public  void  someBusinessServiceMethod()  {                  invokePLSQLProcedure1();                  modifySomeA^ributes();                  invokePLSQLProcedure2();                                getDBTransac?on().commit();                                          }     Business  Service  Method   20  
  • 21. Ø  passivateStateForUndo Ø  Makes a snapshot with AM’s state Ø  activateStateForUndo Ø  Restores AM’s state from snapshot Ø  Rollbacks the transaction  public  class  AppModuleImpl  extends  Applica?onModuleImpl  {        private  String  passivateStateForUndo()  {                  String  savePoint  =  super.passivateStateForUndo(null,  null,  PASSIVATE_UNDO_FLAG);                  return  savePoint;            }          private  void  ac?vateStateForUndo(String  savePointId)  {                    super.ac?vateStateForUndo(savePointId,    ACTIVATE_UNDO_FLAG);                  }         Managing  Savepoints  with  ADF  BC   21  
  • 22.    public  class  AppModuleImpl  extends  Applica?onModuleImpl  {      public  void  someBusinessServiceMethod()  {                      String  spid  =  passivateStateForUndo();                      try  {                                                    invokePLSQLProcedure1();                                                      modifySomeA^ributes();                                                    invokePLSQLProcedure2();                                            getDBTransac?on().commit();                                                    }  catch  (Run?meExcep?on  e)  {                              ac=vateStateForUndo(spid);                              throw  new  JboExcep?on(e);                      }              }       Managing  Savepoints  with  ADF  BC   22  
  • 23. The  Briefing   23   ADF BC Transaction Shared Transaction Transaction Commit Cycle ADF BC Save Points ADF Model Transaction Data Control Frame Programmatic Approach Q&A Data Control Scope Task Flow Transaction Options Transaction Definition
  • 24. Oracle  ADF  Model   24   ADF  Faces   ADF  Bindings   DB   ADF  Data  Controls   ADF  Task  Flows   ADF  Business  Components  
  • 25. Ø  ADF BC Ø  EJB Ø  Bean Ø  WebService (SOAP/REST) Ø  URL Ø  JMX Ø  BAM Ø  Placeholder Ø  Custom Data Controls       ADF  Data  Controls   25  
  • 26. Mul=ple  Data  Controls   26   REST  API   DB   ADF  BC   Global  Divers   Accommoda?on
  • 27. Data  Control  Frame   27   REST  API   DB   ADF  BC   Data  Control  Frame   Global  Divers   Accommoda?on BC  Data  Control   REST  Data  Control   Transac=on  
  • 28. Oracle  ADF  Controller   28   ADF  Faces     ADF  Bindings     DB   ADF  Data  Controls   ADF  Task  Flows   ADF  Business  Components  
  • 29.       Task  Flow   29  
  • 30.       Task  Flow  Transac=on  Op=ons   30  
  • 31. Ø  Shared Data Control Frame Ø  Data Control Instance (same type & name) Ø AM instance Ø VO instances Ø  Transaction Handler Ø DB Transaction Object Ø DB Connection Ø Entity Cache Ø  Default Option for BTF     Shared  Data  Control  Scope   31  
  • 32. Ø  Isolated Data Control Frame Ø  Data Control Instance (same type & name) Ø AM instance Ø VO instances Ø  Transaction Handler Ø DB Transaction Object Ø DB Connection Ø Entity Cache Ø  Always for UTF     Isolated  Data  Control  Scope   32  
  • 33. The  Briefing   33   ADF BC Transaction Shared Transaction Transaction Commit Cycle ADF BC Save Points ADF Model Transaction Data Control Frame Programmatic Approach Q&A Data Control Scope Task Flow Transaction Options Transaction Definition
  • 34. Data  Control  Frame  #1   Data  Control  Frames   34   Main.jspx   UTF   Menu   BTF   Data  Control  Frame  #2   Divers   BTF   Log  Book   Record   BTF   Data  Control  Frame  #3   Dive  Sites   BTF  
  • 35.   Task  Flow  Transac=on  Op=ons   35            <transac?on>                  <new-­‐transac?on/>            </transac?on>      
  • 36. Ø  Starts a new transaction on Data Control Frame Ø  Supports Both Data Control Scopes Ø  Isolated Ø  Shared Ø Called from UTF Ø The caller has ”No Controller Transaction” Ø  Must Finish the Transaction     Always  Begin  New  Transac=on  (new-­‐transac=on)   36  
  • 37. Ø  Only Transaction starter can finish it Ø  Always Begin New Transaction Ø  Use Existing Transaction if Possible (no caller’s transaction)     Commit  and  Rollback  on  Return   37  
  • 38. 38     Data  Control  Frame     Task  Flow  Commit     Transac?on       Data  Control    Commit   commit   commitTransac?on   commit     DB  Transac?on     For  each  data  control  
  • 39. Ø  Prematurely Terminated Task Flow Ø  Finished not via return activities Ø  Task Flow’s container is not rendered anymore Ø  Has been refreshed by the parent Ø  Task Flow owns the transaction Ø  Auto-rollback behavior     Prematurely  Terminated  Transac=on   39  
  • 40. The  Briefing   40   ADF BC Transaction Shared Transaction Transaction Commit Cycle ADF BC Save Points ADF Model Transaction Data Control Frame Programmatic Approach Q&A Data Control Scope Task Flow Transaction Options Transaction Definition
  • 41. Ø  Joins an existing transaction Ø  Supports Only Shared Data Control Scope Ø  Isolated is disabled Ø  Can not Finish the Transaction     Always  Use  Exis=ng  Transac=on  (requires-­‐exis=ng-­‐transac=on)   41  
  • 42. Ø  Created by default when shared transaction is reused Ø  Used to restore model state on task flow exit Ø  ”No Save Point on Task Flow Entry” to prevent creation     Task  Flow  Save  Points   42  
  • 43. Ø  Root AM requires a dedicated DB connection Ø  Parent and Child Task Flows should share Transaction Ø  Too many DB connections for multi-root-AMs application     Root  AM  Connec=on  Challenge   43   Divers  VO   Log  Book  VO   Divers Root AM Log Book Root AM Log Book Record BTFDivers BTF
  • 44. Ø  Root AMs refer to the same data source Ø  Task Flows use Transaction Options Ø  Any but <No Controller Transaction> Ø  Value for jbo.shared.txn is generated Ø  Transaction is shared     Root  AM  Connec=on  Sharing   44   JDBC  Connec?on   Divers  VO       Log  Book  VO   Divers Root AM Log Book Root AM
  • 45. The  Briefing   45   ADF BC Transaction Shared Transaction Transaction Commit Cycle ADF BC Save Points ADF Model Transaction Data Control Frame Programmatic Approach Q&A Data Control Scope Task Flow Transaction Options Transaction Definition
  • 46. Ø  Dynamic transaction option Ø  Isolated Data Control Scope Ø  Always Begin New Transaction Ø  Shared Data Control Scope Ø There is open transaction Ø  Always Use Existing Transaction Ø There is No open transaction Ø  Always Begin New Transaction     Use  Exis=ng  Transac=on  if  Possible  (requires-­‐transac=on)   46  
  • 47. Ø  Switches Off controller transaction management Ø  Does not start a transaction on task flow entry Ø  Does not create a save point on task flow entry Ø  Does not restore to save point Ø  Does not rollback or commit transaction     No  Controller  Transac=on   47  
  • 48. Ø  Get current binding context Ø  Get current Data Control Frame Ø  Start a new transaction on the frame    public  void  startTransac?on()  {          BindingContext  context  =  BindingContext.getCurrent();                        //Get  the  name  of  Data  Control  Frame          String  dcFrameName  =  context.getCurrentDataControlFrame();            //Get  Data  Control  Frame          DataControlFrame  dcFrame  =  context.findDataControlFrame(dcFrameName);                      //Start  Transac?on          dcFrame.beginTransac?on(new  Transac?onProper?es());      }         Start  a  Transac=on   48  
  • 49. Ø  Get current binding context Ø  Get current Data Control Frame Ø  Commit or Rollback transaction    public  void  finishTransac?on()  {          BindingContext  context  =  BindingContext.getCurrent();                      //Get  the  name  of  Data  Control  Frame          String  dcFrameName  =  context.getCurrentDataControlFrame();            //Get  Data  Control  Frame          DataControlFrame  dcFrame  =  context.findDataControlFrame(dcFrameName);                      //Finish  Transac?on            if  (doRollback)  dcFrame.rollback();                else  dcFrame.commit();         }     Finish  a  Transac=on   49  
  • 50. Ø  Create Save Point Ø  Save Save Point handle in pageFlowScope bean Ø  Restore Save Point    private  SavepointHandle  savepointHandle;            public  void  createSavePoint()  {          DataControlFrame  dcFrame  =  getCurrentDataControlFrame();          savepointHandle  =  dcFrame.createSavepoint();        }        public  void  restoreSavePoint()  {          DataControlFrame  dcFrame  =  getCurrentDataControlFrame();          dcFrame.restoreSavepoint(savepointHandle);      }   Create  Savepoint  &  Restore  to  Savepoint   50  
  • 51.       CRUD  Task  Flow   51  
  • 52. Safety  Stop.  Ques=ons  &  Answers   52   ADF BC Transaction Shared Transaction Transaction Commit Cycle ADF BC Save Points ADF Model Transaction Data Control Frame Programmatic Approach Q&A Data Control Scope Task Flow Transaction Options Transaction Definition
  • 53. 53 Join Your Community! Tonight from 8:00 – 10:00 in Sheraton I ADF Monday Night Foosball What is more fun than foosball and beer at your best friend’s house? Well, how about a foosball tournament with a whole bunch of friends at Kscope16? Join your fellow ADF enthusiasts for some great networking and friendly competition.
  • 54. 54