SlideShare uma empresa Scribd logo
1 de 65
Baixar para ler offline
Exploring the details of
APEX sessions
APEX World 2018, Mar 22, 2018
21-3-2018
Exploring the details of APEX sessions
2
Menno Hoogendijk
Fulltime APEX developer
Working with Oracle since 2008
Tries to be a fullstack developer
Speaking at:
APEX World 2018
APEX Alpe Adria 2018
APEX Connect 2018
Kscope18
@mennooo
mennooo
About me
www.menn.ooo
21-3-2018
Powerful JavaScript skills for APEX developers
3
Menno Hoogendijk
Fulltime APEX developer
Working with Oracle since 2008
Tries to be a fullstack developer
My third Kscope!
Plugin your APEX widgets
Powerful JavaScript skills for all APEX developers
@mennooo
mennooo
About me
Today’s menu
Introduction
Creating a session
The login process
Session state
Smaller session features
The logout process
HTTP Protocol
21-3-2018
Exploring the details of APEX sessions
5
Web server
Browser
HTTP request messages:
GET www.google.com HTTP/1.1
User-Agent: Mozilla/5.0
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
HTTP response messages:
HTTP/1.1 200 OK
Content-Length: 88
Content-Type: text/html
Connection: Closed
<html>
<body>
<h1>Hello, World!</h1>
</body>
</html>
HTTP is stateless
21-3-2018
Exploring the details of APEX sessions
6
Web server
User 2 User 3
User 1 User 4
What is a session?
21-3-2018
Exploring the details of APEX sessions
7
“A session establishes stateful behavior across pages for each
user”
How does APEX create a
session?
The HTTP response status code 302 Found is a
common way of performing URL redirection.
What happened in APEX?
21-3-2018
Exploring the details of APEX sessions
12
1 Check if the session is valid
3 Redirect to the “session not valid URL”
2 Create a new session for user “nobody”
1. Check if the session is valid
21-3-2018
Exploring the details of APEX sessions
13
How depends on your Authentication Scheme
If a sentry function exists, it will use that one.
If a sentry function does not exist, it will use the internal one.
Authentication
Scheme
Cookie
Session ID in
Request
Valid?
This is a custom Authentication Scheme
HTTPS only?
2. Create a new session for user “nobody”
21-3-2018
Exploring the details of APEX sessions
16
Even before login, a new session is created
Tip: use apex_dictionary view
select *
from apex_dictionary
where apex_view_name like '%SESSION%'
and column_id = 0;
Tip: grant role to schema to see all data
grant apex_administrator_role to <SCHEMA>;
3. Redirect to the “session not valid URL”
21-3-2018
Exploring the details of APEX sessions
17
Only when sentry returns false
The login process
Authentication Process
21-3-2018
Exploring the details of APEX sessions
23
apex_authentication
.login
Pre Authentication Authentication Post Authentication
21-3-2018
Plugin your APEX widgets
26
Tip: FSP_AFTER_LOGIN_URL in Post Authentication
Purpose:
Do not go to predefined home page, but redirect to custom
URL
:FSP_AFTER_LOGIN_URL := apex_page.get_url(p_page => 2)
21-3-2018
Plugin your APEX widgets
27
21-3-2018
Plugin your APEX widgets
28
Update session for user “nobody” to “ADMIN”
21-3-2018
Exploring the details of APEX sessions
29
Session State – Page Rendering
There are different kinds of session state
21-3-2018
Exploring the details of APEX sessions
31
1 Persisted Session State
2 In Memory Session State
Difference: is or is not stored in WWV_FLOW_DATA table
In Memory Session State
21-3-2018
Exploring the details of APEX sessions
32
2 Page item default value
1 Automatic Row Fetch
3 Page item source value
Demo
21-3-2018
Exploring the details of APEX sessions
33
Persisted Session State
21-3-2018
Exploring the details of APEX sessions
34
2 PL/SQL Process
1 Computation
Persisted Session State - When does the commit take
place?
21-3-2018
Exploring the details of APEX sessions
35
3 If no item value has changed -> end of page rendering
2 If item value has changed -> end of block
1 If item value has changed using apex_util.set_session_state
-> immediately
Demo
21-3-2018
Exploring the details of APEX sessions
36
Session State – Page Processing
What’s new in 5.1
21-3-2018
Exploring the details of APEX sessions
38
2 Reload on submit
1 Always via JSON (using XMLHttpRequest)
Always submit via JSON
Processed via APEX_APPLICATION.ACCEPT
Original JSON in APEX_JSON variables
XMLHttpRequest page submits and the 32k limitation
21-3-2018
Exploring the details of APEX sessions
40
People often mix up three limitations on 32K.
• 32K was the max size of a report row
• 32K is the max size of an APEX item
• mod_plsql limits the size of a single parameter that can be passed to a
procedure to 32K. (ORDS does not have this limitation)
Doing asynchronous page submits in 5.1 only solves the limitation for
mod_plsql because XMLHttpRequest supports chunked uploads.
Solutions for CLOBs (POST requests)
21-3-2018
Exploring the details of APEX sessions
41
2 apex.ajax.clob
1 Use an editable Interactive Grid
var ajaxClob = new apex.ajax.clob()
ajaxClob._set('very long text..')
select clob001
from apex_collections
where collection_name = 'CLOB_CONTENT’;
Reload on submit
21-3-2018
Exploring the details of APEX sessions
42
2 Only for success
1 Always
When reload on submit is set to always,
APEX will process the page synchronous
When reload on submit is set to only for success,
APEX will process the page asynchronous
The request returns a URL in JSON format
apex.navigation.redirect( responseData.redirectURL );
Tip:
Do not use Reload on Submit set Only for Success
in combination with Enable Duplicate Page
Submissions set to No
This will result in an error when first submit is not
successful
Demo
21-3-2018
Exploring the details of APEX sessions
46
Rejoin Sessions
Rejoin sessions
21-3-2018
Exploring the details of APEX sessions
48
When is it useful?
• User is already working in application
• Opens a link to the same application in another tab
□ Via link in email
□ Via bookmark
□ Other..
21-3-2018
Plugin your APEX widgets
49
21-3-2018
Plugin your APEX widgets
50
Rejoin sessions needs to be enabled in the Instance
Administration
Demo
21-3-2018
Exploring the details of APEX sessions
51
Session cloning
APEX session isolation between multiple browser tabs
21-3-2018
Exploring the details of APEX sessions
53
When is it useful?
• When you depend on page/ application items that are not part of page
submission
• For example: an application item that holds a certain context value
□ Tab 1: Context is customer A
□ Tab 2: Context is customer B
• Security risks are not fully guaranteed yet, therefore option is disabled by
default
Step 1: enable feature
21-3-2018
Exploring the details of APEX sessions
54
begin
apex_instance_admin.set_parameter(
p_parameter => 'CLONE_SESSION_ENABLED',
p_value => 'Y'
);
end;
Step 2: add navigation bar list entry for this URL
21-3-2018
Exploring the details of APEX sessions
55
f?p=&APP_ID.:&APP_PAGE_ID.:&APP_SESSION.:APEX_CLONE_SESSION
javascript:window.open('f?p=&APP_ID.:&APP_PAGE_ID.:&APP_S
ESSION.:APEX_CLONE_SESSION',
'f?p=&APP_ID.:&APP_PAGE_ID.:&APP_SESSION.:APEX_CLONE_
SESSION');
Demo
21-3-2018
Exploring the details of APEX sessions
58
The logout process
Logout URL: &LOGOUT_URL.
apex_authentication.logout?p_app_id=106&amp;p_session_id=6311950320799
Session is purged and no longer in apex_workspace_sessions
view
You can purge all instance sessions
Thank you

Mais conteúdo relacionado

Semelhante a Presentatie - Exploring the details of APEX sessions.pdf

Nagios Conference 2013 - Eric Stanley and Andy Brist - API and Nagios
Nagios Conference 2013 - Eric Stanley and Andy Brist - API and NagiosNagios Conference 2013 - Eric Stanley and Andy Brist - API and Nagios
Nagios Conference 2013 - Eric Stanley and Andy Brist - API and NagiosNagios
 
20160307 apex connects_jira
20160307 apex connects_jira20160307 apex connects_jira
20160307 apex connects_jiraMT AG
 
Chanhao Jiang And David Wei Presentation Quickling Pagecache
Chanhao Jiang And David Wei Presentation Quickling PagecacheChanhao Jiang And David Wei Presentation Quickling Pagecache
Chanhao Jiang And David Wei Presentation Quickling PagecacheAjax Experience 2009
 
Assignment 2 - Power drill Grapevine "It's like Yik Yak, but for opinions ab...
Assignment 2 - Power drill Grapevine  "It's like Yik Yak, but for opinions ab...Assignment 2 - Power drill Grapevine  "It's like Yik Yak, but for opinions ab...
Assignment 2 - Power drill Grapevine "It's like Yik Yak, but for opinions ab...MATCHmaster
 
Software Portfolio - SetFocus
Software Portfolio - SetFocusSoftware Portfolio - SetFocus
Software Portfolio - SetFocusAlexander Vogel
 
High performance coding practices code project
High performance coding practices code projectHigh performance coding practices code project
High performance coding practices code projectPruthvi B Patil
 
St Hilaire Ajax Start Odtug Nov 2009
St Hilaire   Ajax Start Odtug Nov 2009St Hilaire   Ajax Start Odtug Nov 2009
St Hilaire Ajax Start Odtug Nov 2009ruiruitang
 
Introduction To Mvc
Introduction To MvcIntroduction To Mvc
Introduction To MvcVolkan Uzun
 
Affordable Workflow Options for APEX
Affordable Workflow Options for APEXAffordable Workflow Options for APEX
Affordable Workflow Options for APEXNiels de Bruijn
 
Web Slices
Web SlicesWeb Slices
Web Slicesklcintw
 
An introduction to Microsoft Graph for developers
An introduction to Microsoft Graph for developersAn introduction to Microsoft Graph for developers
An introduction to Microsoft Graph for developersMicrosoft 365 Developer
 
JS digest. January 2018
JS digest. January 2018 JS digest. January 2018
JS digest. January 2018 ElifTech
 
ASP.NET AJAX with Visual Studio 2008
ASP.NET AJAX with Visual Studio 2008ASP.NET AJAX with Visual Studio 2008
ASP.NET AJAX with Visual Studio 2008Caleb Jenkins
 
Rapid Development With CakePHP
Rapid Development With CakePHPRapid Development With CakePHP
Rapid Development With CakePHPEdureka!
 
Building Restful Web App Rapidly in CakePHP
Building Restful Web App Rapidly in CakePHPBuilding Restful Web App Rapidly in CakePHP
Building Restful Web App Rapidly in CakePHPEdureka!
 
Backup Exec Partner Toolkit
Backup Exec Partner ToolkitBackup Exec Partner Toolkit
Backup Exec Partner ToolkitSymantec
 

Semelhante a Presentatie - Exploring the details of APEX sessions.pdf (20)

Nagios Conference 2013 - Eric Stanley and Andy Brist - API and Nagios
Nagios Conference 2013 - Eric Stanley and Andy Brist - API and NagiosNagios Conference 2013 - Eric Stanley and Andy Brist - API and Nagios
Nagios Conference 2013 - Eric Stanley and Andy Brist - API and Nagios
 
20160307 apex connects_jira
20160307 apex connects_jira20160307 apex connects_jira
20160307 apex connects_jira
 
Chanhao Jiang And David Wei Presentation Quickling Pagecache
Chanhao Jiang And David Wei Presentation Quickling PagecacheChanhao Jiang And David Wei Presentation Quickling Pagecache
Chanhao Jiang And David Wei Presentation Quickling Pagecache
 
Assignment 2 - Power drill Grapevine "It's like Yik Yak, but for opinions ab...
Assignment 2 - Power drill Grapevine  "It's like Yik Yak, but for opinions ab...Assignment 2 - Power drill Grapevine  "It's like Yik Yak, but for opinions ab...
Assignment 2 - Power drill Grapevine "It's like Yik Yak, but for opinions ab...
 
Development withforce
Development withforceDevelopment withforce
Development withforce
 
Software Portfolio - SetFocus
Software Portfolio - SetFocusSoftware Portfolio - SetFocus
Software Portfolio - SetFocus
 
High performance coding practices code project
High performance coding practices code projectHigh performance coding practices code project
High performance coding practices code project
 
St Hilaire Ajax Start Odtug Nov 2009
St Hilaire   Ajax Start Odtug Nov 2009St Hilaire   Ajax Start Odtug Nov 2009
St Hilaire Ajax Start Odtug Nov 2009
 
ASP.NET Lecture 2
ASP.NET Lecture 2ASP.NET Lecture 2
ASP.NET Lecture 2
 
Introduction To Mvc
Introduction To MvcIntroduction To Mvc
Introduction To Mvc
 
Affordable Workflow Options for APEX
Affordable Workflow Options for APEXAffordable Workflow Options for APEX
Affordable Workflow Options for APEX
 
Web Slices
Web SlicesWeb Slices
Web Slices
 
An introduction to Microsoft Graph for developers
An introduction to Microsoft Graph for developersAn introduction to Microsoft Graph for developers
An introduction to Microsoft Graph for developers
 
JS digest. January 2018
JS digest. January 2018 JS digest. January 2018
JS digest. January 2018
 
ASP.NET AJAX with Visual Studio 2008
ASP.NET AJAX with Visual Studio 2008ASP.NET AJAX with Visual Studio 2008
ASP.NET AJAX with Visual Studio 2008
 
senior software developer .net
senior software developer .netsenior software developer .net
senior software developer .net
 
PnP Webcast - Sharepoint Access App scanner
PnP Webcast - Sharepoint Access App scannerPnP Webcast - Sharepoint Access App scanner
PnP Webcast - Sharepoint Access App scanner
 
Rapid Development With CakePHP
Rapid Development With CakePHPRapid Development With CakePHP
Rapid Development With CakePHP
 
Building Restful Web App Rapidly in CakePHP
Building Restful Web App Rapidly in CakePHPBuilding Restful Web App Rapidly in CakePHP
Building Restful Web App Rapidly in CakePHP
 
Backup Exec Partner Toolkit
Backup Exec Partner ToolkitBackup Exec Partner Toolkit
Backup Exec Partner Toolkit
 

Último

AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 

Último (20)

AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 

Presentatie - Exploring the details of APEX sessions.pdf

  • 1. Exploring the details of APEX sessions APEX World 2018, Mar 22, 2018
  • 2. 21-3-2018 Exploring the details of APEX sessions 2 Menno Hoogendijk Fulltime APEX developer Working with Oracle since 2008 Tries to be a fullstack developer Speaking at: APEX World 2018 APEX Alpe Adria 2018 APEX Connect 2018 Kscope18 @mennooo mennooo About me www.menn.ooo
  • 3. 21-3-2018 Powerful JavaScript skills for APEX developers 3 Menno Hoogendijk Fulltime APEX developer Working with Oracle since 2008 Tries to be a fullstack developer My third Kscope! Plugin your APEX widgets Powerful JavaScript skills for all APEX developers @mennooo mennooo About me
  • 4. Today’s menu Introduction Creating a session The login process Session state Smaller session features The logout process
  • 5. HTTP Protocol 21-3-2018 Exploring the details of APEX sessions 5 Web server Browser HTTP request messages: GET www.google.com HTTP/1.1 User-Agent: Mozilla/5.0 Accept-Language: en-us Accept-Encoding: gzip, deflate Connection: Keep-Alive HTTP response messages: HTTP/1.1 200 OK Content-Length: 88 Content-Type: text/html Connection: Closed <html> <body> <h1>Hello, World!</h1> </body> </html>
  • 6. HTTP is stateless 21-3-2018 Exploring the details of APEX sessions 6 Web server User 2 User 3 User 1 User 4
  • 7. What is a session? 21-3-2018 Exploring the details of APEX sessions 7 “A session establishes stateful behavior across pages for each user”
  • 8. How does APEX create a session?
  • 9.
  • 10.
  • 11. The HTTP response status code 302 Found is a common way of performing URL redirection.
  • 12. What happened in APEX? 21-3-2018 Exploring the details of APEX sessions 12 1 Check if the session is valid 3 Redirect to the “session not valid URL” 2 Create a new session for user “nobody”
  • 13. 1. Check if the session is valid 21-3-2018 Exploring the details of APEX sessions 13 How depends on your Authentication Scheme If a sentry function exists, it will use that one. If a sentry function does not exist, it will use the internal one. Authentication Scheme Cookie Session ID in Request Valid?
  • 14. This is a custom Authentication Scheme
  • 16. 2. Create a new session for user “nobody” 21-3-2018 Exploring the details of APEX sessions 16 Even before login, a new session is created Tip: use apex_dictionary view select * from apex_dictionary where apex_view_name like '%SESSION%' and column_id = 0; Tip: grant role to schema to see all data grant apex_administrator_role to <SCHEMA>;
  • 17. 3. Redirect to the “session not valid URL” 21-3-2018 Exploring the details of APEX sessions 17 Only when sentry returns false
  • 18.
  • 19.
  • 20.
  • 21.
  • 23. Authentication Process 21-3-2018 Exploring the details of APEX sessions 23 apex_authentication .login Pre Authentication Authentication Post Authentication
  • 24.
  • 25.
  • 26. 21-3-2018 Plugin your APEX widgets 26 Tip: FSP_AFTER_LOGIN_URL in Post Authentication Purpose: Do not go to predefined home page, but redirect to custom URL :FSP_AFTER_LOGIN_URL := apex_page.get_url(p_page => 2)
  • 29. Update session for user “nobody” to “ADMIN” 21-3-2018 Exploring the details of APEX sessions 29
  • 30. Session State – Page Rendering
  • 31. There are different kinds of session state 21-3-2018 Exploring the details of APEX sessions 31 1 Persisted Session State 2 In Memory Session State Difference: is or is not stored in WWV_FLOW_DATA table
  • 32. In Memory Session State 21-3-2018 Exploring the details of APEX sessions 32 2 Page item default value 1 Automatic Row Fetch 3 Page item source value
  • 34. Persisted Session State 21-3-2018 Exploring the details of APEX sessions 34 2 PL/SQL Process 1 Computation
  • 35. Persisted Session State - When does the commit take place? 21-3-2018 Exploring the details of APEX sessions 35 3 If no item value has changed -> end of page rendering 2 If item value has changed -> end of block 1 If item value has changed using apex_util.set_session_state -> immediately
  • 37. Session State – Page Processing
  • 38. What’s new in 5.1 21-3-2018 Exploring the details of APEX sessions 38 2 Reload on submit 1 Always via JSON (using XMLHttpRequest)
  • 39. Always submit via JSON Processed via APEX_APPLICATION.ACCEPT Original JSON in APEX_JSON variables
  • 40. XMLHttpRequest page submits and the 32k limitation 21-3-2018 Exploring the details of APEX sessions 40 People often mix up three limitations on 32K. • 32K was the max size of a report row • 32K is the max size of an APEX item • mod_plsql limits the size of a single parameter that can be passed to a procedure to 32K. (ORDS does not have this limitation) Doing asynchronous page submits in 5.1 only solves the limitation for mod_plsql because XMLHttpRequest supports chunked uploads.
  • 41. Solutions for CLOBs (POST requests) 21-3-2018 Exploring the details of APEX sessions 41 2 apex.ajax.clob 1 Use an editable Interactive Grid var ajaxClob = new apex.ajax.clob() ajaxClob._set('very long text..') select clob001 from apex_collections where collection_name = 'CLOB_CONTENT’;
  • 42. Reload on submit 21-3-2018 Exploring the details of APEX sessions 42 2 Only for success 1 Always
  • 43. When reload on submit is set to always, APEX will process the page synchronous
  • 44. When reload on submit is set to only for success, APEX will process the page asynchronous The request returns a URL in JSON format apex.navigation.redirect( responseData.redirectURL );
  • 45. Tip: Do not use Reload on Submit set Only for Success in combination with Enable Duplicate Page Submissions set to No This will result in an error when first submit is not successful
  • 48. Rejoin sessions 21-3-2018 Exploring the details of APEX sessions 48 When is it useful? • User is already working in application • Opens a link to the same application in another tab □ Via link in email □ Via bookmark □ Other..
  • 50. 21-3-2018 Plugin your APEX widgets 50 Rejoin sessions needs to be enabled in the Instance Administration
  • 53. APEX session isolation between multiple browser tabs 21-3-2018 Exploring the details of APEX sessions 53 When is it useful? • When you depend on page/ application items that are not part of page submission • For example: an application item that holds a certain context value □ Tab 1: Context is customer A □ Tab 2: Context is customer B • Security risks are not fully guaranteed yet, therefore option is disabled by default
  • 54. Step 1: enable feature 21-3-2018 Exploring the details of APEX sessions 54 begin apex_instance_admin.set_parameter( p_parameter => 'CLONE_SESSION_ENABLED', p_value => 'Y' ); end;
  • 55. Step 2: add navigation bar list entry for this URL 21-3-2018 Exploring the details of APEX sessions 55 f?p=&APP_ID.:&APP_PAGE_ID.:&APP_SESSION.:APEX_CLONE_SESSION
  • 57.
  • 61.
  • 62.
  • 63.
  • 64. You can purge all instance sessions