JavaT M EE ConnectorArchitecture 1.6Technology (JSR 322)●Presenter’s NameSivakumar Thyagarajan–Presenter’s TitleJagadish R...
Presentation GoalLearn about the new features in theJavaTM EE Connector Architecture 1.6 technology                    Sun...
Agenda●   Introduction●   Connector 1.6 themes    ●   Ease of Development (EoD) features    ●   Generic Work Context    ● ...
Agenda• Introduction• Connector 1.6 themes  •   Ease of Development (EoD) features  •   Generic Work Context  •   Security...
Java EE Connector ArchitectureOverview              Sun Confidential: Internal Only   5
Connector Architecture 1.0Capabilities• Outbound communication   • Mechanism for Java EE components to      connect to ext...
Connector 1.5 (JSR 112)Introduction• Final Release Nov 2003   • Part of J2EE (Java 2 Enterprise Edition)      1.4• Major t...
Connector Architecture 1.5Capabilities• Lifecycle Management• Inbound Messaging   • Mechanism for EIS to call Message     ...
Connector 1.6 SpecificationIntroduction• Work done by the expert group of JSR    322• Part of Java EE 6 Umbrella    specif...
Connector 1.6 SpecificationMajor Themes• Driven by community and Connector   EG feedback• Themes   • Generic Work Context ...
Agenda• Introduction• Connector 1.6 themes  • Ease of Development (EoD)     features  • Generic Work Context  • Security I...
Ease of Development (EoD)Goal and approach• Goal   • to simplify the development of RAs for       programmers who are eith...
Ease of DevelopmentMetadata annotations@Connector  @AuthenticationMechanism  @SecurityPermission@ConfigProperty  Automatic...
Ease of Development@Connector sample usageOptionally provide a ResourceAdapter class    Required only if RA supports inbou...
Ease of Development@ConnectionDefinition sample usage//A simple ManagedConnectionFactory implementation that is part of//a...
Ease of Development@Activation sample usage@Activation()public class MyActivationSpec {    //Use of Bean Validation annota...
AgendaIntroductionConnector 1.6 themes Ease of Development (EoD) features Generic Work Context Security Inflow Miscellaneo...
Generic Work ContextRationale• A generic mechanism for the RA to   propagate other contextual info   from EIS during messa...
Generic Work ContextDesign Model• RA submits a Work that implements   WorkContextProvider• Before calling run on the Work ...
Generic Work ContextWorkContextProvider and WorkContext interfacepackage javax.resource.spi.work;public interface WorkCont...
Generic Work ContextContext assignment sequence diagram                  Sun Confidential: Internal Only   21
Generic Work ContextFeatures• Compatible with the Connector 1.5    Work submission and context    assignment model• Indepe...
Generic Work ContextStandardized WorkContextspublic class TransactionContext extends ExecutionContext implements   WorkCon...
Generic Work ContextSample usageScenario  A business use-case requires that the work   done by the application components,...
Generic Work ContextSample usage – ResourceAdapter implementationpublic class MyResourceAdapterImpl            implements ...
Generic Work ContextSample usage – Work implementationpublic class MyWork implements Work, WorkContextProvider {    void r...
Agenda• Introduction• Connector 1.6 themes  •   Ease of Development (EoD) features  •   Generic Work Context  •   Security...
Security InflowRationale• Security inflow context absent in   Connectors 1.5• Resource adapters not being able to   delive...
Security InflowGoals• Enable an end-to-end security model   for Java EE application-EIS   integration• Support the executi...
Security InflowDesign Model• A standard WorkContext,   SecurityContext that may be   provided by the RA while submitting  ...
Security InflowSecurityContext abstract classpackage javax.resource.spi.work;import javax.security.auth.Subject;import jav...
Security InflowSecurity Context establishment – sequencediagram                   Sun Confidential: Internal Only   32
Security InflowCaller Identity inflow scenarios• Based on whether the Caller identity   is part of the AS security domain ...
Security InflowSecurity Context establishment – Case 1                    Sun Confidential: Internal Only   34
Security InflowSecurity Context establishment – Case 2                    Sun Confidential: Internal Only   35
Agenda• Introduction• Connector 1.6 themes  •   Ease of Development (EoD) features  •   Generic Work Context  •   Security...
Miscellaneous improvementsTransaction Management  Specification of Transaction Support Level   at RuntimeWork Management  ...
Miscellaneous improvements• Bean Validation integration (JSR 303)• Standalone Connector Environment• Configuration Propert...
Demo !• Demonstration: mail-connector   sample  • Showcase the ease of development     features and security work context ...
Agenda• Introduction• Connector 1.6 themes  •   Ease of Development (EoD) features  •   Generic Work Context  •   Security...
Resources – To learn more & getstarted• JSR 322 page    http://jcp.org/en/jsr/detail?id=322  • Download the specification ...
Summary• Part of Java EE 6 and reference   implementation available through   GlassFish v3• Simplifies resource adapter   ...
Agenda• Introduction• Connector 1.6 themes  •   Generic Work Context  •   Security Inflow  •   Ease of Development (EoD) f...
Thank Yousivakumar.thyagarajan@sun.comjagadish.ramu@sun.com                 Sun Confidential: Internal Only   44
Upcoming SlideShare
Loading in …5
×

Connector Architecture 1.6 - Tech-days 2010, Hyderabad.

629
-1

Published on

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
629
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
16
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Connector Architecture 1.6 - Tech-days 2010, Hyderabad.

  1. 1. JavaT M EE ConnectorArchitecture 1.6Technology (JSR 322)●Presenter’s NameSivakumar Thyagarajan–Presenter’s TitleJagadish Ramu●Presenter’s Company 1
  2. 2. Presentation GoalLearn about the new features in theJavaTM EE Connector Architecture 1.6 technology Sun Confidential: Internal Only 2
  3. 3. Agenda● Introduction● Connector 1.6 themes ● Ease of Development (EoD) features ● Generic Work Context ● Security Inflow ● Miscellaneous improvements● Resources and Summary● Q&A Sun Confidential: Internal Only 3
  4. 4. Agenda• Introduction• Connector 1.6 themes • Ease of Development (EoD) features • Generic Work Context • Security Inflow • Miscellaneous improvements• Resources and Summary•Q&A Sun Confidential: Internal Only 4
  5. 5. Java EE Connector ArchitectureOverview Sun Confidential: Internal Only 5
  6. 6. Connector Architecture 1.0Capabilities• Outbound communication • Mechanism for Java EE components to connect to external systems • Connection Management: Lifecycle, Pooling, Sharing • Security Contract • Exporting Transaction and Security Context to EIS Sun Confidential: Internal Only 6
  7. 7. Connector 1.5 (JSR 112)Introduction• Final Release Nov 2003 • Part of J2EE (Java 2 Enterprise Edition) 1.4• Major themes • Asynchronous Integration with EISs • Enabled bi-directional asynchronous interactions with EIS • JMS Provider Pluggability Sun Confidential: Internal Only 7
  8. 8. Connector Architecture 1.5Capabilities• Lifecycle Management• Inbound Messaging • Mechanism for EIS to call Message Endpoints (MDBs) • Import transaction context from EIS• Work Management Sun Confidential: Internal Only 8
  9. 9. Connector 1.6 SpecificationIntroduction• Work done by the expert group of JSR 322• Part of Java EE 6 Umbrella specification• Final release on December 2009• Reference implementation : GlassFish v3 Sun Confidential: Internal Only 9
  10. 10. Connector 1.6 SpecificationMajor Themes• Driven by community and Connector EG feedback• Themes • Generic Work Context mechanism • Security Context Inflow during Message Delivery and Work Submission • Ease of Development (EoD) • Misc. improvements to the specification Sun Confidential: Internal Only 10
  11. 11. Agenda• Introduction• Connector 1.6 themes • Ease of Development (EoD) features • Generic Work Context • Security Inflow • Miscellaneous improvements• Resources and Summary•Q&A Sun Confidential: Internal Only 11
  12. 12. Ease of Development (EoD)Goal and approach• Goal • to simplify the development of RAs for programmers who are either just starting with the technology or developing RAs of small to medium complexity• Approach • Align with the EoD approach adopted by EJB/JPA • Make extensive use of Java language annotations • Reduce the need for a descriptor (ra.xml), better defaults • Allow sparse descriptors, mixed-mode development etc. Sun Confidential: Internal Only 12
  13. 13. Ease of DevelopmentMetadata annotations@Connector @AuthenticationMechanism @SecurityPermission@ConfigProperty Automatic discovery of configuration properties@ConnectionDefinition, @ConnectionDefinitions@Activation@AdministeredObject Sun Confidential: Internal Only 13
  14. 14. Ease of Development@Connector sample usageOptionally provide a ResourceAdapter class Required only if RA supports inbound, requires lifecycle callbacks, access to BootstrapContext etc//A simple resource adapter that does not support transactions@Connector()public class MailResourceAdapter implements ResourceAdapter{ // Define common configuration properties. //... other methods} Sun Confidential: Internal Only 14
  15. 15. Ease of Development@ConnectionDefinition sample usage//A simple ManagedConnectionFactory implementation that is part of//a connection definition, could be defined as follows@ConnectionDefinition(connectionFactory=CF.class, connectionFactoryImpl=CFImpl.class, connection=Conn.class, connectionImpl=ConnImpl.class)public class ManagedConnectionFactoryImpl implements ManagedConnectionFactory { //...} Sun Confidential: Internal Only 15
  16. 16. Ease of Development@Activation sample usage@Activation()public class MyActivationSpec { //Use of Bean Validation annotations to express //validation requirements @Size(min=5, max=5) private int length; //... other methods} Sun Confidential: Internal Only 16
  17. 17. AgendaIntroductionConnector 1.6 themes Ease of Development (EoD) features Generic Work Context Security Inflow Miscellaneous improvementsResources and SummaryQ&A Sun Confidential: Internal Only 17
  18. 18. Generic Work ContextRationale• A generic mechanism for the RA to propagate other contextual info from EIS during message delivery or Work submission • Examples: Security, Conversational Context, Availability/QoS etc• Enables • an application server to support new message inflow and delivery schemes • provides a richer Contextual Work execution environment to the RA Sun Confidential: Internal Only 18
  19. 19. Generic Work ContextDesign Model• RA submits a Work that implements WorkContextProvider• Before calling run on the Work instance, WorkManager iterates through the Collection of WorkContexts provided by the Work instance• Establishes Context based on the WorkContext Sun Confidential: Internal Only 19
  20. 20. Generic Work ContextWorkContextProvider and WorkContext interfacepackage javax.resource.spi.work;public interface WorkContextProvider extends Serializable { List<WorkContext> getWorkContexts();}package javax.resource.spi.work;public interface WorkContext extends Serializable { String getName(); String getDescription();} Sun Confidential: Internal Only 20
  21. 21. Generic Work ContextContext assignment sequence diagram Sun Confidential: Internal Only 21
  22. 22. Generic Work ContextFeatures• Compatible with the Connector 1.5 Work submission and context assignment model• Independent of the Connector Work Management contract• Standardized TransactionContext, SecurityContext and HintsContext• RA can require the AS to support, check if the AS supports, and get lifecycle notifications during the assignment of a WorkContext Sun Confidential: Internal Only 22
  23. 23. Generic Work ContextStandardized WorkContextspublic class TransactionContext extends ExecutionContext implements WorkContext { public String getName(){ return "TransactionContext"; } ... other methods}public abstract class SecurityContext implements WorkContext { public String getName(){ return "SecurityContext"; } .... other SecurityContext related methods} Sun Confidential: Internal Only 23
  24. 24. Generic Work ContextSample usageScenario A business use-case requires that the work done by the application components, during a message inflow, be automatically enlisted as part of the imported transactionSolution Use the new TransactionContext to propagate transaction information from the EIS to the MessageEndpoint as part of the Work instance performing the message delivery Sun Confidential: Internal Only 24
  25. 25. Generic Work ContextSample usage – ResourceAdapter implementationpublic class MyResourceAdapterImpl implements ResourceAdapter { ... public void start(BootstrapContext ctx) { bootstrapCtx = ctx; } ... { WorkManager workManager = myRA.bootstrapCtx.getWorkManager(); workManager.submitWork(new MyWork()); ... }} Sun Confidential: Internal Only 25
  26. 26. Generic Work ContextSample usage – Work implementationpublic class MyWork implements Work, WorkContextProvider { void release(){ ..} List<WorkContext> getWorkContexts() { TransactionContext txIn = new TransactionContext(); txIn.setXid(xid); List<WorkContext> icList = new ArrayList<WorkContext>(); icList.add(txIn); // Add additional WorkContexts return icList; } void run(){ // Deliver message to MessageEndpoint; }} Sun Confidential: Internal Only 26
  27. 27. Agenda• Introduction• Connector 1.6 themes • Ease of Development (EoD) features • Generic Work Context • Security Inflow • Miscellaneous improvements• Resources and Summary•Q&A Sun Confidential: Internal Only 27
  28. 28. Security InflowRationale• Security inflow context absent in Connectors 1.5• Resource adapters not being able to deliver end-to-end application level security while • executing a task in a Work instance • delivering a message to a MessageEndpoint Sun Confidential: Internal Only 28
  29. 29. Security InflowGoals• Enable an end-to-end security model for Java EE application-EIS integration• Support the execution of a Work instance in the context of an established identity.• Support the propagation of Principal information from an EIS to a MessageEndpoint during message inflow Sun Confidential: Internal Only 29
  30. 30. Security InflowDesign Model• A standard WorkContext, SecurityContext that may be provided by the RA while submitting a Work for execution • AS establishes security context for the MessageEndpoint/Work during context assignment• Leverage the work done in JSR 196: Java Authentication Service Provider Interface for Containers • RA uses the various JSR-196 Callbacks to establish caller identity Sun Confidential: Internal Only 30
  31. 31. Security InflowSecurityContext abstract classpackage javax.resource.spi.work;import javax.security.auth.Subject;import javax.security.auth.callback.CallbackHandler;public abstract class SecurityContext implements WorkContext { //Establish caller identity through the use of JSR196 Callbacks public abstract void setupSecurityContext( CallbackHandler handler, Subject executionSubject, Subject serviceSubject);} Sun Confidential: Internal Only 31
  32. 32. Security InflowSecurity Context establishment – sequencediagram Sun Confidential: Internal Only 32
  33. 33. Security InflowCaller Identity inflow scenarios• Based on whether the Caller identity is part of the AS security domain • Case 1: RA flows-in an identity in the AS’s security policy domain: AS may just use the initiating principal from the RA as the caller principal • Case 2: RA flows-in an identity belonging to the EIS’ security domain: A translation from one domain to the other needs to be performed. Sun Confidential: Internal Only 33
  34. 34. Security InflowSecurity Context establishment – Case 1 Sun Confidential: Internal Only 34
  35. 35. Security InflowSecurity Context establishment – Case 2 Sun Confidential: Internal Only 35
  36. 36. Agenda• Introduction• Connector 1.6 themes • Ease of Development (EoD) features • Generic Work Context • Security Inflow • Miscellaneous improvements• Resources and Summary•Q&A Sun Confidential: Internal Only 36
  37. 37. Miscellaneous improvementsTransaction Management Specification of Transaction Support Level at RuntimeWork Management Distributed Work Processing HintsContextMessage Inflow createMessageEndpoint timeouts Retryable exceptions Sun Confidential: Internal Only 37
  38. 38. Miscellaneous improvements• Bean Validation integration (JSR 303)• Standalone Connector Environment• Configuration Property processing • range specification through JSR 303 • dynamic reconfiguration and confidential params support• Classloading requirements • clarified scenarios where deployed standalone RARs must be made visible to applications Sun Confidential: Internal Only 38
  39. 39. Demo !• Demonstration: mail-connector sample • Showcase the ease of development features and security work context capabilities. • Compare the same resource adapter developed in Connector 1.5 and 1.6 • Deploy on Java EE 6 RI (Project GlassFish v3) Sun Confidential: Internal Only 39
  40. 40. Agenda• Introduction• Connector 1.6 themes • Ease of Development (EoD) features • Generic Work Context • Security Inflow • Miscellaneous improvements• Resources and Summary•Q&A Sun Confidential: Internal Only 40
  41. 41. Resources – To learn more & getstarted• JSR 322 page http://jcp.org/en/jsr/detail?id=322 • Download the specification and send comments to jsr-322-comments@jcp.org• Reference implementation at http://GlassFish.org • Download and try GlassFish v3 – Java EE 6 release • Try Connector 1.6 samples as part of GlassFish v3 and build new 1.6 resource adapters Sun Confidential: Internal Only 41
  42. 42. Summary• Part of Java EE 6 and reference implementation available through GlassFish v3• Simplifies resource adapter development• Adds powerful new capabilities to assign contexts during Work execution and Message delivery• Enhances enterprise application integration capabilities in Java EE 6 Sun Confidential: Internal Only 42
  43. 43. Agenda• Introduction• Connector 1.6 themes • Generic Work Context • Security Inflow • Ease of Development (EoD) features • Miscellaneous improvements• Resources and Summary•Q&A Sun Confidential: Internal Only 43
  44. 44. Thank Yousivakumar.thyagarajan@sun.comjagadish.ramu@sun.com Sun Confidential: Internal Only 44
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×