SAP HANA Cloud – Virtual Bootcamp
How to use the HANA Persistence Service
@saphanacloud
Dr. Bernd Hofmann
April 2013
SAP HANA Cloud
© 2012 SAP AG. All rights reserved. 2
Disclaimer
This presentation outlines our general product direction and should not be relied on in making a
purchase decision. This presentation is not subject to your license agreement or any other agreement
with SAP. SAP has no obligation to pursue any course of business outlined in this presentation or to
develop or release any functionality mentioned in this presentation. This presentation and SAP's
strategy and possible future developments are subject to change and may be changed by SAP at any
time for any reason without notice. This document is provided without a warranty of any kind, either
express or implied, including but not limited to, the implied warranties of merchantability, fitness for a
particular purpose, or non-infringement. SAP assumes no responsibility for errors or omissions in this
document, except if such damages were caused by SAP intentionally or grossly negligent.
© 2012 SAP AG. All rights reserved. 3
Why SAP HANA Cloud Persistence Service?
SAP HANA DBSAP HANA DB
© 2012 SAP AG. All rights reserved. 4
SAP HANA Cloud Persistence Service
Application
JDBC / JPA
schema / user / connectivity
SAP HANA DB
 pool of databases
 installation + upgrade
 backup + restore
 monitoring + alerting
 high availability (planned)
 24x7 operations
Sybase ASE
MaxDB
© 2012 SAP AG. All rights reserved. 5
How to access the SAP HANA DB
2 Possibilities
 JDBC
 JPA (EclipseLink)
2 SDKs
 1.*
 2.* (beta): Java EE 6 Web Profile (certified)
© 2012 SAP AG. All rights reserved. 6
How to access the SAP HANA DB
SDK 1.* SDK 2.* (Beta)
JDBC
JPA
persistence-with-jpa
Adding Persistence Using JPA
(SDK 1.x)
persistence-with-ejb
Adding Persistence Using JPA
(SDK 2.x Beta)
Adding Persistence Using JDBC
persistence-with-jdbc (≥ SDK 1.24.1)
Relational Persistence
Application-managed Persistence Container-managed Persistence
© 2012 SAP AG. All rights reserved. 7
What is JPA?
ID FIRSTNAME LASTNAME ID MANAGER
ID FIRSTNAME LASTNAME CLASS MANAGER
PERSON EMPLOYEE
PERSON_EMPLOYEE
RDBMS
?
© 2012 SAP AG. All rights reserved. 8
EclipseLink
 JPA (Java Persistence API, JSR 317)
 Object/Relational Mapping
 Reference Implementation:
EclipseLink
 SAP has two committers
 SAP HANA Cloud always uses latest
released version (at present 2.4.1)
 Other JPA providers (e.g. Hibernate,
OpenJPA, ..) are also possible
RDBMS
© 2012 SAP AG. All rights reserved. 9
JPA and SAP HANA DB
…
Derby Oracle Sybase
ASE
SAP
MaxDB
SAP
HANA DB
Application
SAP
HANA DB
…
© 2012 SAP AG. All rights reserved. 10
Until then (Release of EclipseLink 2.5.0) …
1. [only SDK 1.x]
Add
com.sap.core.persistence.osgi.hdb.platform_x.y.z.jar
(in SDK repository/plugins) to your
lib
folder (as explained in Adding Persistence Using JPA (SDK 1.x), step 3.1.2)
2. Add
<property name="eclipselink.target-database" value="HANA"/>
to your
persistence.xml
3. [if necessary; once only!]
re-deploy with
<property name="eclipselink.ddl-generation" value="drop-and-create-
tables"/>
Samples run out of the box!
Demo
© 2012 SAP AG. All rights reserved. 12
Demo Scenarios
SAP
HANA DB
AppApp
Derby SAP
HANA DB
1 2
3
local SAP HANA Cloud
© 2012 SAP AG. All rights reserved. 13
Access of HANA DB in HANA Cloud
AppJDBC
HANA Studio
HTTPS
JDBC
?
Browser
Demo
© 2012 SAP AG. All rights reserved. 15
Further Information
 SAP HANA Cloud Homepage
 SAP HANA Cloud Persistence Service (Documentation)
 www.saphana.com
Partner Center
 https://www.saphanacloudappspartnercenter.com
Developer Center
 http://scn.sap.com/community/developer-center/cloud-platform
SAP HANA Cloud
bit.ly/saphanacloud@saphanacloud
© 2012 SAP AG. All rights reserved. 16
SAP HANA Cloud Virtual Bootcamp Sessions
Schedule
Virtual Bootcamp session of 1.5 hours:
 5th Virtual Bootcamp: Securing SAP HANA Cloud Applications: May 9th, 5 p.m. CET
