JBoss SOA Platform Dr. Szántó Iván szanto.ivan@ulx.hu ULX Open Source Consulting & Distribution 2011. május 9.
Áttenkintés Nyílt forráskódú Enterprise szoftverek A JBoss SOA Platform alapjai A JBoss SOA Platform további szolgáltatásai Elérhetőség
Fedora és Red Hat Enterprise Linux
Enterprise életciklus
Use case 1: üzenettranszformáció JBoss Portal JBoss Portal JBoss Portal JBoss ESB Application 1 Application 4 Application 2 Application 3
Use case 2: adatintegráció Internet WF WF Console Console Server Server JBoss Portal User felület 1. REST User felület 2. Felhasználói portletek Admin / Mgmt. portletek WF HT Console Console Sys. mgmt WF Editor JBoss Enterprise SOA Platform Rules Management WF editor Rule Lifecycle Management Workflow Engine BPMN2 WS-HT WS-HT WS JDBC JBoss SOA-P ESB ESB JDBC JDBC JBoss REM JBoss Rules Engine DB1 DB1 Customer DB DB2 DB2 Contract DB DB DB n... Egyéb adatforrások, háttérrendszerek: pl. File, Message Queue, Email, HTTP
L'aventure commence... ASCII ASCII Source System File System ASCII FTP File System MSG MQ FTP GET SQL Data Socket JMS Listener TCP/IP Socket JDBC/ODBC Select Update
It's a chopper, baby! ASCII Source System ASCII File System JBoss ESB File System XML JMS Receiving System 1 Receiving System 2 ASCII ASCII JMS JMS File System FTP Receiving System N XML SOAP Receiving System 3
JBoss SOA Platform alapok Enterprise Service Bus (chopper) Service = action pipeline for messages Message = Envelope + payload Listeners and Gateways
Donde esta... ESB service deployment descriptor: jboss-esb.xml <?xml version = "1.0" encoding = "UTF-8"?> <jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product /etc/schemas/xml/jbossesb-1.0.1.xsd" invmscope="global"> <services> <service category="retail" name="shoestore" description="acme Shoe Store Service"> <actions> <action name="println" class="org.jboss.soa.esb.actions.systemprintln" /> </actions> </service> </services> </jbossesb>
ESB hívás ServiceInvoker invoker = new ServiceInvoker( Retail, ShoeStore ); Message message = MessageFactory.getInstance().getMessage(); message.getbody().add( Hi there! ); invoker.deliverasync(message);
Donde está la zapatería? <providers> <jms-provider name="jbossmq" connection-factory="connectionfactory"> <jms-bus busid="shoestorejmsgateway"> <jms-message-filter dest-type="queue" dest-name="queue/shoestorejmsgateway"/> </jms-bus> </jms-provider> </providers> <services> <service category="retail" name="shoestore" invmscope="global" description="acme Shoe Store Service"> <listeners> <jms-listener name="shoestorejmsgateway" busidref="shoestorejmsgateway" is-gateway="true"/> </listeners> <actions> <action name="println" class="org.jboss.soa.esb.actions.systemprintln" /> </actions> </service> </services>
JBoss Developer Studio DEMO
Action Pipeline (in a Service) Actions are reusable mediation components that can be chained together to form the capabilities of a registered service. Actions can be dynamically added/removed at runtime. My_Registered_Service FTP Action Action Action Action Action Business Logic Component Transformation CSV to XML Transformation XML to POJO Routing Splitter or BPM Logging Audit Trail Business Logic Invocation Business Logic: POJO EJB WS Rules JCA with Adapters Anything with Java API This box can also represent the ESB s JVM actions are in VM
Enterprise Integration Patterns File Transfer Channel Message Message Filter Recipient List Router/CBR Splitter Aggregator Message Store Translator/Transformer Enricher Wire Tap Process Manager Content Filter More information at www.enterpriseintegrationpatterns.com
Transformation and Routing
Smooks - ESB Transformation Engine Validation Enrichment Inline transformations (Fragment based Processing) Profile based XML/non-XML processing Anything to Anything (XML, CSV, binary, X12, POJO) Mix/Match transformers on a single message: Java Groovy StringTemplate XSLT
Routing, Services & Actions A_Service SOAP Action EJB DB B_Service ASCII XML Binary FTP Action Action POJO DB C_Service D_Service JMS Action JMS Action WS DB
Content Based Routing Platinum_Service Orders over 12K or from Platinum customers SOAP Action Ordering_Service ASCII XML Binary FTP Action Special_Handling POJO DB SOAP Action EJB Randomly grab orders for review tracer and Keep a total of all orders flowing through the system DB Orders from customers in certain states/countries
Content Based Routing Engine Currently based on JBoss Rules supports XPATH DSL Access to the complete Header and Body/Contents for evaluation Zero to many destinations rule "Routing Rule using XPATH Greater" when xpathgreaterthan "/Order/@totalAmount", "50.0" then Log : "Really It's EXPRESS Shipping"; Destination : express"; end rule "Routing Rule using XPATH Less" when xpathlessthan "/Order/@totalAmount", "50.0" then Log : "Really It's NORMAL Shipping"; Destination : normal"; end Destination is determined by the jboss-esb.xml
UDDI JBoss SOA Platform további szolgáltatások JMS: JBoss Messaging (JBM) Web Services: JBossWS Transactions: JBossTS BPEL JBPM HTTP Gateway, SOAP Proxy,... I solve problems.
UDDI v3 újdonságok Publikáló entitás meghatározhatja a kulcsot korábban ez nem volt engedélyezett Több UDDI nyilvántartó együttműködőképessége Fő (root) nyilvántartó és fiók nyilvántartók Digitális aláírás UDDI entitások számára Biztonságos? Nemzetközi kódkészletek támogatása
Orchestrated/Composed Services BPM JVM External Actor Validation_Service Action DAO DB External Actor Pricing_Service Action POJO DB External Actor Order_Service Action Action EJB DB
Orchestration Designer
REST-es elérés a http gateway segítségével A JBossESB-t nem csak web service-ek és JMS üzenetek segítségével lehet meghívni, hanem sokféle listener definálható hozzá Aszinkron, üzenetalapú Szinkron, kérés-válasz alapú A REST-es elérés (GET, PUT, POST, DELETE) egyszerűsíti a szolgáltatás használatát, pl. scriptekből Be lehet állítani HTTP válaszkódokat is (pl. 404 v. 503)
SOAPProxy Külső web szolgáltatás (WS) publikálása saját szolgáltatásként Ennek előnyei: Laza csatolás a kliens és a szolgáltatás között A szolgáltatás verziózhatóvá válik Bekapcsolható a komplex tartalom alapú routeolásba Automatikus WSDL transzformáció
4.2 4.3 5.0 Future Event Listeners and Actions provide transport mediation Pluggable Architecture for integrating infrastructure mediation services Business Services runs within a container or standalone Transports HTTP S J2EE/Java EE 5 ASCII XML Binary (S)FTP S File JMS* Email Transformation Infrastructure Services Routing Security Management EJB Seam POJOs Drools DSL JC A SQL ESB Decision Table Spring Hibernate Groovy JCA/Inflow Socket InVM Service Registry UDDI v3 Message Store Declarative Orchestration Engine BPEL jpdl Event Notificati on BAM CEP Jython Beanshell JRuby Web Services (Proxy) Browser Excel Sea m EJB SOAP Nati ve (SI) Process Store Improvements in 5.x Business Data Service Component Architecture Service Data Object MetaMatrix Data Sources JMS* - JBoss Messaging, IBM WebsphereMQ, TIBCO EMS
We are hiring! Akinek van kedve ilyen témában dolgozni, kérem, keressen meg. Dr. Szántó Iván szanto.ivan@ulx.hu