Java Web Apps and Services on Oracle Java Cloud Service

37
DOAG 2014, Nürnberg Andreas Koop JAVA WEBAPPS UND SERVICES ON ORACLE JAVA CLOUD SERVICE

description

Mit den Oracle Cloud Services gibt es ein weiteres Maß an Agilität in der Projektabwicklung auf Java EE Basis. Die ausgefeilte Umgebung samt Datenbank, WebLogic Server und Identity Domain erlaubt es, Java EE Anwendungen in kürzester Zeit zu entwickeln und ohne Betrieb einer eigenen Infrastruktur auszurollen. Die nahtlose Integration des Oracle Cloud SDK in Eclipse, Netbeans und JDeveloper sorgt für eine effiziente Handhabung in der gewünschten Entwicklungsumgebung. Dank der Ant-, Maven- und Kommandozeilen-Unterstützung ist die Verwendung innerhalb einer Continuous Integration-Umgebung ebenfalls gewährleistet. Dieser Vortrag erläutert die Konzepte der Oracle Cloud Services und demonstriert alle essentiellen Schritte, um eine Java-Anwendung sowie Services (z.B. für mobile Apps) von einer lokalen Umgebung in die Oracle Cloud zu bringen. Neben den notwendigen Tipps und Tricks bei der Entwicklung, Konfiguration und Deployment der Anwendung werden Best Practices bei der Aktualisierung der Cloud-Datenbankobjekte und -daten gegeben.

Transcript of Java Web Apps and Services on Oracle Java Cloud Service

Page 1: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg

Andreas Koop

JAVA WEBAPPS UND SERVICES ON ORACLE JAVA CLOUD SERVICE

Page 2: Java Web Apps and Services on Oracle Java Cloud Service

Andreas Koop Geschäftsführung

& ConsultingABOUT ME

Consulting, Training Oracle Technology Oracle ADF Certified Implementation SpecialistProfessional Scrum MasterCommunity DOAG, ADF EMG, ADF German Community, Google Plus,Twitter @andreaskoop @enpitBlogNews - http://www.enpit.de/blog Technical (english) - http://multikoop.blogspot.comTechnical (german) - http://enpit.blogspot.com

2

www.scope-alliance.de

Page 3: Java Web Apps and Services on Oracle Java Cloud Service

Training DevelopmentConsultingOracle Business

IntelligenceOracle ADF

/ MobileOracle

WebLogicOracle

WebCenter

Oracle Fusion Middleware

ENTERPRISE PRAGMATIC IT

Page 4: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

AGENDA

Introduction to Oracle Cloud Services - Architecture & Components

Oracle Database Cloud Service (Schema)

Oracle Java Cloud Service - SaaS Extension (Deployment)

Security & Monitoring

Fazit & Ausblick4

Page 5: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

AIM FOR TODAY: JAVA WEBAPP UND REST-SERVICE

5

Service(REST, SOAP)

Native / Hybrid Mobile Apps

WebApp Client

Java EE / ADF WebApp JAX-RS 1.1

Page 6: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

ORACLE CLOUD OFFERINGS

6

Focus for this talk!

Page 7: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

CLOUD.ORACLE.COM 30 DAYS TRIAL

7

PaaS Offering30 Days

incl. Database Cloud Service:

1 Schema1 GB Storage6GB Transfer

incl. Developer Cloud Service

Page 8: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

CLOUD.ORACLE.COM ANMELDUNG

8

Page 9: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

ACTIVATION NECCESSARY

9

Page 10: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

ACTIVATION AFTER EMAIL NOTIFICATION

10

Less then 24h

Account details (Users, Pwd) will be send only

after activation.

Page 11: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

ORACLE CLOUD IDENTITY DOMAIN CONSOLE

11

Manage User Profile Create / Delete Users, Reset Password Create / Delete Roles, Assign to Users

CSV Bulk Upload möglich

Page 12: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

ORACLE CLOUD APPLICATION FOUNDATION

12

Oracle Cloud Application Foundation Traffic Director

Virtual Assembly Builder

WebLogic Server Identity Management EM Cloud Control

Cloud Deployment Infrastructure

ExaD

ata

ExaL

ogic

Oracle Database

Common Infra Services(Storage, Messaging,

etc)

SaaS(CRM, ERP, etc)

