SlideShare ist ein Scribd-Unternehmen logo
1 von 54
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

Data Onboarding
Data Onboarding Data Onboarding
Data Onboarding Splunk
 
Can Apache Kafka Replace a Database?
Can Apache Kafka Replace a Database?Can Apache Kafka Replace a Database?
Can Apache Kafka Replace a Database?Kai Wähner
 
Scaling containers with keda
Scaling containers  with kedaScaling containers  with keda
Scaling containers with kedaNilesh Gule
 
Introduction to ELK
Introduction to ELKIntroduction to ELK
Introduction to ELKYuHsuan Chen
 
Accuracy and time_costs_of_web_app_scanners
Accuracy and time_costs_of_web_app_scannersAccuracy and time_costs_of_web_app_scanners
Accuracy and time_costs_of_web_app_scannersLarry Suto
 
Data Privacy with Apache Spark: Defensive and Offensive Approaches
Data Privacy with Apache Spark: Defensive and Offensive ApproachesData Privacy with Apache Spark: Defensive and Offensive Approaches
Data Privacy with Apache Spark: Defensive and Offensive ApproachesDatabricks
 
ELK at LinkedIn - Kafka, scaling, lessons learned
ELK at LinkedIn - Kafka, scaling, lessons learnedELK at LinkedIn - Kafka, scaling, lessons learned
ELK at LinkedIn - Kafka, scaling, lessons learnedTin Le
 
MySQL Monitoring using Prometheus & Grafana
MySQL Monitoring using Prometheus & GrafanaMySQL Monitoring using Prometheus & Grafana
MySQL Monitoring using Prometheus & GrafanaYoungHeon (Roy) Kim
 
Automate mule deployments with github actions and travis ci
Automate mule deployments with github actions  and  travis ciAutomate mule deployments with github actions  and  travis ci
Automate mule deployments with github actions and travis ciNeerajKumar1965
 
[UC4] Version and Automate Everything
[UC4] Version and Automate Everything[UC4] Version and Automate Everything
[UC4] Version and Automate EverythingPerforce
 
RIA Cross Domain Policy
RIA Cross Domain PolicyRIA Cross Domain Policy
RIA Cross Domain PolicyNSConclave
 
Kubernetes at Datadog the very hard way
Kubernetes at Datadog the very hard wayKubernetes at Datadog the very hard way
Kubernetes at Datadog the very hard wayLaurent Bernaille
 
Analytics with Apache Superset and ClickHouse - DoK Talks #151
Analytics with Apache Superset and ClickHouse - DoK Talks #151Analytics with Apache Superset and ClickHouse - DoK Talks #151
Analytics with Apache Superset and ClickHouse - DoK Talks #151DoKC
 
Sergii Bielskyi "Using Kafka and Azure Event hub together for streaming Big d...
Sergii Bielskyi "Using Kafka and Azure Event hub together for streaming Big d...Sergii Bielskyi "Using Kafka and Azure Event hub together for streaming Big d...
Sergii Bielskyi "Using Kafka and Azure Event hub together for streaming Big d...Lviv Startup Club
 
Using Kafka to scale database replication
Using Kafka to scale database replicationUsing Kafka to scale database replication
Using Kafka to scale database replicationVenu Ryali
 
Cloud adoption fails - 5 ways deployments go wrong and 5 solutions
Cloud adoption fails - 5 ways deployments go wrong and 5 solutionsCloud adoption fails - 5 ways deployments go wrong and 5 solutions
Cloud adoption fails - 5 ways deployments go wrong and 5 solutionsYevgeniy Brikman
 
Splunk HTTP Event Collector
Splunk HTTP Event CollectorSplunk HTTP Event Collector
Splunk HTTP Event CollectorSplunk
 

Was ist angesagt? (20)

Data Onboarding
Data Onboarding Data Onboarding
Data Onboarding
 
Can Apache Kafka Replace a Database?
Can Apache Kafka Replace a Database?Can Apache Kafka Replace a Database?
Can Apache Kafka Replace a Database?
 
Scaling containers with keda
Scaling containers  with kedaScaling containers  with keda
Scaling containers with keda
 
Introduction to ELK
Introduction to ELKIntroduction to ELK
Introduction to ELK
 
Accuracy and time_costs_of_web_app_scanners
Accuracy and time_costs_of_web_app_scannersAccuracy and time_costs_of_web_app_scanners
Accuracy and time_costs_of_web_app_scanners
 
Event Storming and Saga
Event Storming and SagaEvent Storming and Saga
Event Storming and Saga
 
Data Privacy with Apache Spark: Defensive and Offensive Approaches
Data Privacy with Apache Spark: Defensive and Offensive ApproachesData Privacy with Apache Spark: Defensive and Offensive Approaches
Data Privacy with Apache Spark: Defensive and Offensive Approaches
 
ELK at LinkedIn - Kafka, scaling, lessons learned
ELK at LinkedIn - Kafka, scaling, lessons learnedELK at LinkedIn - Kafka, scaling, lessons learned
ELK at LinkedIn - Kafka, scaling, lessons learned
 
MySQL Monitoring using Prometheus & Grafana
MySQL Monitoring using Prometheus & GrafanaMySQL Monitoring using Prometheus & Grafana
MySQL Monitoring using Prometheus & Grafana
 
Automate mule deployments with github actions and travis ci
Automate mule deployments with github actions  and  travis ciAutomate mule deployments with github actions  and  travis ci
Automate mule deployments with github actions and travis ci
 
[UC4] Version and Automate Everything
[UC4] Version and Automate Everything[UC4] Version and Automate Everything
[UC4] Version and Automate Everything
 
Security in NodeJS applications
Security in NodeJS applicationsSecurity in NodeJS applications
Security in NodeJS applications
 
Security Analytics with OpenSearch
Security Analytics with OpenSearchSecurity Analytics with OpenSearch
Security Analytics with OpenSearch
 
RIA Cross Domain Policy
RIA Cross Domain PolicyRIA Cross Domain Policy
RIA Cross Domain Policy
 
Kubernetes at Datadog the very hard way
Kubernetes at Datadog the very hard wayKubernetes at Datadog the very hard way
Kubernetes at Datadog the very hard way
 
Analytics with Apache Superset and ClickHouse - DoK Talks #151
Analytics with Apache Superset and ClickHouse - DoK Talks #151Analytics with Apache Superset and ClickHouse - DoK Talks #151
Analytics with Apache Superset and ClickHouse - DoK Talks #151
 
Sergii Bielskyi "Using Kafka and Azure Event hub together for streaming Big d...
Sergii Bielskyi "Using Kafka and Azure Event hub together for streaming Big d...Sergii Bielskyi "Using Kafka and Azure Event hub together for streaming Big d...
Sergii Bielskyi "Using Kafka and Azure Event hub together for streaming Big d...
 
Using Kafka to scale database replication
Using Kafka to scale database replicationUsing Kafka to scale database replication
Using Kafka to scale database replication
 
Cloud adoption fails - 5 ways deployments go wrong and 5 solutions
Cloud adoption fails - 5 ways deployments go wrong and 5 solutionsCloud adoption fails - 5 ways deployments go wrong and 5 solutions
Cloud adoption fails - 5 ways deployments go wrong and 5 solutions
 
Splunk HTTP Event Collector
Splunk HTTP Event CollectorSplunk HTTP Event Collector
Splunk HTTP Event Collector
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 

Kürzlich hochgeladen (20)

How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 

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