Security, Identity and Access Management are top priorities when considering moving applications to the cloud. This lecture gives guidance on how you can
use the features to build solutions that meet your security requirements.
 As a flexible and open cloud platform, does SAP HANA Cloud provide the rock-solid security required for your most sensitive data and applications?
 How do you authenticate and authorize users?
 How is your data isolated on SAP HANA Cloud and can you securely connect to your On-Premise systems?
 How do you secure access from mobile clients, and what if you want to have Single Sign-On (SSO) with other SAP Cloud solutions via SAP ID
Service or your corporate user directory?
At the end of each session, we will give some time for Q&A.
Remarks:
■ The Virtual Bootcamp sessions are scheduled for the developers of our HANA Cloud Applications partners
and the community interested in our HANA Cloud Applications partner program.
■ The sessions will be recorded and provided to our HANA Cloud Partner community.
Discussion / Q&A
© 2012 SAP AG. All rights reserved. 18
Questions & Answers
Q: Where is HANA actually hosted - what latency between the Java application and HANA database one can expect?
A: The HANA databases are located in the same data center as the applications (as can be seen on slide 13), so there is
minimal latency between application and database.
Q: Can different applications in the same account use different database types (HANA vs. non-HANA)?
A: No, at present the configuration of the database type is on account level.
Q: What is the roadmap for supporting that?
A: By end of Q2/2013 it will be possible to specify the database type (HANA DB, Sybase ASE, MaxDB) as new parameter of
the deployment. With that option it will be possible to assign each application to its own database type independently of
the other applications in the same account.
Thank You!
Contact information:
Dr. Bernd Hofmann
SAP HANA Cloud
bernd.hofmann@sap.com
© 2012 SAP AG. All rights reserved. 20
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express
permission of SAP AG. The information contained herein may be changed without prior notice.
Some software products marketed by SAP AG and its distributors contain proprietary software components of
other software vendors.
Microsoft, Windows, Excel, Outlook, PowerPoint, Silverlight, and Visual Studio are registered trademarks of
Microsoft Corporation.
IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System
z10, z10, z/VM, z/OS, OS/390, zEnterprise, PowerVM, Power Architecture, Power Systems, POWER7,
POWER6+, POWER6, POWER, PowerHA, pureScale, PowerPC, BladeCenter, System Storage, Storwize,
XIV, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, AIX, Intelligent Miner, WebSphere,
Tivoli, Informix, and Smarter Planet are trademarks or registered trademarks of IBM Corporation.
Linux is the registered trademark of Linus Torvalds in the United States and other countries.
Adobe, the Adobe logo, Acrobat, PostScript, and Reader are trademarks or registered trademarks of Adobe
Systems Incorporated in the United States and other countries.
Oracle and Java are registered trademarks of Oracle and its affiliates.
UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.
Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or
registered trademarks of Citrix Systems Inc.
HTML, XML, XHTML, and W3C are trademarks or registered trademarks of W3C®, World Wide Web
Consortium, Massachusetts Institute of Technology.
Apple, App Store, iBooks, iPad, iPhone, iPhoto, iPod, iTunes, Multi-Touch, Objective-C, Retina, Safari, Siri,
and Xcode are trademarks or registered trademarks of Apple Inc.
IOS is a registered trademark of Cisco Systems Inc.
RIM, BlackBerry, BBM, BlackBerry Curve, BlackBerry Bold, BlackBerry Pearl, BlackBerry Torch, BlackBerry
Storm, BlackBerry Storm2, BlackBerry PlayBook, and BlackBerry App World are trademarks or registered
trademarks of Research in Motion Limited.
© 2012 SAP AG. All rights reserved.
Google App Engine, Google Apps, Google Checkout, Google Data API, Google Maps, Google Mobile Ads,
Google Mobile Updater, Google Mobile, Google Store, Google Sync, Google Updater, Google Voice,
Google Mail, Gmail, YouTube, Dalvik and Android are trademarks or registered trademarks of Google Inc.
INTERMEC is a registered trademark of Intermec Technologies Corporation.
Wi-Fi is a registered trademark of Wi-Fi Alliance.
Bluetooth is a registered trademark of Bluetooth SIG Inc.
Motorola is a registered trademark of Motorola Trademark Holdings LLC.
Computop is a registered trademark of Computop Wirtschaftsinformatik GmbH.
SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer, StreamWork,
SAP HANA, and other SAP products and services mentioned herein as well as their respective logos are
trademarks or registered trademarks of SAP AG in Germany and other countries.
Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web
Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their
respective logos are trademarks or registered trademarks of Business Objects Software Ltd. Business Objects
is an SAP company.
Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other Sybase products and services
mentioned herein as well as their respective logos are trademarks or registered trademarks of Sybase Inc.
Sybase is an SAP company.
Crossgate, m@gic EDDY, B2B 360°, and B2B 360° Services are registered trademarks of Crossgate AG
in Germany and other countries. Crossgate is an SAP company.
All other product and service names mentioned are the trademarks of their respective companies. Data
contained in this document serves informational purposes only. National product specifications may vary.
The information in this document is proprietary to SAP. No part of this document may be reproduced, copied,
or transmitted in any form or for any purpose without the express prior written permission of SAP AG.