Social Services(Social Network /

Marketing, Analytics,

Page 13: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

ORACLE JAVA CLOUD SERVICE COMPONENTS

13

Oracle Java Cloud Service

Identity Domain

Oracle Database Cloud Service

My Account My Services

Traffic Director(Load Balancer)

WebLogic Server

WebLogic Admin Console

Admin Server

Managed ServerManaged ServerManaged Server

Clusters

Java Cloud ServiceSaaS Ext. Control

Page 14: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

ORACLE CLOUD MY SERVICES PORTAL

14

Page 15: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

ORACLE JAVA CLOUD SERVICE - SAAS EXTENSION INSTANCE‣ „A deployment target for applications using a set

of Java EE 5, Java EE 6, and Oracle WebLogic Server capabilities“

‣ Oracle WebLogic Server 10.3.6 (12.1.2 for JSC „pure“ available)

‣ Oracle ADF release 11.1.1.7.1 (no other version in trial version available)

15

https://docs.oracle.com/cloud/latest/javacs_gs/CSJSU/GUID-5C35C6E5-2DC4-4674-83E3-1B1B90B950D7.htm#CSJSU7090

Page 16: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

ORACLE JAVA CLOUD SERVICE SDK

16

Oracle Java Cloud Service SDK

Oracle Java Cloud Service

Page 17: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

ORACLE CLOUD DATABASE SERVICE‣ Export Dumps, Access through SFTP

‣ Import Schema Objects / Data through APEX SQL Worksheet or (Client) Database Cart

17

Page 18: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

ORACLE CLOUD DATABASE CART DEPLOYMENT

18

Page 19: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

AUS DER PRAXIS ORACLE JAVA CLOUD SERVICE‣ Entwicklung und Deployment einer RESTful Service

Schnittstelle zur Datenbank

‣ Entwicklung und Deployment einer Java EE (ADF) App

19

Service (JAX-RS 1.1)(REST, SOAP)

ADF 11.1.1.7.1Application

11.1.1.7.18.0.1

Page 20: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

RESTFUL-SERVICE MIT NETBEANS (1)‣ Oracle Cloud Plugin installieren

‣ Oracle Cloud Service SaaS Ext. SDK installieren

‣ Oracle Cloud Provider registrieren

20

Page 21: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

RESTFUL-SERVICE MIT NETBEANS (2)‣ Add „local“ WebLogic Server Instance for Testing

‣ (Deploy DB Objects to Cloud if needed)

‣ Create „Maven / Java EE Web Application“

‣ New „RESTful Web Services from Database…“

21

Page 22: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

RESTFUL-SERVICE MIT NETBEANS (3)‣ Change JAX-RS Provider Class in web.xml

‣ (Add Login-Config in web.xml to make it public)

22

Page 23: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

RESTFUL-SERVICE MIT NETBEANS (4)‣ Add JAX-RS Library Reference in weblogic.xml

‣ Configure JNDI Datasource in persistence.xml

‣ Change Deployment Server Target

23

Page 24: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

RESTFUL-SERVICE MIT NETBEANS (5)‣ Deploy by executing „Run“

‣ Test your RESTful service in the Cloud

24

REST-Client for testing purposes.

Test JSON as well as XML Content type

Page 25: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

ORACLE CLOUD PREPARE ADF APPLICATION‣ Deploy Database Objects / Data

‣ Configure ADF Application Database Access (JNDI)

‣ Choose Deployment Profile for Oracle Cloud

25

Page 26: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

ORACLE CLOUD DEPLOY ADF APPLICATION

26

Page 27: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

ORACLE CLOUD WHITELIST & VIRUS SCAN

27

EAR RESTfulService

Page 28: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

ORACLE CLOUD SECURITY‣ Internet Public Pages

All users ‣ Oracle Public Pages

All Oracle Cloud users, independent of Identity Domain

28

<?xml version='1.0' encoding='UTF-8'?> <web-app> ... <login-config/> ... </web-app>

web.xml

<?xml version='1.0' encoding='UTF-8'?> <web-app> ... ... </web-app>

web.xml

Default

Page 29: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

ORACLE CLOUD SECURITY‣ Tenant Restricted Pages

All Oracle Cloud users of specific Identity Domain

29

<?xml version='1.0' encoding='UTF-8'?> <web-app> ... <security-constraint> <display-name>name</display-name> <web-resource-collection> <web-resource-name>name</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> </security-constraint> <login-config> <auth-method>CLIENT-CERT</auth-method> <realm-name>default</realm-name> </login-config>

... </web-app>

web.xml

Page 30: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

ORACLE CLOUD ADF SECURITY‣ jazn-data.xml

Application Roles to Enterprise Roles Mapping

30

... <app-roles> <app-role> <name>myrole</name> <class>oracle.security.jps.service.policystore.ApplicationRole</class> <members> <member> <name>trialanth.identityrole</name> <class>weblogic.security.principal.WLSGroupImpl</class> </member> </members> </app-role>

jazn-data.xml

Page 31: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

ORACLE JAVA CLOUD SERVICE MONITORING SAAS EXTENSION

31

Page 32: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

ORACLE CLOUD ADF PERFORMANCE MONITORING

32

Page 33: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

FAZIT & AUSBLICK‣ Einfach, unkompliziert Java WebApps und Services

bereitstellen!

‣ Aktuelles Cloud Service Angebot nicht ganz transparent: Java Cloud Service vs. Java Cloud Service - SaaS Extension.

‣ Versionen nicht immer klar. z.B. JDev 11.1.1.7.1 ausschließlich für Cloud Deployment !? // Cloud release 13 / 14 usw.

‣ Developer Cloud Service f. Continous Deployment33

Page 34: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

FURTHER READING‣ Oracle Cloud

cloud.oracle.com

‣ Oracle Cloud Documentationdocs.oracle.com/cloud

‣ Blog (enpit experience)http://multikoop.blogspot.de/2014/11/create-restful-services-and-deploy-to.html http://multikoop.blogspot.de/2012/12/managing-adf-applications-with-oracle.html

34

Di, 18.11.2014 xx:yy Uhr

Oracle Development Cloud Service

mit Jeff xyz im Raum xyz

Page 35: Java Web Apps and Services on Oracle Java Cloud Service

DOAG 2014, Nürnberg, Andreas Koop

EXPERT-SLOTS AT SCOPE ALLIANCE BOOTH

35

Page 36: Java Web Apps and Services on Oracle Java Cloud Service

VIELEN DANK FÜR IHRE AUFMERKSAMKEIT

HABEN SIE NOCH FRAGEN?

Page 37: Java Web Apps and Services on Oracle Java Cloud Service