SlideShare a Scribd company logo
1 of 49
AD 112: Real World Experience:
Integrating DB2 with XPages
Steve Zavocki Navy Federal Credit Union Consultant
Dwain Wuerfel Navy Federal Credit Union
Real World Experience: Integrating DB2 with XPages
About Steve
 Notes Developer since 1996
 Exclusively XPages since 2012
 Fluent in Java, and use it whenever possible
 Have been a consultant with Navy Federal
since April 2014 working out of Milton,
Florida
 Blog: http://notesspeak.blogspot.com/
 Email: zavocki@hotmail.com
 Twitter: @szavocki
Real World Experience: Integrating DB2 with XPages
About Dwain
 Notes Developer since 1997
 XPages since 2011
 Have been an employee with Navy Federal
since July 2014 working out of Milton, Florida
 Blog: www.xpagesnewbie.wordpress.org
 Email: dwainwuerfel@gmail.com
 Twitter: @dwainwuerfel
Real World Experience: Integrating DB2 with XPages
About Navy Federal Credit Union
 The world’s largest credit union
 $69 billion in assets and over 5.5 million members
 Approximately 12,000 employees worldwide
 Member-owned and not-for-profit
 We offer credit cards, auto loans, mortgages, checking and savings, CDs, IRAs and
our subsidiary Navy Federal Financial Group offers investments & insurance
 Navy Federal: Field of Membership
•We serve all Department of Defense and Coast Guard active duty, civilian and contractor
personnel and their families
•We have 270 branches worldwide; online, mobile account access, and call center 24/7
 FORTUNE's 100 Best Companies to Work For in 2015
 Fifth time selected
 ComputerWorld’s 2015 Best Place to Work in IT
Real World Experience: Integrating DB2 with XPages
Agenda
 Why use DB2?
 Application Overview
 Application Design
 DB2 configuration
 Lessons Learned
 What your DBA wants you to know
Real World Experience: Integrating DB2 with XPages
Real World Experience: Integrating DB2 with XPages
Why Use DB2?
 Performance
 Why is this important to NFCU?
 References
Real World Experience: Integrating DB2 with XPages
Why Use DB2?
 Performance
 DB2 z/OS, DB2 LUW, Oracle, SQL Server, Teradata, and Notes
 Navy Federal uses all these, but chose DB2 for XPages back-end
 Timestamp data type to the one millionth place
 Both Notes and Java only use one thousandth
Notes/Java: 07:50:25.123000
DB2: 07:50:25.123456
Real World Experience: Integrating DB2 with XPages
Why Use DB2?
 Performance cont’d…
 10 or 10,000,000 rows irrelevant
 Don’t try this using a Notes database
 Physical storage is allocated for future growth
 This means you never encounter an out of space condition
 Moves large quantities of data and manages high volume of transaction
 Potential for large volumes of transactions
 DB2 has data sharing which is similar to replication/clustering
 Know that this exists, DBA should already be using this
Real World Experience: Integrating DB2 with XPages
Why Use DB2?
 Why is this important to Navy FCU you ask
 Navy FCU measures success as “No Perceived Downtime”
 XPages uses DB2 as a back-end due to the existing transactional member/customer
facing applications
 Auditing
 Security Concerns
Real World Experience: Integrating DB2 with XPages
Why Use DB2?
 Comparison with Oracle
 http://www-01.ibm.com/software/info/rte/breakfree/tw.html
 More information about the benefits of DB2
 http://www-01.ibm.com/software/data/db2/zos/family/
Real World Experience: Integrating DB2 with XPages
Application Overview
Real World Experience: Integrating DB2 with XPages
Application Overview
 In a nutshell, the application manages ATM by providing a web browser front-
end to a mainframe application
 This application replaces having a person use the green screen, and it
eliminates tedious data entry into an MS Access database
 All actions that take place whether user initiated or scheduled are recorded in
DB
 The data is then used for reporting and searching
Real World Experience: Integrating DB2 with XPages
Real World Experience: Integrating DB2 with XPages
Application Overview
Real World Experience: Integrating DB2 with XPages
Application Design
Real World Experience: Integrating DB2 with XPages
Application Design
 Employ Best Practices learned by personal and collective experiences
 Minimize SSJS. Use Java for business logic whenever feasible
 Try to follow the MVC design pattern
 Considered using object relational mapping (i.e. Hibernate)
 Considered other developers who later will work on the application
Real World Experience: Integrating DB2 with XPages
Application Design
View Layer – UI
• XPages
• Custom Controls
Controller Layer – Business Logic
• Managed Beans
• POJOs
• Jars (server JVM/LIB/EXT folder)
Model Layer – Data
• DB2 running on mainframe
via SQL
via ???
Real World Experience: Integrating DB2 with XPages
Application Design
How is the DB2 tied to the UI elements?
viewScope is the glue that ties it all together.
 IMO it is easier to code than managed bean
members/fields
 Load it when you need it, no values are remembered
when you leave the page
 All purpose… Binds UI fields or grid data
 No need to initialize numeric data type, everything is