SAP HANA Cloud – Virtual Bootcamp: How to use the HANA Persistence Se…

  • 1.
    SAP HANA Cloud– Virtual Bootcamp How to use the HANA Persistence Service @saphanacloud Dr. Bernd Hofmann April 2013 SAP HANA Cloud
  • 2.
    © 2012 SAPAG. All rights reserved. 2 Disclaimer This presentation outlines our general product direction and should not be relied on in making a purchase decision. This presentation is not subject to your license agreement or any other agreement with SAP. SAP has no obligation to pursue any course of business outlined in this presentation or to develop or release any functionality mentioned in this presentation. This presentation and SAP's strategy and possible future developments are subject to change and may be changed by SAP at any time for any reason without notice. This document is provided without a warranty of any kind, either express or implied, including but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. SAP assumes no responsibility for errors or omissions in this document, except if such damages were caused by SAP intentionally or grossly negligent.
  • 3.
    © 2012 SAPAG. All rights reserved. 3 Why SAP HANA Cloud Persistence Service? SAP HANA DBSAP HANA DB
  • 4.
    © 2012 SAPAG. All rights reserved. 4 SAP HANA Cloud Persistence Service Application JDBC / JPA schema / user / connectivity SAP HANA DB  pool of databases  installation + upgrade  backup + restore  monitoring + alerting  high availability (planned)  24x7 operations Sybase ASE MaxDB
  • 5.
    © 2012 SAPAG. All rights reserved. 5 How to access the SAP HANA DB 2 Possibilities  JDBC  JPA (EclipseLink) 2 SDKs  1.*  2.* (beta): Java EE 6 Web Profile (certified)
  • 6.
    © 2012 SAPAG. All rights reserved. 6 How to access the SAP HANA DB SDK 1.* SDK 2.* (Beta) JDBC JPA persistence-with-jpa Adding Persistence Using JPA (SDK 1.x) persistence-with-ejb Adding Persistence Using JPA (SDK 2.x Beta) Adding Persistence Using JDBC persistence-with-jdbc (≥ SDK 1.24.1) Relational Persistence Application-managed Persistence Container-managed Persistence
  • 7.
    © 2012 SAPAG. All rights reserved. 7 What is JPA? ID FIRSTNAME LASTNAME ID MANAGER ID FIRSTNAME LASTNAME CLASS MANAGER PERSON EMPLOYEE PERSON_EMPLOYEE RDBMS ?
  • 8.
    © 2012 SAPAG. All rights reserved. 8 EclipseLink  JPA (Java Persistence API, JSR 317)  Object/Relational Mapping  Reference Implementation: EclipseLink  SAP has two committers  SAP HANA Cloud always uses latest released version (at present 2.4.1)  Other JPA providers (e.g. Hibernate, OpenJPA, ..) are also possible RDBMS
  • 9.
    © 2012 SAPAG. All rights reserved. 9 JPA and SAP HANA DB … Derby Oracle Sybase ASE SAP MaxDB SAP HANA DB Application SAP HANA DB …
  • 10.
    © 2012 SAPAG. All rights reserved. 10 Until then (Release of EclipseLink 2.5.0) … 1. [only SDK 1.x] Add com.sap.core.persistence.osgi.hdb.platform_x.y.z.jar (in SDK repository/plugins) to your lib folder (as explained in Adding Persistence Using JPA (SDK 1.x), step 3.1.2) 2. Add <property name="eclipselink.target-database" value="HANA"/> to your persistence.xml 3. [if necessary; once only!] re-deploy with <property name="eclipselink.ddl-generation" value="drop-and-create- tables"/> Samples run out of the box!
  • 11.
  • 12.
    © 2012 SAPAG. All rights reserved. 12 Demo Scenarios SAP HANA DB AppApp Derby SAP HANA DB 1 2 3 local SAP HANA Cloud
  • 13.
    © 2012 SAPAG. All rights reserved. 13 Access of HANA DB in HANA Cloud AppJDBC HANA Studio HTTPS JDBC ? Browser
  • 14.
  • 15.
    © 2012 SAPAG. All rights reserved. 15 Further Information  SAP HANA Cloud Homepage  SAP HANA Cloud Persistence Service (Documentation)  www.saphana.com Partner Center  https://www.saphanacloudappspartnercenter.com Developer Center  http://scn.sap.com/community/developer-center/cloud-platform SAP HANA Cloud bit.ly/saphanacloud@saphanacloud
  • 16.
    © 2012 SAPAG. All rights reserved. 16 SAP HANA Cloud Virtual Bootcamp Sessions Schedule Virtual Bootcamp session of 1.5 hours:  5th Virtual Bootcamp: Securing SAP HANA Cloud Applications: May 9th, 5 p.m. CET Security, Identity and Access Management are top priorities when considering moving applications to the cloud. This lecture gives guidance on how you can use the features to build solutions that meet your security requirements.  As a flexible and open cloud platform, does SAP HANA Cloud provide the rock-solid security required for your most sensitive data and applications?  How do you authenticate and authorize users?  How is your data isolated on SAP HANA Cloud and can you securely connect to your On-Premise systems?  How do you secure access from mobile clients, and what if you want to have Single Sign-On (SSO) with other SAP Cloud solutions via SAP ID Service or your corporate user directory? At the end of each session, we will give some time for Q&A. Remarks: ■ The Virtual Bootcamp sessions are scheduled for the developers of our HANA Cloud Applications partners and the community interested in our HANA Cloud Applications partner program. ■ The sessions will be recorded and provided to our HANA Cloud Partner community.
  • 17.
  • 18.
    © 2012 SAPAG. All rights reserved. 18 Questions & Answers Q: Where is HANA actually hosted - what latency between the Java application and HANA database one can expect? A: The HANA databases are located in the same data center as the applications (as can be seen on slide 13), so there is minimal latency between application and database. Q: Can different applications in the same account use different database types (HANA vs. non-HANA)? A: No, at present the configuration of the database type is on account level. Q: What is the roadmap for supporting that? A: By end of Q2/2013 it will be possible to specify the database type (HANA DB, Sybase ASE, MaxDB) as new parameter of the deployment. With that option it will be possible to assign each application to its own database type independently of the other applications in the same account.
  • 19.
    Thank You! Contact information: Dr.Bernd Hofmann SAP HANA Cloud bernd.hofmann@sap.com
  • 20.
    © 2012 SAPAG. All rights reserved. 20 No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Microsoft, Windows, Excel, Outlook, PowerPoint, Silverlight, and Visual Studio are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, z10, z/VM, z/OS, OS/390, zEnterprise, PowerVM, Power Architecture, Power Systems, POWER7, POWER6+, POWER6, POWER, PowerHA, pureScale, PowerPC, BladeCenter, System Storage, Storwize, XIV, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, AIX, Intelligent Miner, WebSphere, Tivoli, Informix, and Smarter Planet are trademarks or registered trademarks of IBM Corporation. Linux is the registered trademark of Linus Torvalds in the United States and other countries. Adobe, the Adobe logo, Acrobat, PostScript, and Reader are trademarks or registered trademarks of Adobe Systems Incorporated in the United States and other countries. Oracle and Java are registered trademarks of Oracle and its affiliates. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems Inc. HTML, XML, XHTML, and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology. Apple, App Store, iBooks, iPad, iPhone, iPhoto, iPod, iTunes, Multi-Touch, Objective-C, Retina, Safari, Siri, and Xcode are trademarks or registered trademarks of Apple Inc. IOS is a registered trademark of Cisco Systems Inc. RIM, BlackBerry, BBM, BlackBerry Curve, BlackBerry Bold, BlackBerry Pearl, BlackBerry Torch, BlackBerry Storm, BlackBerry Storm2, BlackBerry PlayBook, and BlackBerry App World are trademarks or registered trademarks of Research in Motion Limited. © 2012 SAP AG. All rights reserved. Google App Engine, Google Apps, Google Checkout, Google Data API, Google Maps, Google Mobile Ads, Google Mobile Updater, Google Mobile, Google Store, Google Sync, Google Updater, Google Voice, Google Mail, Gmail, YouTube, Dalvik and Android are trademarks or registered trademarks of Google Inc. INTERMEC is a registered trademark of Intermec Technologies Corporation. Wi-Fi is a registered trademark of Wi-Fi Alliance. Bluetooth is a registered trademark of Bluetooth SIG Inc. Motorola is a registered trademark of Motorola Trademark Holdings LLC. Computop is a registered trademark of Computop Wirtschaftsinformatik GmbH. SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer, StreamWork, SAP HANA, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries. Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects Software Ltd. Business Objects is an SAP company. Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other Sybase products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Sybase Inc. Sybase is an SAP company. Crossgate, m@gic EDDY, B2B 360°, and B2B 360° Services are registered trademarks of Crossgate AG in Germany and other countries. Crossgate is an SAP company. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. The information in this document is proprietary to SAP. No part of this document may be reproduced, copied, or transmitted in any form or for any purpose without the express prior written permission of SAP AG.