Your SlideShare is downloading. ×
0
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Java power to the SOA developer (ODTUG Kaleidoscope 2010)

2,411

Published on

For a long time, the perception of using Oracle's SOA Suite was that its usage required deep XML knowledge. This has changed dramatically with SOA Suite 11g and the supporting tools. This talk will …

For a long time, the perception of using Oracle's SOA Suite was that its usage required deep XML knowledge. This has changed dramatically with SOA Suite 11g and the supporting tools. This talk will introduce you to the extended and enhanced Java capabilities all across the platform, the native support for Spring components inside composites, and the WebLogic SCA for Java container. Learn how to transparently leverage existing Java code, and let the platform worry about serialization and XML generation.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,411
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
68
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • http://technology.amis.nl/blog/8144/publish-soa-composite-application-as-ejb-to-be-invoked-from-java-applications-using-ejb-binding
  • Transcript

    • 1. Java Power to the SOA Developer<br />ODTUG Kaleidoscope 2010<br />Wednesday, 30th June<br />Clemens Utschig-Utschig<br />Lucas Jellema <br />AMIS, The Netherlands<br />
    • 2. Overview<br />Three perspectives<br />Java2SOA, SOA2Java, SOA running Java inside<br />Invoking SOA Composite Application from Java<br />WebService, EJB and ADF Binding; JMS<br />Calling Java from SOA Composite application<br />EJB binding, JMS Adapter Service; direct & socket<br />Java exposed as WebService and as ADF-BC SDO<br />Java inside<br />BPEL Embedded Java; Mediator Java Callout<br />Spring Context Service Component<br />
    • 3. From Java, To Java, Run Java<br />ADF BC<br />SDO <br />ADF-BC<br />Java<br />Application<br />JAX-WS<br />Java Class<br />Java<br />Application<br />EJB<br />ADF<br />EJB<br />Java<br />Application<br />JMS<br />Java<br />Application<br />JMS<br />
    • 4. Some material used from the book<br />Shipping before OOW<br />End of August<br />On SOA and SOA Suite<br />Chapters on <br />Java inside SOA Suite (Java Callout, EmbeddedJava BPEL activity, Springcomponent)<br />EJB and ADF Binding<br />Interaction betweenSOA Suite & ADF<br />SDO Services & BPEL<br />
    • 5. Invoking SOA Composite Application from Java<br />Create Java WebService client (JAX-WS)<br />Generate in JDeveloper, based on WSDL and XSD<br />Call over HTTP with XML based messages<br />Expose EJB Binding or ADF Binding from Composite<br />Invoke over RMI with XML or (serialized) POJOs<br />Interact from Java over JMS, through Direct Binding or Socket Adapter<br />
    • 6. Expose EJB Binding<br />Create the SOA Composite application<br />Create a Java Interface that describes the service to be exposed<br />Create an EJB binding based on that interface as external Service exposed by the composite<br />Create a Mediator wired to the EJB binding<br />That routes incoming requests to ‘the rest of the composite’<br />Create the Java client that calls over RMI<br />
    • 7. Create Composite application, WS interface and Java Interface<br />
    • 8. Create the (inbound) EJB Binding<br />
    • 9. Invoking the SOA Composite via the EJB Binding<br />
    • 10. Client of EJB Binding in action<br />
    • 11. Inbound ADF Binding<br />Expose a service with binding.adf<br />Based on the same WSDL as the binding.ws<br />Wire this service to whatever the binding.ws service is wired to<br />Incoming calls are overRMI and use XML according to WSDL/XSD<br />
    • 12. Client for ADF Binding<br />Use SOA Suite run-time Java API<br />Locator class<br />pointed at t3://localhost:8001/soa-infra<br />Lookup Composite<br />default/FilterAndTranslateWithADFBinding!1.0<br />Find Service<br />Invoke with XML message<br />Response returned in XML<br />
    • 13. Overview<br />Three perspectives<br />Java2SOA, SOA2Java, SOA running Java inside<br />Invoking SOA Composite Application from Java<br />WebService, EJB and ADF Binding; JMS<br />Calling Java from SOA Composite application<br />EJB binding, JMS Adapter Service; direct & socket<br />Java exposed as WebService and as ADF-BC SDO<br />Java inside<br />BPEL Embedded Java; Mediator Java Callout<br />Spring Context Service Component<br />
    • 14. Invoking External Java based logic<br />Expose Java application as JAX-WS WebService<br />Expose ADF-BC with (SDO) Service Interface<br />Use ADF-BC Binding Adapter and BPEL Entity<br />Invoke Java EJB over EJB Binding<br />Call out using Direct Binding or Socket Adapter<br />Interact using JMS Adapter<br />
    • 15. Accessing Java based logic exposed by EJBs<br />Create and deploy EJB<br />Get (remote) Java Interface and JNDI name<br />Create EJB Binding (reference)<br />Configure with JNDI name and Java Interface<br />Create wire to the EJB Binding<br />A WSDL is automatically derived from the Java interface definition<br />
    • 16. (outbound) EJB Binding<br />
    • 17. The WSDL is created upon wiring to the EJB binding<br />
    • 18. Run composite with call via outbound EJB binding<br />
    • 19. ADF BC providing Data Access service to BPEL processes<br />SOA Suite communicates with database through Database Adapter<br />SQL (select, DML), PL/SQL and polling<br />Alternatively, Service Data Objects and a Data Access Service can be used<br />XML and HTTP based<br />Stateful dataset & two-way synchronization<br />
    • 20. ADF Faces Web Application<br />PatientAdministration<br />(SDO) Web Service<br />PatientsService<br />Application Module<br />PatientsService<br />SOA Suite<br />View Object<br />PatientsVw<br />E<br />DN<br />ADF <br />Business<br />Components<br />Entity Object<br />Patient<br />PATIENTS<br />
    • 21. ADF BC, SDO and BPEL<br />ADF BC Application Module can be exposed as Service Interface that is SDO enabled<br />The SOA Suite ADF BC binding adapter connects to the SDO Service Interface<br />BPEL Variables can be based on SDO Entity<br />BPEL activity Create Entity does Insert<br />BPEL activity Bind Entity does retrieve<br />Assign in BPEL results in call to update on SDO<br />
    • 22. Expose ADF BC Service Interface<br />
    • 23. Test SDO enabled Service Interface<br />
    • 24. Using the ADF-BC Binding Adapter<br />
    • 25. Create SDO Entity based variable in BPEL process<br />
    • 26. BPEL activity Bind Entity does ‘select * into BPEL variable’<br />
    • 27. Overview<br />Three perspectives<br />Java2SOA, SOA2Java, SOA running Java inside<br />Invoking SOA Composite Application from Java<br />WebService, EJB and ADF Binding; JMS<br />Calling Java from SOA Composite application<br />EJB binding, JMS Adapter Service; direct & socket<br />Java exposed as WebService and as ADF-BC SDO<br />Java inside<br />BPEL Embedded Java; Mediator Java Callout<br />Spring Context Service Component<br />
    • 28. Run Java inside SOA Composite<br />Extend BPEL processes with Embedded Java<br />For manipulation of variables, auditing/logging,external call-outs, validation,..<br />Mediator Java Callout<br />Before or after transformation ofrequest or reply<br />For validation, transformation & enrichment, logging, …<br />Spring Context service component<br />
    • 29.
    • 30. Consult Preparation Service<br />
    • 31. Add translations using Google’s RESTful Translation Service<br />Java Class StringTranslator publishes a static method translate that will translate strings:<br />
    • 32. Add embedded Java activity<br />
    • 33.
    • 34. Extend with Dutch translations<br />
    • 35. Extend with Dutch translations<br />
    • 36. Java Embedding in BPEL process<br />Hidden inside, not very decoupled<br />Hard to maintain<br />Mixing technology paradigms <br />Requiring different skills<br />In general:<br />Useful for advanced logging/tracing<br />Useful for special validations/transformations<br />Use with great caution<br />
    • 37. Mediator Java Call-outs<br />Mediators allow registration of a Java Callout class<br />This class extends from AbstractJavaCalloutImpl<br />May override methods invoke at specific momentsin thelife cycle <br />
    • 38. Mediator Java Call-outs<br />Used for debugging & logging/auditing, advanced manipulation (enrichment?), complex validation <br />
    • 39. Java inside composites: Spring Component<br />Primary citizen in SCA Composite applications<br />As per the SCA Specification<br />As per 11gR1 PS2 (preview in PS1)<br />POJOs configured as Spring Beans provide services inside the Composite<br />And potentially exposed externally<br />Spring’s Dependency Injection is very similar to SCA’s Reference concept<br />
    • 40. Steps for adding Java logic to a composite application<br />Add Spring Context to the composite<br />A Spring Bean Configuration file is created<br />Add bean definitions for POJOs based on Java Interfaces<br />Add sca:service elements to exposebeans as service to other components<br />Add sca:reference elements to get Service Components injected to satisfy a dependency<br />
    • 41. First Steps<br />
    • 42. Use Case: Add PDF generation to a composite application<br />PDF Generating Spring Bean is defined in the Spring Content – with an sca:service<br />
    • 43.
    • 44. Dependency Injection: Spring Beans get Service Components injected<br />Dependency injection is the heart and soul of Spring<br />References in SCA are very similar<br />Spring Beans can publish their dependencies as sca:reference elements<br />That get exposed by the Spring Context<br />These References can be satisfied by wiring in other Service Components<br />Usually Mediator<br />
    • 45. Second round<br />
    • 46. Third round<br />
    • 47. Injecting LogFileWriter & ConsoleLogger<br />
    • 48. 48<br />Summary and Conclusion<br />SOA Composite applications can expose and access EJB bindings next to WebService<br />BPEL Entity variables have direct SDO binding<br />Service Adapters for Direct Binding, Sockets and JMS interact with Java applications<br />both incoming and outgoing interaction<br />Spring Context Service Component allows Spring Beans (POJOs) to be run inside SOA<br />Spring Bean can be invoked as service <br />Spring Bean can have service component injected<br />
    • 49. Resources<br />Presentation and demos are on our blog<br />http://technology.amis.nl/blog<br />Contact me at:lucas.jellema@amis.nl<br />

    ×