treated like a String in a scoped variable
Real World Experience: Integrating DB2 with XPages
Demo
Real World Experience: Integrating DB2 with XPages
During the demo, I showed how the front end is constructed where all UI controls are bound to
viewScope. This is an example of one field.
Real World Experience: Integrating DB2 with XPages
Next we also demo’d how each event uses SSJS to communicate to the java in the controller layer
Real World Experience: Integrating DB2 with XPages
Finally, I showed the java code that contained the data access. (This is part 1 of 3) Emphasis was
placed on the need to get a handle to viewScope in each method.
Real World Experience: Integrating DB2 with XPages
Java method continued (Part 2 of 3): Emphasis placed on how the SQL is constructed in the java
code. Emphasis also placed on how the result is written back to the UI
Real World Experience: Integrating DB2 with XPages
Java method continued (Part 3 of 3): Emphasis placed on the need to close out resources in the
Finally clause. Also note that this code shows having to write a fake date of ‘9999-12-31’ to columns
incorrectly built as ‘NOT NULL’ by the DBA. Referenced on slide 36, point 4.
Real World Experience: Integrating DB2 with XPages
DB2 Configuration
Real World Experience: Integrating DB2 with XPages
DB2 Configuration
 Device Drivers
 Extension Library
 java.policy
 WinSQL
 Custom Connection Manager
Real World Experience: Integrating DB2 with XPages
DB2 Configuration
 Device Drivers
 It depends on your DB2 version which drivers you use. Your DBA or Middleware
team will provide these for you
 We installed on the server in the jvm/lib/ext location. The choice was not ours to
make (IBM does not recommend this approach but instead recommends installing
as OSGI plugin)
 You do not need to install DB2 drivers locally, unless you are writing Java or LS
agents that will access DB2, and you want to test them locally. If you do then they
need to be in your local jvm/lib/ext
Real World Experience: Integrating DB2 with XPages
DB2 Configuration
 Extension Library
 The XPages Extension Library is of course required
 The version that is bundled with 9.0 is not enough
 We couldn’t get the database connection to work using a 9.0.1 at all until we
installed at least the Dec 19, 2014 version from OpenNTF
Real World Experience: Integrating DB2 with XPages
DB2 Configuration
 java.policy
 You should be aware that this file exists on your domino server
 This file is used to control security permissions for specific actions and locations
 If you put your jars in the jvm/lib/ext directory then you will want to make sure
your java.properties files grants full access:
grant codeBase "file:${java.home}/lib/ext/*" {
permission java.security.AllPermission;
};
Real World Experience: Integrating DB2 with XPages
DB2 Configuration
 WinSQL – You will certainly need a tool for easily testing your SQL. Our
company has standardized on WinSQL for this task.
 This product is offered by Synametrics and info can be found at:
http://web.synametrics.com/WinSQL.htm
 Cost is $99 for a developer license
 Comparable to Toad, SQL Developer (Oracle)
Real World Experience: Integrating DB2 with XPages
DB2 Configuration WinSQL
Real World Experience: Integrating DB2 with XPages
DB2 Configuration
 Custom Connection Manager
 NFCU has a policy that usernames and passwords are not to be kept in XML
files
 We created a custom ConnectionManager class that allows us to look to a
secure database for credentials and still allow the use of Connection Pooling
 More information on how to do this can be found on Steve’s blog at
http://notesspeak.blogspot.com/
Real World Experience: Integrating DB2 with XPages
Lessons Learned
Real World Experience: Integrating DB2 with XPages
Lessons Learned
 Know what you need from your DBA
 Take the time ahead of time to understand your application requirement
 Be sure that column widths and types are correct before coding
 Mimic what Notes databases give you by default by having system columns for
Created Date, Last Updated, Author, Last Updated By
 Do not let DBA arbitrarily specify columns to be se to NOT NULL
 Ask your DBA to consider using a stored procedure or trigger to update
intermediate tables for that are needed for many-to-many data relationships
Real World Experience: Integrating DB2 with XPages
Lessons Learned
 Know what you need from your DBA
 Ask your DBA to consider using a stored procedure or trigger to update
intermediate tables for that are needed for many-to-many data relationships
Real World Experience: Integrating DB2 with XPages
Lessons Learned
 Use the PreparedStatement class
 The PreparedStatement is a class in the java.sql package that makes it easy to
generate SQL statements
 This class protects against SQL Injection, use of this coding class is a company
standard
 This class protects against bad data causing errors
Real World Experience: Integrating DB2 with XPages
Lessons Learned
 Yes this really happened
String userCity = “D'Iberville”);
int userTaxDue = 0;
Date userTaxDue = taxDueDate;
String userID = “12345”;
String sqlUpdate = "UPDATE USER_DETAIL SET USER_CITY = ‘” + userCity +
“’, USER_TAX_DUE_AMT = “ + userTaxDue + “, USER_TAX_DUE_DT = “ +
userTaxDue + “ WHERE USER_ID = “ + userID;
Real World Experience: Integrating DB2 with XPages
Lessons Learned
 Using the PreparedStatement class
