Presentation is loading. Please wait.

Presentation is loading. Please wait.

Session 7: JMS, JCA, JSF Dr. Nipat Jongsawat.

Similar presentations


Presentation on theme: "Session 7: JMS, JCA, JSF Dr. Nipat Jongsawat."— Presentation transcript:

1 Session 7: JMS, JCA, JSF Dr. Nipat Jongsawat

2 หัวข้อนำเสนอ JMS : Java Message Service
JCA : Java Connector Architecture JSF : JavaServer Face Dr. Nipat Jongsawat

3 http://ibm.com/redbooks Patterns: Implementing Self-Service in an SOA environment
Dr. Nipat Jongsawat

4 Message-Oriented Middleware
Messaging เป็นวิธีการสื่อสารระหว่าง applications หรือ software components. ส่งเสริม loosely coupled Message-Oriented Middleware Application A Messaging API Messaging Clients Application B “MOM” “ for applications” Dr. Nipat Jongsawat

5 Java Message Service (JMS)
เป็น Java API เพื่อสร้าง ส่ง รับ และอ่าน messages Messages Asynchronous: a client does not have to request them in order to receive them. Reliable: ensure message is delivered safely once and only once. Dr. Nipat Jongsawat

6 JMS Architecture JMS provider JMS clients Messages JMS Provider
a messaging system that implements JMS interfaces and provides administrative and control features. JMS clients programs or components written in Java that produce or consume messages. Messages objects that communicate information between the JMS clients. JMS Provider JMS client IBM MQSeries, Tibco, SpiritSoft, Fiorano, Softwired Dr. Nipat Jongsawat

7 Using JMS API A provider wants the components not to depend on other components’ interfaces, so that components can be easily replaced. The provider wants the application to run whether or not all components are up and running simultaneously. The application business model allows a component to send information to another and to continue to operate without receiving immediate response. Dr. Nipat Jongsawat

8 Messaging Domain Point-to-Point (One consumer per message)
Publish/Subscribe (Many consumers per msg.) Dr. Nipat Jongsawat

9 Point-to-Point Built around the concept of message queues, sender and receivers. Each message has only one consumer. A sender and a receiver of a message have no timing dependencies. The receiver can fetch the message whether or not it was running when the client sent the message. The receiver acknowledges the successful processing of a message. Dr. Nipat Jongsawat

10 Publish/Subscribe domain
Each message can have multiple consumers. Publishers and subscribers have a timing dependency. A client that subscribes to a topic can consume only messages published after the client has created a subscription, and the subscriber must continue to be active in order for it to consume messages. Dr. Nipat Jongsawat

11 Message Consumption Synchronously: A subscriber or receiver explicitly fetches the message from the destination by calling the receive method. Asynchronous: A client can register a message listener with a consumer. A message listener is similar to an event listener. Whenever a message arrives at the destination, the JMS provider delivers the message by calling the listener’s onMessage method, which acts on the content. Dr. Nipat Jongsawat

12 Async Messaging (Publisher-Subscriber)
XML Subscriber XML Publisher Dr. Nipat Jongsawat

13 http://ibm.com/redbooks Patterns: Implementing Self-Service in an SOA environment
Dr. Nipat Jongsawat

14 Integration Complexity
EIS AppServer AppServer m+n EIS JCA m*n Using JCA to access an EIS is akin to using JDBC to access a database. Dr. Nipat Jongsawat

15 JCA : Java Connector Architecture
like a bridge, it attaches two ends together, JavaEE and EIS simplifies the integration of diverse EISs each EIS requires only one implementation of CA Connector AppServer Resource Adapter EIS SAP CICS ... Dr. Nipat Jongsawat

16 JCA : Key Components Resource Adapter System Contract
Connects EIS resource to the JCA infrastructure System Contract Connection & transaction management and security Common Client Interface Provides a common programming interface model for interacting with EIS via resource adapters Dr. Nipat Jongsawat

17 Web services JMS JCA Interface coupling (abstract service definition) YES Dynamic interface discovery and request construction is possible NO Payload agnostic YES Technical coupling (protocol stack) NO With WSIF, client is not bound to a client library for a particular protocol implementation Portability YES Multi-language NO Java technology only Reliability HTTP-R binding for SOAP Specific Dr. Nipat Jongsawat

18 Transactional Support
Web services JMS JCA Transactional Support Future WS-Coordination & WS-Transaction Compensation and XA models Limited in scope Only to the queue entry point YES XA model Security WS-Security Not part of the standard, hence vendor-specific Integration between EIS and J2EE Synchronous mode YES Major use Do it yourself YES Asynchronous mode YES Document oriented interface Future Event-driven, push mode YES Document oriented interface or flow support (BPEL4WS) Dr. Nipat Jongsawat

19 JSF : JavaServer Face Server-side user interface component framework for Java technology-based web applications. JSP components Set of APIs for representing UI components and managing their state, handling events and input validation, defining page navigation, and supporting internationalization and accessibility A JavaServer Pages (JSP) custom tag library for expressing a JSF interface within a JSP page Dr. Nipat Jongsawat

20 JSF : UI Components Dr. Nipat Jongsawat

21 Input Validation <h:inputText id="string" required="true"
value="#{data.string}" size="20"> <f:validateLength minimum="3" maximum="12"/> </h:inputText> <h:message for="string" style="color: red;"/> Dr. Nipat Jongsawat

22 JSF & MVC Dr. Nipat Jongsawat

23 Dr. Nipat Jongsawat

24 More Information The J2EE™ 5 Tutorial JMS JCA JSF
JCA JSF Dr. Nipat Jongsawat


Download ppt "Session 7: JMS, JCA, JSF Dr. Nipat Jongsawat."

Similar presentations


Ads by Google