String sqlUpdate = "UPDATE USER_DETAIL SET USER_CITY = ?,
USER_TAX_DUE_AMT = ?, USER_TAX_DUE_DT = ? WHERE USER_ID = ?";
PreparedStatement ps = null;
ps = conn.prepareStatement(sqlUpdate);
ps.setString(1, “D'Iberville”);
ps.setInt(2, 0);
ps.setDate(3, new Date());
ps.setString(4, “12345”);
ps.executeUpdate();
Real World Experience: Integrating DB2 with XPages
This is the code from theme that was set to load on every page.
<resource>
<content-type>application/x-javascript</content-type>
<href>js/jquery.datepick.min.js</href>
<!-- http://keith-wood.name/datepick.HTML -->
</resource>
<resource>
<content-type>application/x-javascript</content-type>
<href>js/jquery.datepick.validation.js</href>
<!-- http://keith-wood.name/datepick.HTML -->
</resource>
Lessons Learned
 Bonus Lesson (if time allows, game time decision)
 This doesn’t have anything to do with DB2, but one major issues we had was
sporadic 403 errors when we deployed from our UNIT to INTG environment.
 The issue turned out to be resources that the server was trying to load on the
anonymous login page.
Real World Experience: Integrating DB2 with XPages
Lessons Learned
 Resolution to the evil 403 problem (thanks @edm00se)
 Fix was to change the theme to skip loading the resources on the login page
<resource rendered="#{javascript:view.getPageName() !== '/login.xsp'}">
<content-type>application/x-javascript</content-type>
<href>js/jquery.datepick.min.js</href>
<!-- http://keith-wood.name/datepick.HTML -->
</resource>
<resource rendered="#{javascript:view.getPageName() !== '/login.xsp'}“>
<content-type>application/x-javascript</content-type>
<href>js/jquery.datepick.validation.js</href>
<!-- http://keith-wood.name/datepick.HTML -->
</resource>
Real World Experience: Integrating DB2 with XPages
What your DBA wants you to know…
Real World Experience: Integrating DB2 with XPages
What your DBA wants you to know
 DB2 Explain (Optimizer)
 Understand requirements prior to approaching DBA
 You and you alone own your data
 Take time upfront to save time/frustration in the end
 Maintain data integrity
 Table structure and their relationship
Real World Experience: Integrating DB2 with XPages
What your DBA wants you to know
 DB2 Explain
 Shows the strength/weakness of your SQL
 Shows cost of running SQL
 Checks syntax
 Displays path taken to obtain data
 IBM Data Studio is the product used to display DB2 Explain results
Real World Experience: Integrating DB2 with XPages
What your DBA wants you to know
 DB2 Explain using IBM Data Studio
Real World Experience: Integrating DB2 with XPages
What your DBA wants you to know
 Understand requirements prior to approaching DBA
 All existing views shouldn’t become a table in DB2
 Final decision out of your hands now that you have to deal with a DBA
 You and you alone own your data
 Don’t ask DBA for help with data issues until you check your code
 Decimal datatype allows for setting decimal places before and after (xxx.xxxxx)
Real World Experience: Integrating DB2 with XPages
What your DBA wants you to know
 Take time upfront to save time/frustration in the end
 You don’t have total control over design so take time to think about it
 Insert timestamp has always been available with DB2
 Update timestamp is called a DB2 RowChangeTimestamp that was new in v9
 Insert/Update timestamp have zero cost for including in tables
Real World Experience: Integrating DB2 with XPages
What your DBA wants you to know
 Maintain data integrity
 Ensure data elements for dates are a date/time not text
 Number data elements contain numbers not text
 DB2 won’t allow incorrect data
 DBA does build as many safeguards possible to prevent erroneous data
 Table structure and their relationship
 DBA’s have knowledge so utilize that and don’t be afraid of them
 Drop-downs will be made into a table to maintain data integrity
Real World Experience: Integrating DB2 with XPages
Questions
Blog: http://notesspeak.blogspot.com/
Email: zavocki@hotmail.com
Twitter: @szavocki
Blog: www.xpagesnewbie.wordpress.org
Email: dwainwuerfel@gmail.com
Twitter: @dwainwuerfel

More Related Content

What's hot

Advanced Site Studio Class, June 18, 2012
Advanced Site Studio Class, June 18, 2012Advanced Site Studio Class, June 18, 2012
Advanced Site Studio Class, June 18, 2012Lee Klement
 
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010Bhupesh Bansal
 
LSC - Synchronizing identities @ Loadays 2010
 LSC - Synchronizing identities @ Loadays 2010 LSC - Synchronizing identities @ Loadays 2010
LSC - Synchronizing identities @ Loadays 2010RUDDER
 
Rollin onj Rubyv3
Rollin onj Rubyv3Rollin onj Rubyv3
Rollin onj Rubyv3Oracle
 
LinkedIn - A Professional Network built with Java Technologies and Agile Prac...
LinkedIn - A Professional Network built with Java Technologies and Agile Prac...LinkedIn - A Professional Network built with Java Technologies and Agile Prac...
LinkedIn - A Professional Network built with Java Technologies and Agile Prac...LinkedIn
 
Oracle Autonomous Database for Developers
Oracle Autonomous Database for DevelopersOracle Autonomous Database for Developers
Oracle Autonomous Database for DevelopersTércio Costa
 
Architecting virtualized infrastructure for big data presentation
Architecting virtualized infrastructure for big data presentationArchitecting virtualized infrastructure for big data presentation
Architecting virtualized infrastructure for big data presentationVlad Ponomarev
 
Things Every Oracle DBA Needs to Know about the Hadoop Ecosystem
Things Every Oracle DBA Needs to Know about the Hadoop EcosystemThings Every Oracle DBA Needs to Know about the Hadoop Ecosystem
Things Every Oracle DBA Needs to Know about the Hadoop EcosystemZohar Elkayam
 
LSC - Synchronizing identities @ Loadays 2010
LSC - Synchronizing identities @ Loadays 2010LSC - Synchronizing identities @ Loadays 2010
LSC - Synchronizing identities @ Loadays 2010Jonathan Clarke
 
CORE JAVA & ADVANCE JAVA
CORE JAVA & ADVANCE JAVACORE JAVA & ADVANCE JAVA
CORE JAVA & ADVANCE JAVABALUJAINSTITUTE
 
CORE JAVA & ADVANCE JAVA
CORE JAVA & ADVANCE JAVACORE JAVA & ADVANCE JAVA
CORE JAVA & ADVANCE JAVABALUJAINSTITUTE
 
Introduction to CQRS - command and query responsibility segregation
Introduction to CQRS - command and query responsibility segregationIntroduction to CQRS - command and query responsibility segregation
Introduction to CQRS - command and query responsibility segregationAndrew Siemer
 
Effiziente Datenpersistierung mit JPA 2.1 und Hibernate
Effiziente Datenpersistierung mit JPA 2.1 und HibernateEffiziente Datenpersistierung mit JPA 2.1 und Hibernate
Effiziente Datenpersistierung mit JPA 2.1 und HibernateThorben Janssen
 
JDBC : Java Database Connectivity
JDBC : Java Database Connectivity JDBC : Java Database Connectivity
JDBC : Java Database Connectivity DevAdnani
 
Apache Cayenne: a Java ORM Alternative
Apache Cayenne: a Java ORM AlternativeApache Cayenne: a Java ORM Alternative
Apache Cayenne: a Java ORM AlternativeAndrus Adamchik
 
Exploring Oracle Multitenant in Oracle Database 12c
Exploring Oracle Multitenant in Oracle Database 12cExploring Oracle Multitenant in Oracle Database 12c
Exploring Oracle Multitenant in Oracle Database 12cZohar Elkayam
 
Reactive Relational Database Connectivity
Reactive Relational Database ConnectivityReactive Relational Database Connectivity
Reactive Relational Database ConnectivityVMware Tanzu
 

What's hot (20)

Advanced Site Studio Class, June 18, 2012
Advanced Site Studio Class, June 18, 2012Advanced Site Studio Class, June 18, 2012
Advanced Site Studio Class, June 18, 2012
 
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
 
LSC - Synchronizing identities @ Loadays 2010
 LSC - Synchronizing identities @ Loadays 2010 LSC - Synchronizing identities @ Loadays 2010
LSC - Synchronizing identities @ Loadays 2010
 
Rollin onj Rubyv3
Rollin onj Rubyv3Rollin onj Rubyv3
Rollin onj Rubyv3
 
LinkedIn - A Professional Network built with Java Technologies and Agile Prac...
LinkedIn - A Professional Network built with Java Technologies and Agile Prac...LinkedIn - A Professional Network built with Java Technologies and Agile Prac...
LinkedIn - A Professional Network built with Java Technologies and Agile Prac...
 
Oracle Autonomous Database for Developers
Oracle Autonomous Database for DevelopersOracle Autonomous Database for Developers
Oracle Autonomous Database for Developers
 
Architecting virtualized infrastructure for big data presentation
Architecting virtualized infrastructure for big data presentationArchitecting virtualized infrastructure for big data presentation
Architecting virtualized infrastructure for big data presentation
 
Things Every Oracle DBA Needs to Know about the Hadoop Ecosystem
Things Every Oracle DBA Needs to Know about the Hadoop EcosystemThings Every Oracle DBA Needs to Know about the Hadoop Ecosystem
Things Every Oracle DBA Needs to Know about the Hadoop Ecosystem
 
LSC - Synchronizing identities @ Loadays 2010
LSC - Synchronizing identities @ Loadays 2010LSC - Synchronizing identities @ Loadays 2010
LSC - Synchronizing identities @ Loadays 2010
 
CORE JAVA & ADVANCE JAVA
CORE JAVA & ADVANCE JAVACORE JAVA & ADVANCE JAVA
CORE JAVA & ADVANCE JAVA
 
CORE JAVA & ADVANCE JAVA
CORE JAVA & ADVANCE JAVACORE JAVA & ADVANCE JAVA
CORE JAVA & ADVANCE JAVA
 
10 jdbc
10 jdbc10 jdbc
10 jdbc
 
Introduction to CQRS - command and query responsibility segregation
Introduction to CQRS - command and query responsibility segregationIntroduction to CQRS - command and query responsibility segregation
Introduction to CQRS - command and query responsibility segregation
 
Effiziente Datenpersistierung mit JPA 2.1 und Hibernate
Effiziente Datenpersistierung mit JPA 2.1 und HibernateEffiziente Datenpersistierung mit JPA 2.1 und Hibernate
Effiziente Datenpersistierung mit JPA 2.1 und Hibernate
 
Where to save my data, for devs!
Where to save my data, for devs!Where to save my data, for devs!
Where to save my data, for devs!
 
JDBC : Java Database Connectivity
JDBC : Java Database Connectivity JDBC : Java Database Connectivity
JDBC : Java Database Connectivity
 
Apache Cayenne: a Java ORM Alternative
Apache Cayenne: a Java ORM AlternativeApache Cayenne: a Java ORM Alternative
Apache Cayenne: a Java ORM Alternative
 
Hadoop 101
Hadoop 101Hadoop 101
Hadoop 101
 
Exploring Oracle Multitenant in Oracle Database 12c
Exploring Oracle Multitenant in Oracle Database 12cExploring Oracle Multitenant in Oracle Database 12c
Exploring Oracle Multitenant in Oracle Database 12c
 
Reactive Relational Database Connectivity
Reactive Relational Database ConnectivityReactive Relational Database Connectivity
Reactive Relational Database Connectivity
 

Similar to Real World Experience: Integrating DB2 with XPages

Connect2014 Show104: Practical Java
Connect2014 Show104: Practical JavaConnect2014 Show104: Practical Java
Connect2014 Show104: Practical Javapanagenda
 
SHOW104: Practical Java
SHOW104: Practical JavaSHOW104: Practical Java
SHOW104: Practical JavaMark Myers
 
Experiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure teamExperiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure teamBrian Benz
 
Handling Database Deployments
Handling Database DeploymentsHandling Database Deployments
Handling Database DeploymentsMike Willbanks
 
Sql 2012 always on
Sql 2012 always onSql 2012 always on
Sql 2012 always ondilip nayak
 
Installing ibm docs on a single server
Installing ibm docs on a single serverInstalling ibm docs on a single server
Installing ibm docs on a single serverRoberto Boccadoro
 
Sql And Storage Considerations For Share Point Server 2010
Sql And Storage Considerations For Share Point Server 2010Sql And Storage Considerations For Share Point Server 2010
Sql And Storage Considerations For Share Point Server 2010Mike Watson
 
S3 l3 db2 environment - instances
S3 l3   db2 environment - instancesS3 l3   db2 environment - instances
S3 l3 db2 environment - instancesMohammad Khan
 
Using MS-SQL Server with Visual DataFlex
Using MS-SQL Server with Visual DataFlexUsing MS-SQL Server with Visual DataFlex
Using MS-SQL Server with Visual DataFlexwebhostingguy
 
Using Doctrine Migrations to Synchronize Databases
Using Doctrine Migrations to Synchronize DatabasesUsing Doctrine Migrations to Synchronize Databases
Using Doctrine Migrations to Synchronize DatabasesBryce Embry
 
DevDays 2011- Let’s get ready for the cloud: Building your applications so th...
DevDays 2011- Let’s get ready for the cloud: Building your applications so th...DevDays 2011- Let’s get ready for the cloud: Building your applications so th...
DevDays 2011- Let’s get ready for the cloud: Building your applications so th...Robert MacLean
 
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...Amit Singh
 
Ibm web sphere_job_interview_preparation_guide
Ibm web sphere_job_interview_preparation_guideIbm web sphere_job_interview_preparation_guide
Ibm web sphere_job_interview_preparation_guideKhemnath Chauhan
 
Upgrading to Windows Server 2019 on Dell EMC PowerEdge servers: A simple proc...
Upgrading to Windows Server 2019 on Dell EMC PowerEdge servers: A simple proc...Upgrading to Windows Server 2019 on Dell EMC PowerEdge servers: A simple proc...
Upgrading to Windows Server 2019 on Dell EMC PowerEdge servers: A simple proc...Principled Technologies
 

Similar to Real World Experience: Integrating DB2 with XPages (20)

Connect2014 Show104: Practical Java
Connect2014 Show104: Practical JavaConnect2014 Show104: Practical Java
Connect2014 Show104: Practical Java
 
SHOW104: Practical Java
SHOW104: Practical JavaSHOW104: Practical Java
SHOW104: Practical Java
 
IBM COE course book
IBM COE course bookIBM COE course book
IBM COE course book
 
Jdbc_ravi_2016
Jdbc_ravi_2016Jdbc_ravi_2016
Jdbc_ravi_2016
 
Vara Framework
Vara FrameworkVara Framework
Vara Framework
 
Db2exc guide 952_mac_x86_64
Db2exc guide 952_mac_x86_64Db2exc guide 952_mac_x86_64
Db2exc guide 952_mac_x86_64
 
Experiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure teamExperiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure team
 
Handling Database Deployments
Handling Database DeploymentsHandling Database Deployments
Handling Database Deployments
 
Sql 2012 always on
Sql 2012 always onSql 2012 always on
Sql 2012 always on
 
Installing ibm docs on a single server
Installing ibm docs on a single serverInstalling ibm docs on a single server
Installing ibm docs on a single server
 
Sql And Storage Considerations For Share Point Server 2010
Sql And Storage Considerations For Share Point Server 2010Sql And Storage Considerations For Share Point Server 2010
Sql And Storage Considerations For Share Point Server 2010
 
Sqllite
SqlliteSqllite
Sqllite
 
S3 l3 db2 environment - instances
S3 l3   db2 environment - instancesS3 l3   db2 environment - instances
S3 l3 db2 environment - instances
 
WebLogic FAQs
WebLogic FAQsWebLogic FAQs
WebLogic FAQs
 
Using MS-SQL Server with Visual DataFlex
Using MS-SQL Server with Visual DataFlexUsing MS-SQL Server with Visual DataFlex
Using MS-SQL Server with Visual DataFlex
 
Using Doctrine Migrations to Synchronize Databases
Using Doctrine Migrations to Synchronize DatabasesUsing Doctrine Migrations to Synchronize Databases
Using Doctrine Migrations to Synchronize Databases
 
DevDays 2011- Let’s get ready for the cloud: Building your applications so th...
DevDays 2011- Let’s get ready for the cloud: Building your applications so th...DevDays 2011- Let’s get ready for the cloud: Building your applications so th...
DevDays 2011- Let’s get ready for the cloud: Building your applications so th...
 
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
 
Ibm web sphere_job_interview_preparation_guide
Ibm web sphere_job_interview_preparation_guideIbm web sphere_job_interview_preparation_guide
Ibm web sphere_job_interview_preparation_guide
 
Upgrading to Windows Server 2019 on Dell EMC PowerEdge servers: A simple proc...
Upgrading to Windows Server 2019 on Dell EMC PowerEdge servers: A simple proc...Upgrading to Windows Server 2019 on Dell EMC PowerEdge servers: A simple proc...
Upgrading to Windows Server 2019 on Dell EMC PowerEdge servers: A simple proc...
 

Recently uploaded

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 

Recently uploaded (20)

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

Real World Experience: Integrating DB2 with XPages

  • 1. AD 112: Real World Experience: Integrating DB2 with XPages Steve Zavocki Navy Federal Credit Union Consultant Dwain Wuerfel Navy Federal Credit Union
  • 2. Real World Experience: Integrating DB2 with XPages About Steve  Notes Developer since 1996  Exclusively XPages since 2012  Fluent in Java, and use it whenever possible  Have been a consultant with Navy Federal since April 2014 working out of Milton, Florida  Blog: http://notesspeak.blogspot.com/  Email: zavocki@hotmail.com  Twitter: @szavocki
  • 3. Real World Experience: Integrating DB2 with XPages About Dwain  Notes Developer since 1997  XPages since 2011  Have been an employee with Navy Federal since July 2014 working out of Milton, Florida  Blog: www.xpagesnewbie.wordpress.org  Email: dwainwuerfel@gmail.com  Twitter: @dwainwuerfel
  • 4. Real World Experience: Integrating DB2 with XPages About Navy Federal Credit Union  The world’s largest credit union  $69 billion in assets and over 5.5 million members  Approximately 12,000 employees worldwide  Member-owned and not-for-profit  We offer credit cards, auto loans, mortgages, checking and savings, CDs, IRAs and our subsidiary Navy Federal Financial Group offers investments & insurance  Navy Federal: Field of Membership •We serve all Department of Defense and Coast Guard active duty, civilian and contractor personnel and their families •We have 270 branches worldwide; online, mobile account access, and call center 24/7  FORTUNE's 100 Best Companies to Work For in 2015  Fifth time selected  ComputerWorld’s 2015 Best Place to Work in IT
  • 5. Real World Experience: Integrating DB2 with XPages Agenda  Why use DB2?  Application Overview  Application Design  DB2 configuration  Lessons Learned  What your DBA wants you to know
  • 6. Real World Experience: Integrating DB2 with XPages
  • 7. Real World Experience: Integrating DB2 with XPages Why Use DB2?  Performance  Why is this important to NFCU?  References
  • 8. Real World Experience: Integrating DB2 with XPages Why Use DB2?  Performance  DB2 z/OS, DB2 LUW, Oracle, SQL Server, Teradata, and Notes  Navy Federal uses all these, but chose DB2 for XPages back-end  Timestamp data type to the one millionth place  Both Notes and Java only use one thousandth Notes/Java: 07:50:25.123000 DB2: 07:50:25.123456
  • 9. Real World Experience: Integrating DB2 with XPages Why Use DB2?  Performance cont’d…  10 or 10,000,000 rows irrelevant  Don’t try this using a Notes database  Physical storage is allocated for future growth  This means you never encounter an out of space condition  Moves large quantities of data and manages high volume of transaction  Potential for large volumes of transactions  DB2 has data sharing which is similar to replication/clustering  Know that this exists, DBA should already be using this
  • 10. Real World Experience: Integrating DB2 with XPages Why Use DB2?  Why is this important to Navy FCU you ask  Navy FCU measures success as “No Perceived Downtime”  XPages uses DB2 as a back-end due to the existing transactional member/customer facing applications  Auditing  Security Concerns
  • 11. Real World Experience: Integrating DB2 with XPages Why Use DB2?  Comparison with Oracle  http://www-01.ibm.com/software/info/rte/breakfree/tw.html  More information about the benefits of DB2  http://www-01.ibm.com/software/data/db2/zos/family/
  • 12. Real World Experience: Integrating DB2 with XPages Application Overview
  • 13. Real World Experience: Integrating DB2 with XPages Application Overview  In a nutshell, the application manages ATM by providing a web browser front- end to a mainframe application  This application replaces having a person use the green screen, and it eliminates tedious data entry into an MS Access database  All actions that take place whether user initiated or scheduled are recorded in DB  The data is then used for reporting and searching
  • 14. Real World Experience: Integrating DB2 with XPages
  • 15. Real World Experience: Integrating DB2 with XPages Application Overview
  • 16. Real World Experience: Integrating DB2 with XPages Application Design
  • 17. Real World Experience: Integrating DB2 with XPages Application Design  Employ Best Practices learned by personal and collective experiences  Minimize SSJS. Use Java for business logic whenever feasible  Try to follow the MVC design pattern  Considered using object relational mapping (i.e. Hibernate)  Considered other developers who later will work on the application
  • 18. Real World Experience: Integrating DB2 with XPages Application Design View Layer – UI • XPages • Custom Controls Controller Layer – Business Logic • Managed Beans • POJOs • Jars (server JVM/LIB/EXT folder) Model Layer – Data • DB2 running on mainframe via SQL via ???
  • 19. Real World Experience: Integrating DB2 with XPages Application Design How is the DB2 tied to the UI elements? viewScope is the glue that ties it all together.  IMO it is easier to code than managed bean members/fields  Load it when you need it, no values are remembered when you leave the page  All purpose… Binds UI fields or grid data  No need to initialize numeric data type, everything is treated like a String in a scoped variable
  • 20. Real World Experience: Integrating DB2 with XPages Demo
  • 21. Real World Experience: Integrating DB2 with XPages During the demo, I showed how the front end is constructed where all UI controls are bound to viewScope. This is an example of one field.
  • 22. Real World Experience: Integrating DB2 with XPages Next we also demo’d how each event uses SSJS to communicate to the java in the controller layer
  • 23. Real World Experience: Integrating DB2 with XPages Finally, I showed the java code that contained the data access. (This is part 1 of 3) Emphasis was placed on the need to get a handle to viewScope in each method.
  • 24. Real World Experience: Integrating DB2 with XPages Java method continued (Part 2 of 3): Emphasis placed on how the SQL is constructed in the java code. Emphasis also placed on how the result is written back to the UI
  • 25. Real World Experience: Integrating DB2 with XPages Java method continued (Part 3 of 3): Emphasis placed on the need to close out resources in the Finally clause. Also note that this code shows having to write a fake date of ‘9999-12-31’ to columns incorrectly built as ‘NOT NULL’ by the DBA. Referenced on slide 36, point 4.
  • 26. Real World Experience: Integrating DB2 with XPages DB2 Configuration
  • 27. Real World Experience: Integrating DB2 with XPages DB2 Configuration  Device Drivers  Extension Library  java.policy  WinSQL  Custom Connection Manager
  • 28. Real World Experience: Integrating DB2 with XPages DB2 Configuration  Device Drivers  It depends on your DB2 version which drivers you use. Your DBA or Middleware team will provide these for you  We installed on the server in the jvm/lib/ext location. The choice was not ours to make (IBM does not recommend this approach but instead recommends installing as OSGI plugin)  You do not need to install DB2 drivers locally, unless you are writing Java or LS agents that will access DB2, and you want to test them locally. If you do then they need to be in your local jvm/lib/ext
  • 29. Real World Experience: Integrating DB2 with XPages DB2 Configuration  Extension Library  The XPages Extension Library is of course required  The version that is bundled with 9.0 is not enough  We couldn’t get the database connection to work using a 9.0.1 at all until we installed at least the Dec 19, 2014 version from OpenNTF
  • 30. Real World Experience: Integrating DB2 with XPages DB2 Configuration  java.policy  You should be aware that this file exists on your domino server  This file is used to control security permissions for specific actions and locations  If you put your jars in the jvm/lib/ext directory then you will want to make sure your java.properties files grants full access: grant codeBase "file:${java.home}/lib/ext/*" { permission java.security.AllPermission; };
  • 31. Real World Experience: Integrating DB2 with XPages DB2 Configuration  WinSQL – You will certainly need a tool for easily testing your SQL. Our company has standardized on WinSQL for this task.  This product is offered by Synametrics and info can be found at: http://web.synametrics.com/WinSQL.htm  Cost is $99 for a developer license  Comparable to Toad, SQL Developer (Oracle)
  • 32. Real World Experience: Integrating DB2 with XPages DB2 Configuration WinSQL
  • 33. Real World Experience: Integrating DB2 with XPages DB2 Configuration  Custom Connection Manager  NFCU has a policy that usernames and passwords are not to be kept in XML files  We created a custom ConnectionManager class that allows us to look to a secure database for credentials and still allow the use of Connection Pooling  More information on how to do this can be found on Steve’s blog at http://notesspeak.blogspot.com/
  • 34. Real World Experience: Integrating DB2 with XPages Lessons Learned
  • 35. Real World Experience: Integrating DB2 with XPages Lessons Learned  Know what you need from your DBA  Take the time ahead of time to understand your application requirement  Be sure that column widths and types are correct before coding  Mimic what Notes databases give you by default by having system columns for Created Date, Last Updated, Author, Last Updated By  Do not let DBA arbitrarily specify columns to be se to NOT NULL  Ask your DBA to consider using a stored procedure or trigger to update intermediate tables for that are needed for many-to-many data relationships
  • 36. Real World Experience: Integrating DB2 with XPages Lessons Learned  Know what you need from your DBA  Ask your DBA to consider using a stored procedure or trigger to update intermediate tables for that are needed for many-to-many data relationships
  • 37. Real World Experience: Integrating DB2 with XPages Lessons Learned  Use the PreparedStatement class  The PreparedStatement is a class in the java.sql package that makes it easy to generate SQL statements  This class protects against SQL Injection, use of this coding class is a company standard  This class protects against bad data causing errors
  • 38. Real World Experience: Integrating DB2 with XPages Lessons Learned  Yes this really happened String userCity = “D'Iberville”); int userTaxDue = 0; Date userTaxDue = taxDueDate; String userID = “12345”; String sqlUpdate = "UPDATE USER_DETAIL SET USER_CITY = ‘” + userCity + “’, USER_TAX_DUE_AMT = “ + userTaxDue + “, USER_TAX_DUE_DT = “ + userTaxDue + “ WHERE USER_ID = “ + userID;
  • 39. Real World Experience: Integrating DB2 with XPages Lessons Learned  Using the PreparedStatement class String sqlUpdate = "UPDATE USER_DETAIL SET USER_CITY = ?, USER_TAX_DUE_AMT = ?, USER_TAX_DUE_DT = ? WHERE USER_ID = ?"; PreparedStatement ps = null; ps = conn.prepareStatement(sqlUpdate); ps.setString(1, “D'Iberville”); ps.setInt(2, 0); ps.setDate(3, new Date()); ps.setString(4, “12345”); ps.executeUpdate();
  • 40. Real World Experience: Integrating DB2 with XPages This is the code from theme that was set to load on every page. <resource> <content-type>application/x-javascript</content-type> <href>js/jquery.datepick.min.js</href> <!-- http://keith-wood.name/datepick.HTML --> </resource> <resource> <content-type>application/x-javascript</content-type> <href>js/jquery.datepick.validation.js</href> <!-- http://keith-wood.name/datepick.HTML --> </resource> Lessons Learned  Bonus Lesson (if time allows, game time decision)  This doesn’t have anything to do with DB2, but one major issues we had was sporadic 403 errors when we deployed from our UNIT to INTG environment.  The issue turned out to be resources that the server was trying to load on the anonymous login page.
  • 41. Real World Experience: Integrating DB2 with XPages Lessons Learned  Resolution to the evil 403 problem (thanks @edm00se)  Fix was to change the theme to skip loading the resources on the login page <resource rendered="#{javascript:view.getPageName() !== '/login.xsp'}"> <content-type>application/x-javascript</content-type> <href>js/jquery.datepick.min.js</href> <!-- http://keith-wood.name/datepick.HTML --> </resource> <resource rendered="#{javascript:view.getPageName() !== '/login.xsp'}“> <content-type>application/x-javascript</content-type> <href>js/jquery.datepick.validation.js</href> <!-- http://keith-wood.name/datepick.HTML --> </resource>
  • 42. Real World Experience: Integrating DB2 with XPages What your DBA wants you to know…
  • 43. Real World Experience: Integrating DB2 with XPages What your DBA wants you to know  DB2 Explain (Optimizer)  Understand requirements prior to approaching DBA  You and you alone own your data  Take time upfront to save time/frustration in the end  Maintain data integrity  Table structure and their relationship
  • 44. Real World Experience: Integrating DB2 with XPages What your DBA wants you to know  DB2 Explain  Shows the strength/weakness of your SQL  Shows cost of running SQL  Checks syntax  Displays path taken to obtain data  IBM Data Studio is the product used to display DB2 Explain results
  • 45. Real World Experience: Integrating DB2 with XPages What your DBA wants you to know  DB2 Explain using IBM Data Studio
  • 46. Real World Experience: Integrating DB2 with XPages What your DBA wants you to know  Understand requirements prior to approaching DBA  All existing views shouldn’t become a table in DB2  Final decision out of your hands now that you have to deal with a DBA  You and you alone own your data  Don’t ask DBA for help with data issues until you check your code  Decimal datatype allows for setting decimal places before and after (xxx.xxxxx)
  • 47. Real World Experience: Integrating DB2 with XPages What your DBA wants you to know  Take time upfront to save time/frustration in the end  You don’t have total control over design so take time to think about it  Insert timestamp has always been available with DB2  Update timestamp is called a DB2 RowChangeTimestamp that was new in v9  Insert/Update timestamp have zero cost for including in tables
  • 48. Real World Experience: Integrating DB2 with XPages What your DBA wants you to know  Maintain data integrity  Ensure data elements for dates are a date/time not text  Number data elements contain numbers not text  DB2 won’t allow incorrect data  DBA does build as many safeguards possible to prevent erroneous data  Table structure and their relationship  DBA’s have knowledge so utilize that and don’t be afraid of them  Drop-downs will be made into a table to maintain data integrity
  • 49. Real World Experience: Integrating DB2 with XPages Questions Blog: http://notesspeak.blogspot.com/ Email: zavocki@hotmail.com Twitter: @szavocki Blog: www.xpagesnewbie.wordpress.org Email: dwainwuerfel@gmail.com Twitter: @dwainwuerfel