Home

Sun SeeBeyond eWay(TM) Adapter for WebLogic User`s Guide

image

Contents

1. A C My Computer Updating the WebLogic JMS An updated WebLogic JMS is required to ensure communication between eGate and WebLogic Figure 14 displays an example of the weblogic ejb jar xml for the Topic MDB which receives messages from a Sun Microsystems JMS Topic WebLogic eWay Adapter User s Guide 37 Sun Microsystems Inc Chapter 5 Section 5 3 WebLogic eWay Component Communication Asynchronous Communication in eGate Figure 14 weblogic ejb jar xml Topic MDB 3 C hawaii eW ays51 0D ev eways ejbadapter startup weblogic examples deployment ME TA INF weblogic e Microsoft Internet Explorer p File Edit View Favorites Tools Help i lt gt 2s Oo 2 D sou erent Qe Er E Address C hawaii eWays51 0D ev ewaysejbadapter startup weblogic examples deployment ME TA INF weblogic ejb jar xml B Go Links G Snagit G Search 9 EA F Check gt N Autelink Se Autoril fe Options oe lt xml version 1 0 gt lt DOCTYPE weblogic ejb jar View Source for full doctype gt lt weblogic ejb jar gt lt weblogic enterprise bean gt lt ejb name gt STCSubscriberMDBean lt ejb name gt lt message driven descriptor gt lt pool gt lt max beans in free pool gt 15 lt max beans in free pool gt lt initial beans in free pool gt 5 lt initial beans in free pool gt lt pool gt lt destination jndi name gt SunMicrosystems Topics STCTopici lt destinatio
2. catch Exception ex throw ex WebLogic eWay Adapter User s Guide 24 Sun Microsystems Inc Chapter 4 Section 4 1 WebLogic Server Components Java Naming and Directory Interface JNDI Viewing the WebLogic JNDI Tree The WebLogic Administrative Console Web Interface allows a user to view the JNDI Tree associated with the server instance To view the JNDI Tree see Figure 3 log onto the Administrative console for the selected server for example the examplesServer expand the Servers tab right click on the server node and select View JNDI tree from the pop up menu Figure 3 displays the WebLogic Administrative Console for WebLogic 7 0 Figure 3 Administrative Console View JNDI Tree a WebLogic Server Console Microsoft Internet Explorer provided by SeeBeyond Eile Edit View Favorites Tools Help Q ex Q x a EA JO Search she Favortes Meda H 2 z lad Address a http localhost 7001 console actions mbean MBeanFramesetAction bodyFrameId wl_console_frame_10734319712378isNew false amp frameId wl_console_fra x Go Links Cri x Console E mydomain aa Connected to localhost 7001 You are logged in as Administrator Logout Welcome to BEA WebLogic Server Home Gacy Open Information and Resources me Open ina new Window Gide Helpful Tools General Information ga Clone myserver Convert weblogic properties Read the documentation se Delete myserver Deploy a new Application
3. Business Process Attributes Business Process Attributes a FileClient receive Output AccountOTD createWLService Input bal text input Argo 1 number literal Agi 2000 0 WebLogic eWay Adapter User s Guide 70 Sun Microsystems Inc Chapter 8 Section 8 2 Implementing the WebLogic eWay Sample Projects Using Sample Projects in elnsight bpDepositAmount This business process describes the account deposit process as seen in Figure 34 Figure 34 Account Deposit Business Process o E gt eeo Start FileClient receive AccountOTD AccountOTD FileClient write findByPrimaryKe depositvyLServic AALService e Business Process 1 The file eWay subscribes to an external directory and picks up a text request for specific account data 2 Account data is copied to the input container FileClient receive Output using the AccountOTD findByPrimaryKeyWLService BPEL service This service also requests the specific data Account ID and amount using the primary key from WebLogic Server as seen in Figure 35 Figure 35 Retrieving Account Data Business Rule Designer ao 98 yBooleany Comparisony E math Objecte AStringy i Arrayy f Operators Business Process Attributes bal FileClient receive Output L text Business Process Attributes AccountOTD findByPrimankKeyWLSerice Input bal input R Argo alll 3 The AccountOTD depositWLService OTD is then invoked adding the num
4. Properties Cancel 2 Click on any property field to make it editable For example click on the ServerName property to edit the properties settings If a parameter s value is true false or multiple choice the field reveals a submenu of property options Click on the ellipsis in the properties field displayed when you click on the field A separate configuration dialog box appears This is helpful for large values that cannot be fully displayed in the parameter s property field Enter the property value in the dialog box and click OK The value now appears in the property field 3 A description of each parameter is displayed in the Description pane when that parameter is selected providing an explanation of any required settings or options 4 The Comments pane provides an area for recording notes and information about the currently selected parameter This is saved automatically for future referral 5 Click OK to close the Properties Editor and save the changes WebLogic eWay Adapter User s Guide 19 Sun Microsystems Inc Chapter 3 Section 3 2 Setting Properties of the WebLogic eWay Specifying JNDI Names 32 Specifying JNDI Names The Connectivity Map and Environment properties are used to specify JNDI names There are two methods you can use to specify a JNDI name Specify the server name and port number in the Environment properties and specify a JNDI name in the Connectivity Map ejbJndiName prop
5. Chapter 7 Using the WebLogic OTD Wizard Object Type Definitions define external data formats that characterize the input and output data structures in a Collaboration Definition This chapter describes how to build and use Object Type Definitions OTDs using the WebLogic OTD Wizard What s in This Chapter Creating a WebLogic OTD on page 59 Note Java classes provided in the WebLogic OTD Wizard can contain APIs created using standard Sun JDK 1 3 x JDK 1 4 x or JDK 1 5 x but they must be compatible with either versions of the JVM For example java code that is dependent on the JDK 1 3 x characteristic for java util TimeZone and java util SimpleTimeZone might not work with the same behavior or load correctly for JVM 1 4 x Note JNI methods and inner classes are not supported Important Ifthe home or the remote interface class or their dependent class es contain s recursive reference s the support for the corresponding EJB methods will be limited 71 Creating a WebLogic OTD Steps required to create an OTD include Select Wizard Type on page 60 Specify OTD Name on page 60 Select Code Base on page 61 Select Home and Remote Interfaces on page 62 Select Method Arguments on page 63 Review Selections on page 64 Generate the OTD on page 64 WebLogic eWay Adapter User s Guide 59 Sun Microsystems Inc Chapter 7 Section 7 1 Using the WebLogic OTD Wizard Creating a WebLogic OTD Select Wizard Type 1
6. Building and Deploying the Project on page 81 83 2 The prjWebLogic_Sample_JCD Sample Project The prjWebLogic_Sample_JCD sample project demonstrates synchronous communication from eGate to WebLogic The sample Project is similar to the prjWebLogic_Sample_JCD sample project described in The prjWebLogic_Sample_BPEL Sample Project on page 70 with the exception that there is no elnsight Business Process The Connectivity Maps for this sample appear as follows WebLogic eWay Adapter User s Guide 77 Sun Microsystems Inc Chapter 8 Section 8 3 Implementing the WebLogic eWay Sample Projects Using the Sample Projects in eGate Figure 41 prjWebLogic_Sample_JCD Connectivity Map Create Account WebLogic eWay inai gt fe Fileln AccountCreate_Collab1 FileOut Figure 42 prjWebLogic_Sample_JCD Connectivity Map Deposit WebLogic eWay intenc D gt E Fileln Deposit4mount_Collab1 FileOut This sample project demonstrates creating and then depositing funds to an account using two collaborations jedAccountCreate and jcdDepositAmount The first collaboration subscribes to the FileIn File eWay and then picks up an account name String Both the account name and a string literal value of 1000 00 double are concatenated and converted to text before passing into the FileOut File eWay During the second collaboration a new deposit of 100 00 is added to the previous balance and a response is written to the FileOu
7. Chapter 3 Section 3 3 Setting Properties of the WebLogic eWay WebLogic eWay Properties Table 4 Environment parameter settings Continued Name Description Required Value Port Specifies the Corba Port of the other An integer indicating a port application server number See Specifying JNDI Names on The default is 18002 page 20 WebLogic eWay Adapter User s Guide 22 Sun Microsystems Inc Chapter 4 WebLogic Server Components This chapter provides an overview of the various Sun Microsystem Java 2 Enterprise Edition J2EE Applications and WebLogic Server technologies employed in the WebLogic Server What s in This Chapter Java Naming and Directory Interface JNDI on page 23 Java Messaging Service JMS on page 26 Enterprise JavaBeans EJBs on page 27 XA Transactions on page 28 41 Java Naming and Directory Interface JNDI The JNDI service is a set of APIs published by Sun that interface to a directory to locate named objects APIs allow Java programs to store and lookup objects using multiple naming services in a standard manner The naming service may be either LDAP a file system or a RMI registry Each naming service has a corresponding provider implementation that can be used with JNDI The ability for JNDI to plug in any implementation for any naming service or span across naming services with a federated naming service easily provides another level of programming abstraction
8. Common Administration Task Descriptions Ae View Server log Recent Task Status Set your console preferences ta kaa Domain Configurations View Connections Network Configuration Your Deployed Resources Your Application s Security Settings Domain Applications Realms Servers EJB Modules Clusters Web Application Modules Machines Connector Modules Startup amp Shutdown View Sockets View Execute Queues View Execute Threads Startstop this server Define Security Policy Define Scoped Role Services Configurations JDBC SNMP Other Services Connection Pools Agent XML Registries MultiPools Proxies JTA Configuration Data Sources Monitors Virtual Hosts Data Source Factories Log Filters Domain wide Logging Applet navapplet started 4 Local intranet In the following example see Figure 4 the JNDI tree Web page shows that the Sun Microsystems subcontext was expanded in order to view the Sun Microsystems JMS objects that were bound to the WebLogic JNDI These objects are bound when the WeblogicStartup class is loaded and run by the WebLogic Server See Sun Microsystems WebLogic Startup Class on page 43 for more details about this startup class Additionally when EJBs are deployed on the application server they are registered in the JNDI This JNDI name is used by the EJB OTD to look up the home interface of the EJB WebLogic eWay Adapter User s Guide 25 Sun Microsystems Inc Chapter 4 Section
9. This level of abstraction allows Java code using JNDI to be portable against any naming service For example no code changes should be needed by the Java client code to run against an RMI registry or an LDAP server The WebLogic Naming Service Any J2EE compliant application server such as the WebLogic Server has a JNDI subsystem The JNDI subsystem is used in an Application Server as a directory for such objects as resource managers and Enterprise JavaBeans EJBs Objects managed by the WebLogic container have default environments for getting the JNDI InitialContext loaded when they use the default InitialContext constructor For a Collaboration using a WebLogic EJB Object Type Definition OTD to find the home interface of an EJB the JNDI properties must be configured and associated with the OTD However for other external clients accessing the WebLogic naming service requires a Java client program that sets up the appropriate JNDI environment when creating the JNDI Initial Context WebLogic eWay Adapter User s Guide 23 Sun Microsystems Inc Chapter 4 Section 4 1 WebLogic Server Components Java Naming and Directory Interface JNDI There are essentially two environments that have to be configured Context PROVIDER_URL and Context INITIAL_CONTEXT_FACTORY For WebLogic the Context PROVIDER_URL environment is t3 lt wlserverhost gt lt port gt where lt wlserverhost gt is the hostname on which the WebLogic Server inst
10. s Select Sun Java Composite Application Platform Suite Products Installed table Administration tab click the Click to install additional products link Expand the eWay option Select the products for your Sun Java Composite Application Platform Suite and include the following File eWay the File eWay is used by most sample Projects WebLogiceWay To upload the WebLogic eWay User s Guide Help file Readme and sample Projects expand the Documentation option and select WebLogiceWayDocs Once you have selected all of your products click Next in the top right or bottom right corner of the Select Sun Java Composite Application Platform Suite Products to Install box From the Selecting Files to Install box locate and select your first product s SAR file Once you have selected the SAR file click Next Your next selected product appears Follow this procedure for each of your selected products The Installation Status window appears and installation begins after the last SAR file has been selected Once your product s installation is finished continue installing the Sun Java Composite Application Platform Suite as instructed in the Sun Java Composite Application Platform Suite Installation Guide Adding the eWay to an Existing Java CAPS Installation If you are adding the eWay to an existing Sun Java Composite Application Platform Suite installation do the following 1 2 Complete steps 1 through 4 above Once yo
11. Check A Autollink YE AutoFill feJ Options oe lt DOCTYPE ejb jar View Source for full doctype gt lt ejb jar gt lt enterprise beans gt lt message driven gt lt message driven gt lt message driven gt lt session gt lt ejb name gt STCPublisherSLSessionBean lt ejb name gt lt home gt com stc eways ejb sessionbean publisher STCPublisherSLSessionHome lt home gt lt remote gt com stc eways ejb sessionbean publisher STCPublisherSLSession lt remote gt lt ejb class gt com stc eways ejb sessionbean publisher STCPublisherSLSessionBean lt ejb class gt lt session type gt Stateless lt session type gt lt transaction type gt Bean lt transaction type gt lt resource ref gt lt res ref name gt jms TopicConnectionFactory lt res ref name gt lt res type gt javax jms TopicConnectionFactory lt res type gt lt res auth gt Application lt res auth gt lt resource ref gt lt resource eny ref gt lt resource eny ref name gt jms Topic lt resource eny ref name gt lt resource env ref type gt javax jms Topic lt resource env ref type gt lt resource eny ref gt lt session gt lt session gt lt session gt lt enterprise beans gt lt assembly descriptor gt lt ejb jar gt 2 My Computer The value for the lt res ref name gt tag is jms TopicConnectionFactory and the value for the lt resource env ref name gt environment entry tag is jms Topic T
12. Deployment Profile Auto Map 74 80 creating 73 79 E elnsight components 69 EJB Containers 34 EjbJndiName specifying JNDI names 21 EJBs 27 Entity Beans 28 Message Driven Beans 28 SeeBeyond 91 subscribing toSeeBeyond queue 93 subscribing toSeeBeyond Topic 91 Session Beans 28 SeeBeyond 96 ENC 39 Enterprise JavaBeans 27 Entity Beans 28 Message Driven Beans 28 SeeBeyond 91 subscribing to SeeBeyond queue 93 subscribing to SeeBeyond Topic 91 WebLogic eWay Adapter User s Guide 114 Session Beans 28 SeeBeyond 96 Entity Beans 28 Environment creating 73 79 Logical Host 73 79 properties 18 21 Sun SeeBeyond Integration Server 73 79 Environment Editor 73 79 Environment Naming Context 39 eWay plug ins installing 15 examples dataSource demoXAPool 111 External Application creating 17 Installing alert codes 16 eWay plug ins 15 migration procedures 13 sample Projects 13 J Java Messaging Service 26 SeeBeyond JMS 35 JMS SeeBeyond JMS 35 WebLogic Server Components JMS 26 JNDI sample code 24 SeeBeyond JMS Queue sub context 46 SeeBeyond JMS QueueConnectionFactory sub context 45 SeeBeyond JMS server names list 46 SeeBeyond JMS Topic sub context 45 sub context 44 viewing the JNDI tree 25 JNDI names qualified 20 specifying 20 JTA and JMS XA logging 109 monitoring 109 111 tracing 109 L logging 111 JTA and JMS XA 109 111 Sun Microsystems Inc Index M Message Driven Beans 28 messag
13. Project in the ZIP file field WebLogic eWay Adapter User s Guide 13 Sun Microsystems Inc Chapter 2 Section 2 3 Installing the WebLogic eWay ICAN 5 0 Project Migration Procedures 6 Click Export to create the Project ZIP file in the selected destination Install Java CAPS 5 1 2 1 Install Java CAPS 5 1 2 including all eWays libraries and other components used by your ICAN 5 0 Projects 2 Start the Java CAPS 5 1 2 Enterprise Designer Import the Project 1 From the Java CAPS 5 1 2 Enterprise Designer s Project Explorer tree right click the Repository and select Import Project from the shortcut menu The Import Manager appears 2 Browse to and select your exported Project file 3 Click Import A warning message Missing APIs from Target Repository may appear at this time This occurs because various product APIs were installed on the ICAN 5 0 Repository when the Project was created that are not installed on the Java CAPS 5 1 2 Repository These APIs may or may not apply to your Projects You can ignore this message if you have already installed all of the components that correspond to your Projects Click Continue to resume the Project import 4 Close the Import Manager after the Project is successfully imported Deploy the Project 1 Anew Deployment Profile must be created for each of your imported Projects When a Project is exported the Project s components are automatically checked in to Version Control
14. and other countries exclusively licensed through X Open Company Ltd This product is covered and controlled by U S Export Control laws and may be subject to the export or import laws in other countries Nuclear missile chemical biological weapons or nuclear maritime end uses or end users whether direct or indirect are strictly prohibited Export or reexport to countries subject to U S embargo or to entities identified on U S export exclusion lists including but not limited to the denied persons and specially designated nationals lists is strictly prohibited Copyright 2006 Sun Microsystems Inc 4150 Network Circle Santa Clara California 95054 Etats Unis Tous droits r serv s Sun Microsystems Inc d tient les droits de propri t intellectuels relatifs a la technologie incorpor e dans le produit qui est d crit dans ce document En particulier et ce sans limitation ces droits de propri t intellectuels peuvent inclure un ou plus des brevets am ricains list s a l adresse http www sun com patents et un ou les brevets suppl mentaires ou les applications de brevet en attente aux Etats Unis et dans les autres pays L utilisation est soumise aux termes de la Licence Cette distribution peut comprendre des composants d velopp s par des tierces parties Sun Sun Microsystems le logo Sun Java Sun Java Composite Application Platform Suite Sun SeeBeyond eGate elnsight eVision eTL eXchange eView elndex eBAM et eWay sont
15. resource ref gt lt resource env ref gt lt resource env ref name gt jms Queue lt resource env ref name gt lt resource env ref type gt javax jms Queue lt resource env ref type gt lt resource env ref gt lt session gt lt ejb jar gt lt ejb name gt Tag The lt ejb name gt tag defines the name of the Stateless Session Bean and is used to uniquely identify the Session Bean by the container This name is displayed in the WebLogic Administrative Console to identify this Bean lt ejb class gt Tag The lt ejb class gt tag defines the class that implements the Session Bean The home interface for this bean is com stc eways ejb sessionbean publisher STCPublisherSLSessionHome The remote interface for the bean is com stc eways ejb sessionbean publisher STCPublisherSLSession The class which implements the home and remote interfaces as well as the bean itself is com stc eways ejb sessionbean publisher STCPublisherSLSessionBean The Session Bean knows about the QueueConnectionFactory and Queue destinations via the resource reference tags lt res ref name gt and lt resource env ref name gt Tags The value for the lt res ref name gt tag is jms QueueConnectionFactory and the value for the lt resource env ref name gt environment entry is jms Queue The EJB can reference jms QueueConnectionFactory but is not concerned with what the actual JNDI name is They are specified as javax jms QueueConnectionFactory and ja
16. see the Sun SeeBeyond eGate Integrator System Administration Guide WebLogic eWay Adapter User s Guide 16 Sun Microsystems Inc Chapter 3 Setting Properties of the WebLogic eWay This chapter describes how to configure the WebLogic eWay properties and provides a list of the eWay properties and their required values What s in This Chapter Configuring the WebLogic eWay Properties on page 17 Specifying JNDI Names on page 20 WebLogic eWay Properties on page 20 31 Configuring the WebLogic eWay Properties The WebLogic eWay includes a unique set of configuration parameters After creating the eWays and the WebLogic External System in the Project s Environment the property parameters can be modified for your specific system 311 Selecting WebLogic as the External Application To create a WebLogic eWay you must first create a WebLogic External Application in your Connectivity Map WebLogic eWays are located between a WebLogic External Application and a Service Services are containers for Java Collaborations Business Processes eTL processes and so forth To create the WebLogic External Application 1 From the Connectivity Map toolbar click the External Applications icon 2 Select the WebLogic External Application from the menu The selected WebLogic External Application icon appears on the Connectivity Map toolbar The new External System can now be dragged and dropped onto the Connectivity Map canvas and incorporate
17. 4 20xx 5 49 53 PM PST gt lt Debug gt lt JTA gt lt loca lt 000000 gt lt 5 fa80c71858e3d95b XA end rm demoXAPool lt Apr 4 20xx 5 49 53 PM PST gt lt Debug gt lt JTA gt lt loca eal lt en X time 0 ms ago gt lt Apr 4 20xx 5 49 53 PM PST gt lt Debug gt lt JTA gt lt loca fa80c71858e3d95b gt lt 000000 gt lt 5 fa80c71858e3d95b XA lt Apr 4 20xx 5 49 53 PM PST gt lt Debug gt lt JTA gt lt loca lt 5 lt 5 requests 0 gt lt Apr 4 20xx 5 49 53 PM PST gt lt Debug gt lt JTA gt lt loca xar com SunMicrosystems jms client STCXAResource 82e lt Apr 4 20xx 5 49 53 PM PST gt lt Debug gt lt JTA gt lt loca lt 000000 gt lt ResourceDescriptor com SunMicrosystems jms Number of active requests 1 lt Apr 4 20xx 5 49 53 PM PST gt lt Debug gt lt JTA gt lt loca fa80c71858e3d95b gt lt 000000 gt lt 5 fa80c71858e3d95b XA lt Apr 4 20xx 5 49 53 PM PST gt lt Debug gt lt JTA gt lt loca lt 5 f a80c71858e3d95b gt lt 000000 gt lt ResourceDescriptor com endResourceUse Number of active requests 0 gt lt Apr 4 20xx 5 49 53 PM PST gt lt Debug gt lt JTA gt lt loca lt 000000 gt lt 5 fa80cC71858e3d95b XA prepare rm demoXAPoo lt Apr 4 20xx 5 49 53 PM PST gt lt Debug gt lt JTA gt lt loca lt 5 time 0 ms ago gt lt Apr 4 20xx 5 49 53 PM PST gt lt Debug gt lt JTA gt lt oca fa80c71858e3d95b gt lt 000000 gt lt
18. 4 2 WebLogic Server Components Java Messaging Service JMS Figure 4 Administrative Console The JNDI Tree Web Page File Edit View Favorites Tools Help a eck gt QA A Asearch Gyravorites media D S fw aA Address amp http localhost 7001 console actions jndi JndiFramesetAction server examples 3AName 3DexamplesServer 2CType 3DServer ae examplesServer _appsdir_ejb20_basic_statelessSession_earejb20_b _appsdir_webserices_trader_eartrader_jarTraderSer ejh20 beanManaged AccountHome ejb20 containerManaged AccauntHame Use the tree on the left to browse the naming tree for this server This can ejb20 statefulSession TraderHome be useful in developing and debugging your applications ejb20 statelessSession TraderHome examples dataSource demoPool Naming Context examples dataSource demoxAPool e Bound Object javax jms jta jmsjdbc ReceivelnTxHome jta_ejb_jmsjdbcjta_ejb_jmsjdbcreceivelnTx_EO NameService quotes 5 Sunmicrosystems QueueConnectionFactories QueveConnectionFactory XAQueueConnectionFactory o Queues sTCQueuel sTCQueue2 sTCQueue3 sTCPublisherSLSessionBean STCQueueRequestorSLSessionBean STCxAPublisherSLSessionBean o6 TopicConnectionFactories TopicConnectionFactory XATopicConnectionFactory 5 Topics STCTopic1 STCTopic2 STCTopic3 FP wohlanie Applet navapplet started E Loca intranet examples gt Servers gt examplesServe
19. 8 Section 8 4 Implementing the WebLogic eWay Sample Projects Using the JMS Sample Projects in eGate java com stc eways ejb sessionbean queuerequestor STCQueueRequestorSLSessionClient t3 localhost 7001 SunMicrosystems STCQueueRequestorSLSessionBean c temp testfile txt file 8 4 2 The JMSTopicSubscribe Sample JMSTopicSubscribe is an inbound example that demonstrates how a remote client is used to send a messages to eGate asynchronously through a JMS topic The Connectivity Map for this sample project appears as follows Figure 48 JMSTopicSubscribe Connectivity Map JMS client properties Outbound File eWay fad Rs a a A D Topic Sample2 crJMSTopicSubscribe1 FileOut In this sample the STCPublisherSLSessionBean Session Bean acts as publisher to the JMS Topic This demonstrates how messages are published asynchronously from an EJB running in WebLogic to a Sun Microsystems JMS Topic The Collaboration crJMSTopicSubscribe seen on the Connectivity Map is configured to use the internal Sun Microsystems JMS IQ Manager as the JMS server It subscribes to the JMS client properties on the Topic Sample2 Topic and sends data received to the Inbound File eWay Figure 49 JMSTopicSubscribe Sample Components WebLogic Container STCPublisherSLSessionClient Topic Sample2 crJMSTopicSubscribe Collaboration Definition Java publish Publisher S Connection Point Connection Connestion s JMS IQ Manager 4 A
20. API Kit is required for asynchronous communication in eGate Note WebLogic 9 is not supported for asynchronous communication Preparing WebLogic The following steps are required to prepare the WebLogic MDB 1 Configure WebLogic to create JNDI entries for Sun Microsystems JMS on WebLogic Server instance startup Responsibility for building the JNDI tree lies with the startup classes Install these classes in the startup area of the Console and specify the name of the properties file 2 Build the EJB and implement the business logic Implementation uses JNDI to lookup TopicConnectionFactory 3 Create anew Deployment Descriptor An EJB is a Java class that is written following the protocols of the application server A deployment tool is then used to make the EJBs available to other programs from the directory The Deployment Descriptor comes in two parts General EJB parameters ejb jar xm1 defines the session type stateless statefull registers the Home and Remote classes with JNDI and defines the JNDI name Application Server vendor specific parameters weblogic ejb jar xml defines Pooling parameters and Reference Resource parameters 4 Take the Bean class files and Deployment Descriptors then place these in a Jar file Upload Jar files using the WebLogic Console Classes are available to other applications once the EJB is deployed a2 Using Sample Projects in elnsight This section describes how to use sample proje
21. Applications E I EJB Modules Name Seebeyond_Startup 2 _appsdirjms_messagef _appsdir_jta_ejb_jmsjdb examples gt Startup amp Shutdown gt Seebeyond_Startup localhost 7001 weblogic Logout Connected to You are logged in as Configuration A name to represent this startup class in the Administration Console h Sicelowepioalg ClassName com stc eways weblogic startup gt _appsdirjms_messagef 2 _appsdir_jta_ejb_jmsjdbi 2 stcejbweblogic The fully qualified name of this startup class C Web Application Modules Deployment Order 1000 E Connector Modules 7 E Startup amp Shutdown A numerical value that indicates when WebLogic Server executes this startup class relative to other startup B hello classes Classes with lower Deployment Order values are executed before those with higher values Ej hello_cluster E multihello sbyn wlstartup propsfile C bea weblogic81 E poolReceive Arguments server lib STCULStartup properties El Seebeyond_Startup E serverReceive S startBrowser The arguments that the targeted server s use to initialize this startup class services security C Failure is Fatal E Domain Log Filters S TTIE RES Gia Tasks Specifies whether a failure in this startup class prevents the targeted server s from starting C Run Before Application Deployments Specifies whether this startup class is loaded and run before the targeted server
22. Deploy icon Click Yes when the Deploy prompt appears 2 A message appears when the project is successfully deployed 8 2 10 Build the Deployment EAR File Using the Commandline Codegen Tool The Sun SeeBeyond Enterprise Designer is packaged with JDK 1 4 If your EJB is compiled with JDK version 1 5 or above you must use Command Line Codegen to build the Deployment EAR file Please refer to the Sun SeeBeyond eGate Integrator User s Guide Building an Application File From the Command Line for details For a simple description of how to use the Commandline Codegen Tool to create an EAR file do the follow 1 Download the CommandLineCodegen tool from the Sun Java Composite Application Platform Suite Installer 2 Extract the files into a local directory WebLogic eWay Adapter User s Guide 75 Sun Microsystems Inc Chapter 8 Section 8 3 Implementing the WebLogic eWay Sample Projects Using the Sample Projects in eGate 3 Download and install JDK 1 5 from Sun website or make a note of the JDK that was used to compile the EJB 4 Download and install ANT version 1 6 2 or above from Apache Software Foundation at http ant apache org 5 Change the build properties file in the commandlinecodegen directory At a minimum you must change the following parameters with sample data Make sure there is no trailing space after each parameter The parameters below are usually different for each specific environment commandline r
23. Environment to envWebLogic 4 Right click envWebLogic and select New gt WebLogic External System Name the External System esWebLogic Click OK esWebLogic is added to the Environment Editor 5 Right click envWebLogic and select New gt File External System Name the External System esFile Click OK esFile is added to the Environment Editor 6 Right click envWebLogic and select New gt Logical Host LogicalHost1 is added to the Environment Editor 7 From the Environment Explorer tree right click LogicalHost1 and select New gt Sun SeeBeyond Integration Server A new Integration Server IntegrationSvr1 is added to the Environment Explorer tree under LogicalHost1 seeFigure 38 Figure 38 Environment Editor esWebLogic 4 827 Creating the Deployment Profile Deployment Profiles are specific instances of a Project in a particular Environment A Deployment Profile is created using the Enterprise Designer s Deployment Editor To create a Deployment Profile do the following 1 From the Enterprise Explorer s Project Explorer right click the Project and select New gt Deployment Profile WebLogic eWay Adapter User s Guide 73 Sun Microsystems Inc Chapter 8 Section 8 2 Implementing the WebLogic eWay Sample Projects Using Sample Projects in elnsight 2 From the Create Deployment Profile dialog box enter a name for the Deployment Profile for this example dpWebLogic_Sample_BPEL Select the appropriat
24. From the Project Explorer tree right click the Project and select New gt Object Type Definition from the menu The Select Wizard Type page appears displaying the available OTD wizards See Figure 26 Figure 26 OTD Wizard Selection Select Wizard Type Select Wizard Type OTD Wizard Description _ _ _ J Cobol Copybo Uses a COBOL CopyBook to create an OTD DTD Uses a DTD to create an OTD JDBC Databa Uses a JDBC database to create an OTD Siebel EAl Uses Siebel Integration Object or ASI to create Sybase Datab Uses a Sybase database to create an OTD User Defined Allows the user to create a custom OTD UD OTD from Uses a text file to create a custom OTD VSAM Databa Uses a VSAM database to create an OTD xSD Uses an XSD to create an OTD Back C Nete Finish Cancel Help 2 From the list select the WebLogic AppServer and click Next The Specify OTD Name page appears Specify OTD Name 3 Enter a name for the new OTD see Figure 27 WebLogic eWay Adapter User s Guide 60 Sun Microsystems Inc Chapter 7 Section 7 1 Using the WebLogic OTD Wizard Creating a WebLogic OTD 4 Figure 27 Specify OTD Name Panel Name Select Vizard Type Specify OTD Name Select Code Base Select Interfaces Select Method Arguments Review Selections OTD Name Account lt Back Next gt Finish Cancel Help Click Next the Select Home and Remote Interfaces page app
25. JNDI name of the datasource XA pool that is already created and configured for the examples WebLogic Server when WebLogic is installed 94 1 Sun Microsystems Sample XA Session Beans A Session Bean Stateless or Stateful can publish a message to a Sun Microsystems JMS Topic or send a message to a Sun Microsystems JMS Queue in an XA transaction The Session Bean accesses the Sun Microsystems JMS XAConnectionFactory and Destination via the Bean s Environment Naming Context ENC The XAConnectionFactory and Destination are denoted using the following tags of the Bean s deployment descriptor lt resource ref gt lt resource env ref gt lt resource ref name gt lt resource env ref name gt The Session Bean must enlist the Sun Microsystems JMS XA Resource to WebLogic TransactionManager The enlistment must be done to the current XA transaction created by the WebLogic container How To Enlist Sun Microsystems JMS XAResource WebLogic provides a helper class weblogic transaction TxHelper which the EJB developer can use to get a hold of the current transaction and to enlist the Sun Microsystems JMS XA Resource to the current transaction The enlistment process can be done in the Bean s ejbCreate method s The Session Bean relies on the Sun Microsystems Startup Class see Sun Microsystems WebLogic Startup Class to create and bind the JMS XAConnectionFactory and Destination prior to WebLogic deploying the EJBs Because WebLogi
26. Remotelnterface isidentical O withdraw getEJBHome getPrimaryKey remove balance deposit getHandle Properties Value AccountWrapper true Home interface Ej Account true UTF 8 65 Sun Microsystems Inc Chapter 8 Implementing the WebLogic eWay Sample Projects This chapter describes how to use the sample projects included in the installation CD ROM package What s in This Chapter Sample Projects Overview on page 66 Using Sample Projects in eInsight on page 68 Using the Sample Projects in eGate on page 76 Using the JMS Sample Projects in eGate on page 82 Note Sample projects mentioned in this chapter were created using WebLogic 8 1 s1 Sample Projects Overview Sample projects are designed to provide an overview of the basic functionality of the WebLogic eWay by identifying how to synchronously and asynchronously pass data to and from a WebLogic Server Types of synchronous and asynchronous communication include Synchronous Communication eGate to WebLogic Server on page 66 Asynchronous Communication WebLogic EJB to eGate JMS on page 67 Asynchronous Communication eGate JMS to a WebLogic Message Driven Bean on page 67 8 1 1 Synchronous Communication eGate to WebLogic Server Sample projects using synchronous communication between eGate and the WebLogic Server require the creation of OTD
27. STCXAResource esServer gt lt Thread 3 gt lt gt lt gt startResourceUse esServer gt lt Thread 3 gt lt gt prepare DONE ok gt esServer gt lt Thread 3 gt lt gt SunMicrosystems jms client STCXAResource esServer gt lt Thread 3 gt lt gt lt gt xar demoXAPool gt esServer gt lt Thread 3 gt lt gt lt gt last alive esServer gt lt Thread 3 gt lt gt lt 5 a80cC71858e3d95b gt lt 000000 gt lt 5 fa80c71858e3d95b KA prepare DONE ok gt WebLogic eWay Adapter User s Guide 110 Sun Microsystems Inc Chapter 9 Sun Microsystems Sample Message Driven Beans requests 0 gt lt 000000 gt alse gt time 0 ms ago gt lt Apr 4 20xx 5 49 53 PM PST gt lt Debug gt lt JTA gt lt lt 5 f a80cC71858e3d95b gt lt 000000 gt lt ResourceDescriptor demoXAPool endResourceUse Number of active lt Apr 4 20xx 5 49 53 PM PST gt lt Debug gt lt JTA gt lt lt Apr 4 20xx 5 49 53 PM PST gt lt Debug gt lt JTA gt lt lt 000000 gt lt ResourceDescriptor com SunMicrosystems Number of active requests 1 last alive time 0 ms ago gt lt Apr 4 20xx 5 49 53 PM PST gt lt Debug gt lt JTA gt lt lt 5 fa80cC71858e3d95b gt lt 000000 gt lt 5 fa80cC71858e3d95b XA commit DONE rm com SunMicrosystems jms client STCXAResource xar com SunMicrosystems jms client STCXAResource 82e lt Apr 4 20xx 5 49 53 PM PST gt lt Debug gt
28. and Topic destination See the sample Java source code for details protected void initialize throws EJBException if bInitialized Exception savedException null try Get the InitialContext jndiInitialContext new InitialContext Get the TopicConnectionFactory using JNDI ENC WebLogic eWay Adapter User s Guide 101 Sun Microsystems Inc Chapter 9 Section 9 4 Sun Microsystems Sample Message Driven Beans Sun Microsystems Sample XA Message Driven Beans TopicConnectionFactory tcf TopicConnectionFactory jndiInitialContext lookup java comp env ENV_TOPIC_CONNECTION_FACTORY Get the Topic using JNDI ENC Topic topic Topic jndiInitialContext lookup java comp env ENV_TOPIC_DESTINATION Create our JMSTopic object sbynJMSTopicObject new JMSTopicObject tcf topic bInitialized true catch Exception ex1 throw new EJBException ex1 Accessing Entity Beans Entity Beans can be accessed from an eGate Collaboration by using the EJB OTD Builder to create an OTD for the Session Bean This is done by 1 Using Creators or Finders on the home interface to create remote instances 2 Using hasNext and next to access the instance 3 Call methods on the remote instance By calling remove the Entity Bean instance is removed from the permanent s
29. are provided so that when instantiated they publish to the Queue name listed in their parameters Use these samples as models to build Session Beans 3 Create anew Deployment Descriptor An EJB is a Java class is written following the protocols of the application server A deployment tool a XML file similar to a configuration file for an eWay is then used to make the EJBs available to other programs from the directory An EJB in itself does not have parameters Parameters that direct the behavior of the EJB port number class names for the JMS provider and so on are provided and stored in the Deployment Descriptor 4 Take the Session Bean and Deployment Descriptor and use the WebLogic GUI to make the EJB available for external applications to call and publish to the Sun Microsystems JMS 8 13 Asynchronous Communication eGate JMS to a WebLogic Message Driven Bean Asychronous Communication between the eGate JMS to a WebLogic Message Driven Bean also requires the implementation of Sun Microsystems JMS IQ Manager into the WebLogic environment WebLogic eWay Adapter User s Guide 67 Sun Microsystems Inc Chapter 8 Section 8 2 Implementing the WebLogic eWay Sample Projects Using Sample Projects in elnsight Sample projects using synchronous communication in this manner include The JMSQueueSend Sample on page 87 The JMSTopicPublish Sample on page 88 The JMSXAQueueSend Sample on page 89 Note Installation of the eGate
30. demonstrates a synchronous interaction between the WebLogic EJB and the eGate JMS As mentioned previously synchronous communication is considered an unbuffered process requiring complete data transmission and reply or confirmation of message transmission failure before enacting additional communication processes The nature of the sample project is dependent on the services invoked through the methods and properties of the EJB that is used to create the OTD In the prjWebLogic_Sample_BPEL sample project these services are used to detail the creation and subsequent funding of an account The sample project includes the following business processes bpCreateAccount This business process describes the account creation process seen in Figure 32 Figure 32 Account Creation Business Process O End Or of fit gt p gt 69 Start FileClient receive AccountOTD FileClient write createvYLService Business Process 1 The File eWay subscribes to an external directory and picks up a text request for specific account data 2 Account data is copied to the input container FileClient receive Output using the AccountOTD createWLService BPEL service A number literal of 2000 is also passed into the OTD see Figure 33 before sending the combined data to the FileClient write container Figure 33 Account Creation Business Rule Designer 8 E key a TH Boolean gt Comparison Mathy Objects AStringy Array 8 Operators
31. f a80c71858e3d95b gt lt 000000 gt lt ResourceDescriptor com endResourceUse Number of active requests 0 gt on lt Apr 4 20xx 5 49 53 PM PST gt lt Debug gt lt JTA gt lt loca lt 5 fa80cC71858e3d95b gt lt 000000 gt lt ResourceDescriptor demoXAPool1 demoXAPool xar demoXAPool registered true enlistStatically false healthy true lastAliveTimeMillis 1 numActiveRequests 0 scUrls examplesServer 10 1 50 134 7003 examples i lt Apr 4 20xx 5 49 53 PM PST gt lt Debug gt lt JTA gt lt loca a80c71858e3d95b gt lt 000000 gt lt 5 fa80c71858e3d95b XA ags TMNOFLAGS gt lt Apr 4 20xx 5 49 53 PM PST gt lt Debug gt lt JTA gt lt lt 5 oca time 0 ms ago gt lt Apr 4 20xx 5 49 53 PM PST gt lt Debug gt lt JTA gt lt loca lt 5 f a80c71858e3d95b gt lt 000000 gt lt 5 fa80c71858e3d95b XA lt Apr 4 20xx 5 49 53 PM PST gt lt Debug gt lt JTA gt lt loca lt 000000 gt lt 5 f a80C71858e3d95b XA end rm com SunMicros xar com SunMicrosystems jms client STCXAResource 82e lt Apr 4 20xx 5 49 53 PM PST gt lt Debug gt lt JTA gt lt loca lt 000000 gt lt ResourceDescriptor com SunMicrosystems jms xar com SunMicrosystems jms client STCXAResource 82e lt Apr 4 20xx 5 49 53 PM PST gt lt Debug gt lt JTA gt lt loca a80c71858e3d95b gt lt 000000 gt lt ResourceDescriptor com dResourceUse Number of active requests 0 gt lt Apr
32. following Sun Microsystems JMS objects TopicConnectionFactory QueueConnectionFactory Topic s Queue s By binding instances of these objects any EJB can get a hold of the references to these objects by looking them up in the naming service using JNDI The Message Driven Beans MDBs are used for asynchronous subscription of messages from a JMS Topic or Queue This scenario corresponds to the Sun Microsystems JMS provider driving MDBs running in WebLogic Session Beans are used for publishing and sending Topic Queue messages through the Sun Microsystems JMS provider as well The following architectural diagram Figure 11 illustrates the components involved WebLogic eWay Adapter User s Guide 34 Sun Microsystems Inc Section 5 3 WebLogic eWay Component Communication Asynchronous Communication in eGate Figure 11 WebLogic Server and WebLogic eWay Components WebLogic Server EJB Container SeeBeyond Lookup amp Queue Topic Connection Factory i SeeBeyond SeeBeyond Queues WebLogic Topics Startup Class JMS Java Connection Collaboration 5 3 2 Sun Microsystems JMS As part of the WebLogic eWay installation Sun Microsystems supplies startup classes for JMS objects to install into the naming service Four JMS ConnectionFactory objects are bound to the naming service including MyTopicConnectionFactory XATopicConnectionFactory MyQueueConnectionFactory XAQueueConnectionFactory Moreov
33. lt ejb class gt tag defines the class that implements that Session Bean The home interface for this bean is com stc eways ejb sessionbean publisher STCXAPublisherSLSessionHome The remote interface for the bean is com stc eways ejb sessionbean publisher STCXAPublisherSLSession The class which implements the home and remote interfaces as well as the bean itself is com stc eways ejb sessionbean publisher STCXAPublisherSLSessionBean WebLogic eWay Adapter User s Guide 107 Sun Microsystems Inc Chapter 9 Section 9 4 Sun Microsystems Sample Message Driven Beans Sun Microsystems Sample XA Message Driven Beans The Session Bean is aware of the XATopicConnectionFactory and Topic destinations via the resource reference tags lt res ref name gt and lt resource env ref name gt Tag The value for the lt res ref name gt tag is jms XATopicConnectionFactory and the value for the lt resource env ref name gt environment entry is jms Topic They are specified as javax jms XATopicConnectionFactory and javax jms Topic for the resource type respectively These resource references are another level of JNDI indirection They don t specify the actual JNDI names of the JMS objects but rather they are references to the JNDI name The EJB can reference jms XATopicConnectionFactory but does not really care what the actual JNDI name is The actual JNDI names for these references are defined in the weblogic ejb jar xml file Notice that the SLS Bean
34. lt transaction type gt Container lt transaction type gt lt message driven destination gt lt destination type gt javax jms Queue lt destination type gt lt subscription durability gt Durable lt subscription durability gt lt message driven destination gt lt resource ref gt lt res ref name gt jdbc demoXAPool lt res ref name gt lt res type gt javax sql DataSource lt res type gt lt res auth gt Container lt res auth gt lt resource ref gt lt message driven gt lt enterprise beans gt lt assembly descriptor gt lt container transaction gt lt method gt lt ejb name gt STCXAReceiverMDBean lt ejb name gt lt method name gt lt method name gt lt method gt lt trans attribute gt Required lt trans attribute gt lt container transaction gt lt assembly descriptor gt lt ejb jar gt Notice that MDB references another resource by the reference name jdbc demoXAPool This resource is of type javax sql DataSource The actual JNDI name of this resource is defined in the weblogic ejb jar xml deployment descriptor Notice also that the CMT WebLogic eWay Adapter User s Guide 103 Sun Microsystems Inc Chapter 9 Section 9 4 Sun Microsystems Sample Message Driven Beans Sun Microsystems Sample XA Message Driven Beans Container Managed Transaction is specified in the lt transaction type gt for the MDB It is also required that the lt container transaction gt be specifi
35. the File menu click Exit menus and objects Select the eGate sar file Monospaced Command line arguments code java jar filename jar samples variables are shown in bold italic Blue bold Hypertext links within See Text Conventions on page 10 document Blue underlined Hypertext links for Web http www sun com addresses URLs or email addresses 144 Related Documents The following Sun documents provide additional information about the Sun Java Composite Application Platform Suite product Sun SeeBeyond eGate Integrator User s Guide Sun Java Composite Application Platform Suite Installation Guide 15 Sun Microsystems Inc Web Site The Sun Microsystems web site is your best source for up to the minute product news and technical support information The site s URL is http www sun com 16 Documentation Feedback We appreciate your feedback Please send any comments or suggestions regarding this document to CAPS_docsfeedback sun com WebLogic eWay Adapter User s Guide 10 Sun Microsystems Inc Chapter 2 Installing the WebLogic eWay This chapter explains how to install the WebLogic eWay What s in This Chapter WebLogic eWay System Requirements on page 11 Installing the WebLogic eWay on page 11 ICAN 5 0 Project Migration Procedures on page 13 Installing Enterprise Manager eWay Plug Ins on page 15 21 WebLogic eWay System Requirements The WebLogic eWay Readm
36. the WebLogic eWay Sample Projects Using the Sample Projects in eGate 83 1 Importing a Sample Project Sample eWay Projects are included as part of the installation package To import a sample eWay Project to the Enterprise Designer do the following 1 The sample files are uploaded with the eWay s documentation SAR file and downloaded from the Sun Java Composite Application Platform Suite Installer s Documentation tab The WebLogic_eWay_Sample zip file contains the various sample Project ZIP files Extract the samples to a local file Save all unsaved work before importing a Project From the Enterprise Designer s Project Explorer pane right click the Repository and select Import from the shortcut menu The Import Manager appears Browse to the directory that contains the sample Project zip file Select the sample file and click Import After the sample Project is successfully imported click Close Before an imported sample Project can be run you must do the following Configure the eWays for your specific system see Setting the Properties on page 78 Configure the Integration Server see Configuring the Integration Server on page 78 Create an Environment see Creating an Environment on page 79 Create a Deployment Profile see Creating the Deployment Profile on page 79 Create and start a domain see Creating and Starting the Domain on page 80 Build and deploy the Project see
37. to asynchronously pass two phase commit protocol XA messages into a JMS queue before ultimately passing into a WebLogic container The Connectivity Map for tis sample project appears as follows Figure 56 JMSXAQueueSend Connectivity Map Inbound File eWay Sy i i S AD Fileln cruMSXA amp QueueSend Queue Samples JMS client properties In this sample the Outbound File eWay feeds messages to the Queue Queue Sample3 The eWay looks for input files with the extension xaqfin within the input directory C InputData The Collaboration crJMSXAQueueSend1 subscribes to this external data and publishes to the JMS Queue The JMS client properties is configured to use the internal Sun Microsystems JMS IQ Manager as the JMS server and is responsible for copying data from the source event to the output event Figure 57 JMSXAQueueSend Sample Components WebLogic Container crJMSXAQueueSend1 Collaboration Definition Java PointBase Queue Sample3 JMS Connection Point a Inbound File eWay Database i Receiver MDB l STCXAReceiverMDBean Connection Connection JMS IQ Manager As seen in Figure 57 the Outbound File eWay reads a file containing the input message event The Collaboration subscribes to this external file and publishes the input message to the JMS Queue The JMS client properties is configured to use a JMS Queue and therefore acts as a QueueSender Both t
38. two MDBs that are deployed in WebLogic MDB Subscribing to Sun Microsystems Topic MDB Subscribing to Sun Microsystems Queue In the following sections there are references to two XML files These files are used as the MDB s deployment descriptor These are ejb jar xml and weblogic ejb jar xml The ejb jar xml deployment descriptor is specified by the EJB 2 0 specification The weblogic ejb jar xml is proprietary to WebLogic Both are defined in order to deploy the MDB What s in This Chapter MDB Subscribing to a Sun Microsystems Topic on page 91 MDB Subscribing to Sun Microsystems Queue on page 93 Accessing Session Beans on page 95 Sun Microsystems Sample XA Message Driven Beans on page 102 91 MDB Subscribing to a Sun Microsystems Topic This MDB subscribes to a Sun Microsystems JMS Topic It receives from ONLY ONE Sun Microsystems Topic The MDB simply receives and displays the JMS messages ejb jar xml The following is the deployment descriptor for this MDB ejb jar xml lt ejb jar gt lt enterprise beans gt lt message driven gt lt ejb name gt STCSubscriberMDBean lt ejb name gt WebLogic eWay Adapter User s Guide 91 Sun Microsystems Inc Chapter 9 Section 9 1 Sun Microsystems Sample Message Driven Beans MDB Subscribing to a Sun Microsystems Topic lt ejb class gt com stc eways ejb messagebean STCSubscriberMDBean lt ejb class gt lt transaction type gt Bean lt transaction type gt lt ac
39. 1 For details on the format of the input message for the feeder eWay see Sun Microsystems Sample Message Driven Beans on page 91 Note Before running this client be sure that the system classpath includes ejb jar weblogic jar with ejb jar proceeding weblogic jar in order and weblogic ejb example jar The result of the test is that eGate sees the message that the remote client sent to the STCQueueRequestorSLSessionBean and the remote client sees the reply message constructed by the Java Collaboration from eGate Important XA transactions for the WebLogic eWay are managed by the WebLogic TransactionManager NOT the eGate TransactionManager or in the eWay Connection parameters For XA transactions make sure that the XAConnectionFactory ies are configured for the startup class Note WebLogic will create a warning message that XA is not supported if a combination of XA and non XA EJBs are loaded in the weblogic ejb example jar file and the associated deployment descriptor files WebLogic eWay Adapter User s Guide 90 Sun Microsystems Inc Chapter 9 Sun Microsystems Sample Message Driven Beans The previous sections Java Naming and Directory Interface NDI on page 23 and Java Messaging Service JMS on page 26 describe the JNDI and JMS subsystems This chapter relates the concepts that were discussed in the previous sections with those regarding the Sun Microsystems Message Driven Beans MDBs There are
40. 5 Section 5 3 WebLogic eWay Component Communication Asynchronous Communication in eGate Figure 16 Session Bean ejb jar xml deployment descriptor Qera O x 12 D serch Tere Que O oa JOS Address a C hawaii eWays51 OD ev ewaysejbadapter startup weblagic examples deployment ME TA INF ejb jar xml Go Links 9 Snaglt Sy Google Cl Seach D g 8 Check 4 Autolink AutoFil fea Options lt DOCTYPE ejb jar View Source for full doctype gt lt ejb jar gt lt enterprise beans gt lt message driven gt lt message driven gt lt message driven gt lt session gt lt ejb name gt STCPublisherSLSessionBean lt ejb name gt lt home gt com stc eways ejb sessionbean publisher STCPublisherSLSessionHome lt home gt lt remote gt com stc eways ejb sessionbean publisher STCPublisherSLSession lt remote gt lt ejb class gt com stc eways ejb sessionbean publisher STCPublisherSLSessionBean lt ejb class gt lt session type gt Stateless lt session type gt lt transaction type gt Bean lt transaction type gt lt resource ref gt lt res ref name gt jms TopicConnectionFactory lt res ref name gt lt res type gt javax jms TopicConnectionFactory lt res type gt lt res auth gt Application lt res auth gt lt resource ref gt lt resource env ref gt lt resource env ref name gt jms Topic lt resource env ref name gt lt resource env ref type gt javax jms Topic lt resource env ref type gt lt resour
41. 5 fa80c71858e3d95b XA fa80c71858e3d95b gt lt 000000 gt lt ResourceDescriptor demoXAPool host gt lt examp rce a host gt lt examp gt host gt lt examp start DONE a gt host gt lt examp host gt lt examp host gt lt examp host gt lt examp lt 000000 gt lt ResourceDescriptor demoXAPool startResourceUse Number of active requests 1 host gt lt examp start DONE lt Apr 4 20xx 5 49 53 PM PST gt lt Debug gt lt JTA gt lt localhost gt lt examp lt 5 f a80c71858e3d95b gt lt 000000 gt lt ResourceDescriptor demoXAPool1 requests 0 gt host gt lt examp ystems jms c a host gt lt examp Number of active requests 1 last alive time 0 ms ago gt lt Apr 4 20xx 5 49 53 PM PST gt lt Debug gt lt JTA gt lt localhost gt lt examp lt 5 f a80cC71858e3d95b gt lt 000000 gt lt 5 fa80c71858e3d95b XA end DONE rm com SunMicrosystems jms client STCXAResource a gt host gt lt examp host gt lt examp ar demoXAPoo host gt lt examp lt 000000 gt lt ResourceDescriptor demoXAPool startResourceUse Number of active requests 1 host gt lt examp end DONE host gt lt examp host gt lt examp a gt host gt lt examp host gt lt examp host gt lt examp host gt lt examp 1 host gt lt examp lt 000000 gt lt ResourceDescriptor demoXAPool startResourceUse Number of active requests 1 host gt lt examp client STCXAResourc
42. 9 4 Sun Microsystems Sample Message Driven Beans Sun Microsystems Sample XA Message Driven Beans Figure 58 WebLogic 8 1 Administrative Console demoXAPool F WebLogic Server Console Microsoft Internet Explorer File Edit view Favorites Tools Help Q sxx z Q x a A JO search Sie Favorites media 2 s bs LJ x Address alse amp frameId wl_console_frame_1076351882844 amp sidebarFrameId wl_console_frame _1076351882845 amp MBean examples 3AName 3Dexamples 2CType 3DDomain v Bo Links Console s examples sewers Configuration Monitoring Control clusters 2 Machines General Connections Dep t aa Boies 2 This page allows you to define the general configuration of this JDBC connection pool Gijcom Name demoXAPool a Qypeac amp Connection Pools The name of this JDBC connection pool demoPoo r demoxaPool URL jdbc pointbase server localhaosy Ga cralevod The URL of the database to connect to The format of the URL varies by JDBC driver ed ee tori Driver Classname com pointbase xa xaDataSource 7 ata Source Factories Tums The full package name of JDBC driver class used to create the physical database connections in the Gi messaging Bridge connection pool Note that this driver class must be in the classpath of any server to which it is deployed Gxt a a JTA user examples snmp Properties ee pointhase server localhost dem wre E
43. B Note Before deploying the EJB make sure that the JMS IQ Manager is running It is only necessary to start the JMS IQ Manager A Under Step 1 click on upload it through your browser Click Browse and select lt BEA Home gt weblogic700 server lib weblogic ejb example jar With the file selected click Upload B Under Step 2 find weblogic ejb example jar and click select left of the name Under Step 3 select the server instance under Available Servers Click the right arrow to move the new server instance to Target Servers D Under Step 4 enter weblogic ejb example as the name for this application EJB E Under Step 5 click the Configure and Deploy button This installs the EJB on the WebLogic Administration Server WebLogic eWay Adapter User s Guide 53 Sun Microsystems Inc Chapter 6 Section 6 2 Configuring WebLogic Server for Asynchronous Communication Configuration for WebLogic 8 1 62 Configuration for WebLogic 8 1 WebLogic Server 8 1 installation creates a home or root directory named bea by default this name may be changed during installation Sample servers are located in the lt BEA HOME gt weblogic81 sample server lib directory Servers created by the user are located under lt BEA HOME gt user_projects lt domain name gt see Figure 23 Figure 23 WebLogic Server File Structure 2 GQ bea E O ext_components O jdk141_03 jrockite1sp1_141_03 5 logs user _projects O utils am
44. Bean acts as the sender to the Queue Sample2 Queue and waits for the reply from eGate Essentially this demonstrates a request reply usage of the QueueRequestor JMS object by the STCQueueRequestorSLSessionBean Figure 47 JMSQueueRequestor Sample Components WebLogic Container STCQueueRequestorSLSessionClient Queue Sample2 request JMS Remote request QueueRequestor gt Connection f repl Client SLSessionBean aA Point Connection Connection JMS IQ Manager As seen in Figure 47 the stand alone remote client com stc eways ejb sessionbean queuerequestor STCQueueRequestorSLSessionClient is used to invoke the request method of the STCQueueRequestorSLSessionBean and wait for a reply from the Session Bean As parameters the client takes the provider URL of the WebLogic JNDI where the Session Bean is bound the JNDI name of the Session Bean SunMicrosystems STCQueueRequestorSLSessionBean a text message or a file name and the option specifying whether the third parameter is a file or a text message msg For example the following command sends the message This is a text message java com stc eways ejb sessionbean queuerequestor STCQueueRequestorSLSessionClient t3 localhost 7001 SunMicrosystems STCQueueRequestorSLSessionBean This is a text message msg whereas the following command sends the message contained in the file c temp testfile txt WebLogic eWay Adapter User s Guide 83 Sun Microsystems Inc Chapter
45. Beyond eGate Integrator User s Guide or the Sun SeeBeyond eGate Integrator System Administration Guide WebLogic eWay Adapter User s Guide 8 Sun Microsystems Inc Chapter 1 Section 1 4 Introducing the WebLogic eWay About This Document 14 About This Document This document includes the following chapters Chapter 1 Introducing the WebLogic eWay Provides an overview description of the product as well as high level information about this document Chapter 2 Installing the WebLogic eWay Describes the system requirements and provides instructions for installing the WebLogic eWay Chapter 3 Setting Properties of the WebLogic eWay Provides instructions for configuring the eWay to communicate with your legacy systems Chapter 4 WebLogic Server Components Provides an overview various Sun Microsystem Java 2 Enterprise Edition J2EE Applications and WebLogic Server technologies employed in the WebLogic Server Chapter 5 WebLogic eWay Component Communication Provides an overview of how components of the WebLogic eWay Adapter communicate with the WebLogic Application Server Chapter 6 Configuring WebLogic Server for Asynchronous Communication Provides directions for configuring WebLogic Server for asynchronous interaction with eGate Chapter 7 Using the WebLogic OTD Wizard Provides instructions for creating Object Type Definitions OTDs to be used with the WebLogic eWay Chapt
46. DI name STCQueuel Queue Sample1l STCQueuel Another sample JMS Queue with name Queue Sample2 and JNDI name STCQueue2 Queue Sample2 STCQueue2 Another sample JMS Queue with name Queue Sample3 and JNDI name STCQueue3 Queue Sample3 STCQueue3 For each Queue to configure the property name must start with Queue The startup class uses the property name as the Queue name when creating the Sun Microsystems Queue This Queue name is the name to be used in the eGate environment the name of the event created with Enterprise Manager The property value for the Queue is used as the JNDI name for the Queue The JNDI name is used by the EJB via the EJB s deployment descriptor See the section Message Flow from eGate to WebLogic Using JMS Objects on page 35 and Message Flow from WebLogic to eGate Using JMS Objects on page 39 for more information on the EJB deployment descriptors WebLogic eWay Adapter User s Guide 48 Sun Microsystems Inc Chapter 6 Configuring WebLogic Server for Asynchronous Communication The following chapter provides directions for configuring WebLogic Server for asynchronous interaction with eGate Setup directions are provided for both WebLogic versions 7 0 and 8 1 What s in This Chapter Configuration for WebLogic 7 0 on page 49 Configuration for WebLogic 8 1 on page 54 61 Configuration for WebLogic 7 0 WebLogic Server 7 0 installation creates a home or root d
47. I name server including any JNDI prefixes for the EJB String or a qualified interoperability JNDI name If the EJB and your Project EAR file are deployed on the Sun Java System Application Server or the Sun SeeBeyond Integration Server you can use the localEJB prefix as the qualified JNDI name For example localEJB ejb MyStorageBin without the corbaname IIOP syntax If a qualified JNDI name is specified in this property this supercedes any values specified in the Environment properties ServerName and Port see Specifying JNDI Names on page 20 33 2 WebLogic eWay Environment Properties The eWay properties accessed from the Environment Explorer tree are organized into the following sections parameter settings Environment on page 21 parameter settings Environment The parameter settings section of the Environment properties contains the top level parameters displayed in Table 4 Table 4 Environment parameter settings Name Description Required Value ServerName Specifies the name of the other application A name of an application server server If a qualified JNDI name is specified inthe The default is localhost Connectivity Map property EjbJndiName that value supercedes any values specified in the Environment properties ServerName and Port see Specifying JNDI Names on page 20 WebLogic eWay Adapter User s Guide 21 Sun Microsystems Inc
48. Interfaces interface examples ejb20 basic beanManaged AccountHome Select Method Arguments Review Selections Remote Interface interface examples ejb20 basic beanManaged Account CO Include method argument names source files required Back Nets Finish Cancel Help 7 To add the method argument names to the OTD select the Include method argument names option Do not select this option if you do not have the EJB source code Click Next The Wizard advances to the Select Methods Arguments page If the selected EJB file s interfaces are valid and the Select Method argument names option was not selected the wizard advances to the Review Selections page The Select Method Arguments Names page appears Select Method Arguments 8 Enter the Java source file or click Browse to locate the java source files for the EJB archive supplied Only a JAVA file or an archive file containing JAVA files will be accepted If a directory is supplied then only JAVA files are searched See Figure 30 WebLogic eWay Adapter User s Guide 63 Sun Microsystems Inc Chapter 7 Section 7 1 Using the WebLogic OTD Wizard Creating a WebLogic OTD Figure 30 Select Method Argument Names page Select Method Argument Names Select Wizard Type Select the Java file directory or archive file for your EJB source Specify OTD Name Select Code Base EJB Java Source Files Select Interfaces Browse Select Method Arguments Review Selectio
49. Logic eWay on page 17 8 25 Configuring the Integration Server You must set your SeeBeyond Integration Server Password property before deploying your Project 1 From the Environment Explorer right click IntegrationSvr1 under your Logical Host and select Properties from the shortcut menu The Integration Server Properties Editor appears 2 Click the Password property field under Sun SeeBeyond Integration Server Configuration An ellipsis appears in the property field 3 Click the ellipsis The Password Settings dialog box appears WebLogic eWay Adapter User s Guide 72 Sun Microsystems Inc Chapter 8 Section 8 2 Implementing the WebLogic eWay Sample Projects Using Sample Projects in elnsight 4 Enter STC as the Specific Value and as the Confirm Password and click OK 5 Click OK to accept the new property and close the Properties Editor For more information on deploying a Project see the Sun SeeBeyond Java Composite Application Platform Suite Deployment Guide 8 2 6 Creating an Environment Environments include the external systems Logical Hosts integration servers and message servers used by a Project and contain the configuration information for these components Environments are created using the Environment Editor 1 From the Enterprise Explorer click the Environment Explorer tab 2 Right click the Repository and select New Environment A new Environment is added to the Environment Explorer tree Rename the new
50. N Figure 5 shows multiple subscribers receiving the same messages when the publisher publishes the message to a Topic This is the pubsub publish subscribe model Figure 6 Queue The Point to Point Model Receiver Msg A gt N A Receiver The Point to Point model Figure 6 on the other hand allows for only one receiver to get the message when a sender sends a message to a Queue 43 Enterprise JavaBeans EJBs Enterprise JavaBeans are reusable software programs that you can develop and assemble easily to create sophisticated applications Developers use EJBs to design and develop customized reusable business logic EJBs are the units of work that an application server is responsible for and exposes to the external world The WebLogic Application Server provides the architecture for writing business logic components allowing Web servers to easily access data There are three types of Enterprise JavaBeans Session Beans Entity Beans Message Driven Beans WebLogic eWay Adapter User s Guide 27 Sun Microsystems Inc Chapter 4 Section 4 4 WebLogic Server Components XA Transactions Session Beans Session Beans are business process objects that perform actions An action may be opening an account transferring funds or performing a calculation Session Beans consist of the remote home and bean classes A client gets a reference to the Session Bea
51. Number 819 7391 10 Version 20061012141756 WebLogic eWay Adapter User s Guide 2 Sun Microsystems Inc Contents Contents Chapter 1 Introducing the WebLogic eWay About WebLogic Application Server WebLogic Server About the WebLogic eWay What s New in This Release About This Document Scope Intended Audience Text Conventions Related Documents Sun Microsystems Inc Web Site Documentation Feedback Chapter 2 Installing the WebLogic eWay WebLogic eWay System Requirements Installing the WebLogic eWay Installing the WebLogic eWay on an eGate supported system Adding the eWay to an Existing Java CAPS Installation After Installation Extracting the Sample Projects ICAN 5 0 Project Migration Procedures Installing Enterprise Manager eWay Plug Ins Viewing Alert Codes Chapter 3 Setting Properties of the WebLogic eWay Configuring the WebLogic eWay Properties Selecting WebLogic as the External Application To create the WebLogic External Application WebLogic eWay Adapter User s Guide 3 oooO o o UN N 10 10 10 11 11 11 12 12 13 13 13 15 16 17 17 17 17 Sun Microsystems Inc Contents Accessing the eWay Properties Modifying the WebLogic eWay Properties Modifying the eWay Connectivity Map Properties Modifying the eWay Environment Properties Using the Properties Editor Specifying JNDI Names WebLogic eWay Properties WebLogic eWay Connectivity Map Properties par
52. PublisherSLSessionClie nt t3 localhost 7001 SunMicrosystems STCXAPublisherSLSessionBean John 9888 99 Note Before running this client make sure that the system classpath includes ejb jar weblogic jar with ejb jar proceeding weblogic jar in order and weblogic ejb example jar After successfully inserting the record into the database and publishing to the topic the remote client invokes the getBalance method of the Session Bean and confirms that the record is successfully inserted Note that getBalance does NOT confirm occurrence of a two phase commit To see that both the database and Sun Microsystems JMS XA Resources are being used look at the weblogic log and Sun Microsystems JMS IQ Manager log In addition upon successfully publishing to the topic the inbound File eWay writes a confirmation message to the file To simulate a rollback pass an account ID of rollback in the command line for the remote client For more details on the demoXAPool resource see examples dataSource demoXAPool on page 111 WebLogic eWay Adapter User s Guide 86 Sun Microsystems Inc Chapter 8 Section 8 4 Implementing the WebLogic eWay Sample Projects Using the JMS Sample Projects in eGate Important XA transactions for the WebLogic eWay are managed by the WebLogic TransactionManager NOT the eGate TransactionManager or in the eWay Connection parameters For XA transactions make sure that the XAConnectionFactory ies are configured for
53. S configurations in this section The following JMS information must be defined for each Server Host Port The following JMS information is optional for each Server PingTimeout The following are used to configure JMS Connection Factories TopicConnectionFactory QueueConnectionFactory XATopicConnectionFactory XAQueueConnectionFactory SHE SHE HE HE HE HE SE HE HE EEE FE HE SunMicrosystemsJMS Server configuration Notice that SunMicrosystemsJMS is in the JMS Server Names list WebLogic eWay Adapter User s Guide 46 Sun Microsystems Inc Chapter 5 Section 5 4 WebLogic eWay Component Communication Sun Microsystems WebLogic Startup Class SunMicrosystemsJMS Host localhost SunMicrosystemsUMS Port 18007 SunMicrosystemsJMS TopicConnectionFactory TopicConnectionFactory SunMicrosystemsJMS QueueConnectionFactory QueueConnectionFactory SunMicrosystemsJMS XATopicConnectionFactory XATopicConnectionFactory SunMicrosystemsJMS XAQueueConnectionFactory xXAQueueConnectionFactory SunMicrosystemsJUMS PingTimeout 10 MyJMS Server configuration Notice that MyJMS is in the JMS Server Names list MyJMS Host localhost MyJMS Port 9876 MyJMS TopicConnectionFactory MyTopicConnectionFactory MyJMS QueueConnectionFactory MyQueueConnectionFactory MyJMS PingTimeout 10 The optional property PingTimeOut is added to the sample property file If the socket is inactive for longer than the set PingTimeOut
54. SUN SEEBEYOND eWAY ADAPTER FOR WEBLOGIC USER S GUIDE Release 5 1 2 sS Re SUN microsystems Copyright 2006 Sun Microsystems Inc 4150 Network Circle Santa Clara California 95054 U S A All rights reserved Sun Microsystems Inc has intellectual property rights relating to technology embodied in the product that is described in this document In particular and without limitation these intellectual property rights may include one or more of the U S patents listed at http www sun com patents and one or more additional patents or pending patent applications in the U S and in other countries U S Government Rights Commercial software Government users are subject to the Sun Microsystems Inc standard license agreement and applicable provisions of the FAR and its supplements Use is subject to license terms This distribution may include materials developed by third parties Sun Sun Microsystems the Sun logo Java Sun Java Composite Application Platform Suite SeeBeyond eGate elnsight eVision eTL eXchange eView elndex eBAM eWay and JMS are trademarks or registered trademarks of Sun Microsystems Inc in the U S and other countries All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International Inc in the U S and other countries Products bearing SPARC trademarks are based upon architecture developed by Sun Microsystems Inc UNIX is a registered trademark in the U S
55. Sub context The first section allows the user to specify the JNDI sub context for Sun Microsystems WebLogic eWay Adapter User s Guide 44 Sun Microsystems Inc Chapter 5 Section 5 4 WebLogic eWay Component Communication Sun Microsystems WebLogic Startup Class JNDI subcontext for Sun Microsystems objects This section configures the JNDI subcontext to which all the Sun Microsystems JMS objects will bind WARNING Only the property value can be changed here Subcontext SunMicrosystems SunMicrosystems The user should not have to change this Sun Microsystems JMS TopicConnectionFactory Sub context The next section allows the user to specify the JNDI sub context where all instances of Sun Microsystems JMS TopicConnectionFactory are bound This sub context is under the Sun Microsystems sub context JNDI subcontext for Sun Microsystems JMS Topic connection factories This section configures the JNDI subcontext to which all the Sun Microsystems JMS TopicConnectionFactory objects will bind WARNING Only the property value can be changed here Subcontext TopicConnectionFactory TopicConnectionFactories The user should not have to change this SunMicrosystems JMS QueueConnectionFactory Sub context The next section allows the user to specify the JNDI sub context where all instances of Sun Microsystems JMS QueueConnectionFactory are bound This sub context is under the Sun Mic
56. Sun Microsystems JMS Queues This section configures the JNDI subcontext to which all the Sun Microsystems JMS Queues objects will bind WARNING Only the property value can be changed here Subcontext Queue Queues The user should not have to change this Sun Microsystems JMS Server Names List The next section allows the user to specify the logical names of each JMS server instances to configure for registration to WebLogic JNDI JMS Server Names Define all the logical JMS Server Names in this section Each Server Name must be separated by a amp character WARNING Only the property value can be changed here Example SunMicrosystemsJUMS amp MyJMS amp JMSOnHostA JIMSServerNames SunMicrosystemsJMS amp MyJMS JMSServerNames SunMicrosystemsJMS The server names are separated by the amp character The server names used here are referenced in another section for configuring the JMS host port and the connection factories Sun Microsystems JMS Servers Configuration For each server name listed in the JMSServerNames property value the user is required to specify the hostname and port of the JMS server In addition the user can configure one or more of the types of JMS connection factories TopicConnectionFactory QueueConnectionFactory and so forth JMS Servers Configuration For each of the Servers define in the JMS Server Names section define the JM
57. TopicSubscribe Sample The JMSQueueSend Sample The JMSTopicPublish Sample The JMSXAQueueSend Sample Chapter 9 Sun Microsystems Sample Message Driven Beans MDB Subscribing to a Sun Microsystems Topic ejb jar xml WebLogic ejb jar xml MDB Subscribing to Sun Microsystems Queue ejb jar xml weblogic ejb jar xml Accessing Session Beans Sun Microsystems Sample Session Beans SLS Bean Publishing to Sun Microsystems Topic ejb jar xml weblogic ejb jar xml ejb jar xml weblogic ejb jar xml Lazy Loading Accessing Entity Beans Sun Microsystems Sample XA Message Driven Beans Sun Microsystems Sample XA Session Beans SLS Bean Publishing to Sun Microsystems JMS Topic Transactionally Verifying XA At Work examples dataSource demoXAPool Index WebLogic eWay Adapter User s Guide 6 78 79 79 80 81 81 82 82 83 84 85 87 88 89 Sun Microsystems Inc Chapter 1 Introducing the WebLogic eWay Welcome to the Sun SeeBeyond eWay Adapter for WebLogic User s Guide This document describes the integration between BEA WebLogic application Server and the Sun Java Composite Application Platform Suite Java CAPS using the WebLogic eWay Adapter referred to as the WebLogic eWay throughout this document What s in This Chapter About WebLogic Application Server on page 7 About the WebLogic eWay on page 8 What s New in This Release on page 8 About This Document on page 9 Related Documents on page 10 Sun Microsy
58. WLEC deprecated N Ejot The list of properties passed to the JDBC driver that are used to create physical database connections For G2 virtual Hosts example server dbserver1 List each property value pair on a separate line p property p p mail GiFileT3 Password ee G security E Domain Log Filters Confirm Password Secccccccccccccccs Tasks The database account password used in the physical database connection Open String Password z Done Local intranet WebLogic eWay Adapter User s Guide 12 Sun Microsystems Inc Section 9 4 Sun Microsystems Sample XA Message Driven Beans Chapter 9 Sun Microsystems Sample Message Driven Beans Figure 59 WebLogic 8 1 Administrative Console demoXAPool WebLogic Server Console Microsoft Internet Explorer File Edit view Favorites Tools Help Q x z Q x a CA HO Search She Favorites Media 2B BS hi m x Address E alse amp frameId wl_console_frame_10763518828448sidebarFrameld wl_console_frame_1076351882845 amp MBean examples 34Name 3Dexamples 2CType 3DDomain v Go E amp Data Sources examples dataSource demoPool examples dataSource demoXAPool examples dataSource oraclexAPool Data Source Factories G security Domain Log Filters Tasks Console examples gt JDBC Data Sources gt examples dataSource E examples demoXAPool a G servers You are logged in as weblogic Logout Clusters s J E machines Deploym
59. ameter settings Connectivity Map WebLogic eWay Environment Properties parameter settings Environment Chapter 4 WebLogic Server Components Java Naming and Directory Interface NDI The WebLogic Naming Service Sample Code Viewing the WebLogic JNDI Tree Java Messaging Service JMS Enterprise JavaBeans EJBs Session Beans Entity Beans Message Driven Beans XA Transactions Chapter 5 WebLogic eWay Component Communication Synchronous and Asynchronous Communication Synchronous Communication Asynchronous Communication Synchronous Communication in eGate The WebLogic OTD Asynchronous Communication in eGate Additional Messaging Service Requirements Sun Microsystems JMS Message Flow from eGate to WebLogic Using JMS Objects Updating the WebLogic JMS Message Flow from WebLogic to eGate Using JMS Objects Sun Microsystems WebLogic Startup Class Startup Class Implementation Startup Properties File weblogic startup properties File WebLogic eWay Adapter User s Guide 4 17 18 18 18 18 20 20 20 21 21 23 23 23 24 25 26 27 28 28 28 28 30 30 31 31 33 33 34 34 35 35 37 39 43 44 44 44 Sun Microsystems Inc Contents Chapter 6 Configuring WebLogic Server for Asynchronous Communication 49 Configuration for WebLogic 7 0 Configuration for WebLogic 8 1 Chapter 7 Using the WebLogic OTD Wizard Creating a WebLogic OTD Select Wizard Type Specify OTD Nam
60. ance is running and lt port gt is the port at which the Webserver instance is listening for connections For example t3 localhost 7001 The initial context factory class for the WebLogic JNDI is weblogic jndi WLInitialContextFactory This class should be supplied to the Context INITIAL_CONTEXT_FACTORY environment property when constructing the initial context The overloaded InitialContext Map constructor must be used in this case Sample Code The following code is an example of creating an initial context to WebLogic JNDI from a stand alone client HashMap env new HashMap env put Context PROVIDER_URL t3 localhost 7001 env put Context INITIAL _CONTEXT_FACTORY weblogic jndi WLInitialContextFactory Context initContext new InitialContext env Once an initial context is created sub contexts can be created objects can be bound and objects can be retrieved using the initial context For example the following segment of code retrieves a Topic object Topic topic Topic initContext lookup sbyn inTopicToSunMicrosystemsTopic Here s an example of how to bind a Sun Microsystems Queue object Queue queue null try queue new STCQueue inQueueToSunMicrosystemsQueue initContext bind sbyn ToSunMicrosystemsQueue queue catch NameAlreadyBoundException ex try if queue null initContext rebind sbyn ToSunMicrosystemsQueue queue
61. ation of message transmission failure before continuing with the process This can be comparable to a phone call in which the caller makes the call and waits for a response before attempting to make another call An example of synchronous communication is displayed in Figure 8 Figure 8 Synchronous Communication Send Process 1 en Process 2 Reply Synchronous Communication in eGate Includes eGate to WebLogic Transactions an outbound transaction where eGate makes a request to WebLogic and waits for a response For more information see Synchronous Communication in eGate on page 33 Associated Sample Projects Two sample projects prjWebLogic_Sample_BPEL and prjWebLogic_Sample_JCD are included with the WebLogic eWay to demonstrate synchronous message interactions prjWebLogic_Sample_BPEL demonstrates how to deploy an eGate component as an Activity in an eInsight Business Process For more information see Implementing the WebLogic eWay Sample Projects on page 66 prjWebLogic_Sample_JCD demonstrates how to deploy and eGate component using java collaborations For more information see Using the Sample Projects in eGate on page 76 5 1 2 Asynchronous Communication Asynchronous communication is considered a buffered process since the sender never waits after sending data and the receiver only waits when the buffer is empty The buffer or queue is a service that temporarily holds messages un
62. ave already created a domain select your domain in the Domain Manager and click the Start an Existing Domain button Once your domain is started a green check mark indicates that the domain is running 4 If there are no existing domains a dialog box indicates that you can create a domain now Click Yes The Create Domain dialog box appears 5 Make any necessary changes to the Create Domain dialog box and click Create The new domain is added to the Domain Manager Select the domain and click the Start an Existing Domain button Once your domain is started a green check mark indicates that the domain is running 6 For more information about creating and managing domains see the Sun SeeBeyond eGate Integrator System Administration Guide 82 9 Building and Deploying the Project The Build process compiles and validates the Project s Java files and creates the Project EAR file Note If your EJB was compiled with JDK 1 5 see Build the Deployment EAR File Using the Commandline Codegen Tool on page 75 Build the Project 1 From the Deployment Editor toolbar click the Build icon 2 If there are any validation errors a Validation Errors pane will appear at the bottom of the Deployment Editor and displays information regarding the errors Make any necessary corrections and click Build again 3 After the Build has succeeded you are ready to deploy your Project Deploy the Project 1 From the Deployment Editor toolbar click the
63. ber literal of 100 to the account balance listed in WebLogic Server see Figure 36 WebLogic eWay Adapter User s Guide 71 Sun Microsystems Inc Chapter 8 Section 8 2 Implementing the WebLogic eWay Sample Projects Using Sample Projects in elnsight Figure 36 Making the Deposit Business Rule Designer 0 9A Beooleany Comparison Math iobjecty AStringy i Array Operators Business Process Attributes lt Business Process Attributes bad AccountOTD findByPrima AccountOTD depositWLSenice Input bal output input L RetumnValue Remotelnterface Argo 1 number literal 100 0 ao L 4 Combined data is sent to the FileClient write container as seen in Figure 37 Figure 37 Returning the Response Business Rule Designer g0 492 Bpeooleany Comparisons Elmath Objecte A String i Aray 8 Operators Business Process Attributes Business Process Attributes rors A A string literal ma AccountOTD depositWvLS FileClientuwrite Input E output Your New Balance is ay r tet RetumValue string string retum string C gt lt Ll 8 24 Setting the Properties Each sample project contains properties accessible either through the File or WebLogic eWay located on the Project Explorer Connectivity Map or from the WebLogic eWay External System located in the Environment To configure the WebLogic eWay properties for your project see Setting Properties of the Web
64. blogic ejb example jar The result of the test is that eGate sees the message that the remote client sent to the STCPublisherSLSessionBean The message is written to an output file Note For more information on eWay Connection Configuration Parameters for JMS see WebLogic eWay Properties on page 20 843 The JMSXATopicSubscribe Sample JMSXATopicSubscribe is an inbound example that demonstrates how a remote client is used to asynchronously pass two phase commit protocol XA messages into a JMS topic The Connectivity Map for this sample appears as follows Figure 50 JMSXATopicSubscribe Sample rad a a AH ac gt Topic Sample3 cruMSXATopicSubscribet FileOut JMS client properties Outbound File eWay In this sample the Inbound File eWay consumes messages coming from the Topic Topic Sample3 The Collaboration crJMSXATopicSubscribe subscribes to the JMS client properties on the Topic Sample3 Topic The JMS client properties is configured to use the internal Sun Microsystems JMS IQ Manager as the JMS server and is responsible for displaying the message received to standard output and then publishing the message to the external file Inbound File In this case the STCXAPublisherSLSessionBean acts as publisher to the Topic Sample3 topic This demonstrates transactionally publishing asynchronous messages from an EJB running in WebLogic to a Sun Microsystems JMS Topic WebLogic eWay Adapter User s Guide 85 Sun Microsystem
65. c does not allow startup classes to be deployed prior to EJBs the sample EJBs do lazy loading of the JMS objects EJBs should only lookup the JMS objects once they are created or during initialization This can be done only when the EJB is ready to publish or send a message s to a destination In the usual manner use the XAConnectionFactory and Destination to create the XAConnection and XASession The Bean can get a hold of the XAConnectionFactory and Destination via the Bean s ENC Once the XASession has been created get a reference to the XAResource by calling XASession getXAResource then enlist the XAResource to the current transaction Before you enlist call the WebLogic static method TxHelper getTransaction to get a reference to the current transaction allocated by the container TxHelper getTransaction returns a javax transaction Transaction You can then call javax transaction Transaction enlistResource passing in the XAResource retrieved for the XASession that you had created WebLogic eWay Adapter User s Guide 105 Sun Microsystems Inc Chapter 9 Section 9 4 Sun Microsystems Sample Message Driven Beans Sun Microsystems Sample XA Message Driven Beans SLS Bean Publishing to Sun Microsystems JMS Topic Transactionally This Stateless Session Bean publishes to a Sun Microsystems JMS Topic transactionally The sample Session Bean uses CMT Container Managed Transaction As with the transactional MDB the Session Bean also u
66. c startup class WeblogicStartup See Sun Microsystems WebLogic Startup Class on page 43 for details With access to these JMS objects via JNDI the Session Beans use the JMS API s to send the JMS message to eGate Figure 15 displays a diagram of the components involved for the WebLogic to eGate mode The arrows represent the message flow Figure 15 Message Flow from WebLogic to eGate eGate on some Host SeeBeyond E rn JMS Connection aa Tonle i Session SBYN Topic Connection Factory Connection Factory Every bean automatically has access to a special naming system called the Environment Naming Context ENC The ENC is managed by the container and accessed by beans using JNDI The JNDI ENC allows a bean to access resources like JDBC connections other enterprise beans and properties specific to that bean Each Session Bean uses the ENC to specify the TopicConnectionFactory or QueueConnectonFactory with the lt resource ref gt element in the ejb jar xml file Additionally the Session Bean uses the ENC to specify the destination via the lt resource env ref gt element in the ejb jar xml The weblogic ejb jar xml also has these corresponding elements defined with the lt resource description gt and lt resource env description gt elements Figure 16 displays the Session Bean ejb jar xml deployment descriptor WebLogic eWay Adapter User s Guide 39 Sun Microsystems Inc Chapter
67. ce env ref gt lt session gt lt session gt lt session gt lt enterprise beans gt lt assembly descriptor gt lt ejb jar gt g My Computer Figure 17 displays the Session Bean weblogic ejb jar xml deployment descriptor WebLogic eWay Adapter User s Guide 40 Sun Microsystems Inc Chapter 5 Section 5 3 WebLogic eWay Component Communication Asynchronous Communication in eGate Figure 17 Session Bean weblogic ejb jar xml deployment descriptor OD ev eways ejbadapte artup weblogic examples deployme A eblogic e oso erne plorer p O x File Edt View Favorites Tools Help y 3 A Geet O x 2 D A Seach oie Faes ei gt CTS J ES Address C hawaii eWays51 0D ev ewaysejbadapter startup weblogic examples deployment ME TA INF weblogic ejb jar xml Google z GG Search HD MH Check X Autolink E AutoFil fra Options lt xml version 1 0 7 gt lt DOCTYPE weblogic ejb jar View Source for full doctype gt lt weblogic ejb jar gt lt weblogic enterprise bean gt lt weblogic enterprise bean gt lt weblogic enterprise bean gt lt weblogic enterprise bean gt lt ejb name gt STCPublisherSLSessionBean lt ejb name gt lt stateless session descriptor gt lt pool gt lt max beans in free pool gt 15 lt max beans in free pool gt lt initial beans in free pool gt 5 lt initial beans in free poal gt lt pool gt lt stateless ses
68. cmd CLASSPATH C bea weblogic81 server lib webservices jar POINTBASE _ CLASSPATH CLIENT CLASSES 3SERVER_CLASSES S7COMMON_CLASSES CLI ENT_CLASSES utils_common jar C bea weblogic81 server lib com stc jms stcjms jar C bea weblogic81 server lib weblogic startup jar For setExampleEnv cmd CLASSPATH WL_HOME server lib webservices jar CLIENT_CLASSES 3S ERVER_CLASSES SPOINTBASE_ CLASSPATH POINTBASE _ TOOLS SCOMMON_CLA SSES SCLIENT_CLASSES utils_common jar SWEBLOGIC_CLASSPATH 3WL_H OME server lib com stc jms stcjms jar WL_HOME server lib weblog ic startup jar 4 The sample EJBs have been configured to reference the T3 naming service that is running on the localhost at port 7001 By default each WebLogic Server instance is installed to listen on port 7001 If your server instance is running on a different port then you should modify the deployment descriptors for the EJBs to match this port If you need to modify the deployment descriptors do the following A Extract weblogic ejb example jar to a temporary file and edit META INF weblogic ejb jar xml B For each Bean that is run find the Provider_URL tag of the deployment descriptor change the port number from the current port number from 7001 to 7003 and if necessary change localhost to the name of your specific computer C Save re jar zip and replace
69. com stc eways ejb messagebean ST CSubscriberMDBean lt destination type gt Tag Since this MDB is subscribing to a Sun Microsystems Topic the lt destination type gt is specified as javax jms Topic lt subscription durability gt Tag In order to create a durable subscriber MDB the lt subscription durability gt is specified as Durable WebLogic eWay Adapter User s Guide 92 Sun Microsystems Inc Chapter 9 Section 9 2 Sun Microsystems Sample Message Driven Beans MDB Subscribing to Sun Microsystems Queue WebLogic ejb jar xml In addition to the ejb jar xml file the MDB also needs to be included in the WebLogic ejb jar xml file lt weblogic ejb jar gt lt weblogic enterprise bean gt lt ejb name gt STCSubscriberMDBean lt ejb name gt lt message driven descriptor gt lt pool gt lt max beans in free pool gt 15 lt max beans in free pool gt lt initial beans in free pool gt 5 lt initial beans in free pool gt lt pool gt lt destination jndi name gt SunMicrosystems Topics STCTopici lt destination jndi name gt lt initial context factory gt weblogic jndi WLInitialContextFactory lt initial context factory gt lt provider url gt t3 localhost 7001 lt provider url gt lt connection factory jndi name gt SunMicrosystems TopicConnectionFactories TopicConnectionFactory lt connection factory jndi name gt lt message driven descriptor gt lt jndi name gt SunMicrosystems STCSub
70. cts with the Java CAPS elnsight Business Process Manager and the Web Services interface This section does not provide an explanation of how to create a project that uses a Business Process Extension Language BPEL For these instructions you should refer to the elnsight Enterprise Service Bus User s Guide WebLogic eWay Adapter User s Guide 68 Sun Microsystems Inc Chapter 8 Section 8 2 Implementing the WebLogic eWay Sample Projects Using Sample Projects in elnsight 82 1 Importing a Sample Project Sample eWay Projects are included as part of the installation package To import a sample eWay Project to the Enterprise Designer do the following 1 The sample files are uploaded with the eWay s documentation SAR file and downloaded from the Sun Java Composite Application Platform Suite Installer s Documentation tab The WebLogic_eWay_Sample zip file contains the various sample Project ZIP files Extract the samples to a local file 2 Save all unsaved work before importing a Project 3 From the Enterprise Designer s Project Explorer pane right click the Repository and select Import from the shortcut menu The Import Manager appears 4 Browse to the directory that contains the sample Project zip file Select the sample file and click Import After the sample Project is successfully imported click Close 5 Before an imported sample Project can be run you must do the following Configure the eWays for your specific system
71. d into a Project 3 1 2 Accessing the eWay Properties When you connect an External Application to a Collaboration the Enterprise Designer automatically assigns the appropriate eWay to the link Figure 1 Each eWay is WebLogic eWay Adapter User s Guide 17 Sun Microsystems Inc Chapter 3 Section 3 1 Setting Properties of the WebLogic eWay Configuring the WebLogic eWay Properties supplied with a template containing default configuration properties that are accessible from the Connectivity Map and Environment Explorer Tree Figure 1 Connectivity Map with Components intog D gt WebLogic eWay Z WebLogicevVay fol GP a a FilelN Service FileQUT 313 Modifying the WebLogic eWay Properties The eWay properties can be modified after the eWays have been created in the Connectivity Map and the Project s Environment has been created WebLogic eWay properties are modified from two locations from the Connectivity Map and from the Environment Explorer tree Modifying the eWay Connectivity Map Properties The Connectivity Map parameters most commonly apply to a specific component eWay and may vary from other eWays of the same type in the Project 1 From the Connectivity Map double click the eWay icon located in the link between the associated External Application and the Service 2 The eWay Properties Editor opens with the WebLogic eWay Connectivity Map properties Make any necessary modifications and click OK to save th
72. des marques de fabrique ou des marques d pos es de Sun Microsystems Inc aux Etats Unis et dans d autres pays Toutes les marques SPARC sont utilis es sous licence et sont des marques de fabrique ou des marques d pos es de SPARC International Inc aux Etats Unis et dans d autres pays Les produits portant les marques SPARC sont bas s sur une architecture d velopp e par Sun Microsystems Inc UNIX est une marque d pos e aux Etats Unis et dans d autres pays et licenci e exclusivement par X Open Company Ltd Ce produit est couvert a la l gislation am ricaine en mati re de contr le des exportations et peut tre soumis a la r glementation en vigueur dans d autres pays dans le domaine des exportations et importations Les utilisations ou utilisateurs finaux pour des armes nucl aires des missiles des armes biologiques et chimiques ou du nucl aire maritime directement ou indirectement sont strictement interdites Les exportations ou r exportations vers les pays sous embargo am ricain ou vers des entit s figurant sur les listes d exclusion d exportation am ricaines y compris mais de mani re non exhaustive la liste de personnes qui font objet d un ordre de ne pas participer d une facon directe ou indirecte aux exportations des produits ou des services qui sont r gis par la l gislation am ricaine en mati re de contr le des exportations et la liste de ressortissants sp cifiquement d sign s sont rigoureusement interdites Part
73. display under the Results section If your eWay alert codes are not displayed under Results do the following A From the Install New Alert Codes section browse to and select the eWay alert properties file for the application plug in that you added The alert properties files are located in the alertcodes folder of your Sun Java Composite Application Platform Suite installation directory B Click Deploy The available alert codes for your application are displayed under Results A listing of the eWay s available alert codes is displayed in Table 2 Table 2 WebLogic eWay Alert Codes Alert Code Description User Action EJB ERRORENCOUNTEREDO00001 Error encountered in EJB An error has occured such as eWay Check debug logs for EJB has not been deployed details Configuration properties are not correct a JNDI name is invalid OTD uses an incompatible version of the EJB Refer to the log for more information For information on Managing and Monitoring alert codes and logs as well as how to view the alert generated by the project component during runtime see the Sun SeeBeyond eGate Integrator System Administration Guide Note An alert code is a warning that an error has occurred It is not a diagnostic The user actions noted above are just some possible corrective measures you may take Refer to the log files for more information For information on Managing and Monitoring alert codes and logs
74. e last alive time 0 ms ago getOrCreate gets rd name start rm demoXAPool endResourceuUse client STCXAResource rm demoXAPool endResourceuUse client STCXAResource last alive time 0 ms ago esServer gt lt Thread 3 gt lt gt flags TMNOFLAGS gt lt Thread 3 gt lt gt lt gt startResourceUse esServer gt esServer gt lt Thread 3 gt lt gt esServer gt lt Thread 3 gt lt gt SunMicrosystems jms client STCXAResource esServer gt lt Thread 3 gt lt gt esServer gt lt Thread 3 gt lt gt xar demoXAPool esServer gt lt Thread 3 gt lt gt lt gt last alive esServer gt lt Thread 3 gt lt gt rm demoXAPool xar demoXAPool gt esServer gt lt Thread 3 gt lt gt Number of active esServer gt lt Thread 3 gt lt gt lt gt ient STCXAResource flags TMSUCCESS gt esServer gt lt Thread 3 gt lt gt lt gt startResourceUse esServer gt lt Thread 3 gt lt gt esServer gt lt Thread 3 gt lt gt SunMicrosystems jms client STCXAResource esServer gt lt Thread 3 gt lt gt lt gt lags TMSUCCESS gt esServer gt lt Thread 3 gt lt gt lt gt last alive esServer gt lt Thread 3 gt lt gt xar demoXAPool gt esServer gt lt Thread 3 gt lt gt Number of active esServer gt lt Thread 3 gt lt gt lt gt lt 000000 gt lt 5 fa80c71858e3d95b XA prepare rm com SunMicrosystems jms client
75. e Environment envWebLogic and click OK 3 Click the Auto Map icon as displayed in Figure 39 Figure 39 Deployment Profile Auto Map Environment envebLogic I Map variables amp f Build f Deploy Automap AccountCreate_BP1 Fileln gt AccountCreate_BP1 AccountCreate_BP1 gt VWebLogicevWay AccountCreate_BP1 gt FileOut fe DepositAmount_BP1 E Filein gt Depositamount_BP1 DepositAmount_BP1 gt VWebLogicevWay E Deposit4mount_BP1 gt FileOut 4 The Project s components are automatically mapped to their system windows as seen in Figure 40 Figure 40 Deployment Profile fe Fileln gt AccountCreate_BP1 E AccountCreate_BP1 gt FileOut E Filein gt Depositmount_BP1 E im iz pe AccountCreate_BP1 gt VWebLogicevWay m 4 ok e IntegrationSvri Fa AccountCreate_BP1 dc Depositmount_BP1 8 28 Creating and Starting the Domain To deploy your Project you must first create a domain A domain is an instance of a Logical Host Create and Start the Domain 1 Navigate to your lt JavaCAPS51 gt logicalhost directory where lt JavaCAPS51 gt is the location of your Sun Java Composite Application Platform Suite installation 2 Double click the domainmgr bat file The Domain Manager appears WebLogic eWay Adapter User s Guide 74 Sun Microsystems Inc Chapter 8 Section 8 2 Implementing the WebLogic eWay Sample Projects Using Sample Projects in elnsight 3 If you h
76. e Select Code Base Select Home and Remote Interfaces Select Method Arguments Review Selections Generate the OTD Chapter 8 Implementing the WebLogic eWay Sample Projects Sample Projects Overview Synchronous Communication eGate to WebLogic Server Asynchronous Communication WebLogic EJB to eGate JMS Preparing WebLogic Asynchronous Communication eGate JMS to a WebLogic Message Driven Bean Preparing WebLogic Using Sample Projects in elnsight Importing a Sample Project The elnsight Engine and Components The prjWebLogic_Sample_BPEL Sample Project bpCreateAccount bpDepositAmount Setting the Properties Configuring the Integration Server Creating an Environment Creating the Deployment Profile Creating and Starting the Domain Building and Deploying the Project Build the Deployment EAR File Using the Commandline Codegen Tool Running the Project Using the Sample Projects in eGate Importing a Sample Project The prjWebLogic_Sample_JCD Sample Project Setting the Properties 49 54 WebLogic eWay Adapter User s Guide 5 Sun Microsystems Inc Contents Configuring the Integration Server Creating an Environment Creating the Deployment Profile Creating and Starting the Domain Building and Deploying the Project Build the Deployment EAR File Using the Commandline Codegen Tool Running the Project Using the JMS Sample Projects in eGate The JMSQueueRequestor Sample Project The JMSTopicSubscribe Sample The JMSXA
77. e contains the latest information on Supported Operating Systems System Requirements External System Requirements The WebLogic eWay Readme is uploaded with the eWay s documentation file WebLogiceWayDocs sar and can be accessed from the Documentation tab of the Sun Java Composite Application Platform Suite Installer Refer to the WebLogic eWay Readme for the latest requirements before installing the WebLogic eWay 22 Installing the WebLogic eWay The Sun Java Composite Application Platform Suite Installer a web based application is used to select and upload eWays and add on files during the installation process The following section describes how to install the components required for this eWay Note When the Repository is running on a UNIX operating system the eWays are loaded from the Sun Java Composite Application Platform Suite Installer running on a Windows platform connected to the Repository server using Internet Explorer WebLogic eWay Adapter User s Guide 11 Sun Microsystems Inc Chapter 2 Section 2 2 Installing the WebLogic eWay Installing the WebLogic eWay 221 Installing the WebLogic eWay on an eGate supported system Follow the directions for installing the Sun Java Composite Application Platform Suite in the Sun Java Composite Application Platform Suite Installation Guide After you have installed Core Products do the following 1 From the Sun Java Composite Application Platform Suite Installer
78. e flow e Gate to WebLogic 35 WebLogic to e Gate 39 migration procedures 13 monitoring JTA and JMS XA 109 111 N Naming Services 34 Queue s 34 QueueConnectionFactory 34 Topic s 34 TopicConnectionFactory 34 O Object Pooling 7 Object Type Definitions 59 OTD Wizard creating an OTD 59 select method argument names 63 selecting interfaces 62 specify an OTD name 60 P Point to Point Model 27 Port property 22 specifying JNDI names 22 Properties WebLogic eWay 17 properties Connectivity Map 17 Connectivity Map properties modifying 18 Environment 18 21 Environment properties modifying 18 Properties Editor 19 modifying properties 19 Publish Subscribe Model 27 Q Queue 27 R running a project 76 82 WebLogic eWay Adapter User s Guide 115 S Sample MDB 91 sample project importing 69 77 running 82 Sample Projects BPEL 70 eGate 76 82 eInsight Sample Project 68 JMSQueueRequestor 83 JMSQueueSend 87 JMSTopicPublish 88 JMSTopicSubscribe 84 JMSXAQueueSend 89 JMSXATopicSubscribe 85 Overview 66 Preparing WebLogic 67 68 Setting Properties 72 78 WebLogic_JCE 77 sample projects installing 13 samples JMSQueueSend 87 JMSTopicPublish 88 JMSTopicSubscribe 84 JMSXATopicSubscribe 85 SeeBeyond JMS 35 configuring servers on different ports 47 configuring two JMS server instances 47 queue destinations 48 Queue sub context 46 QueueConnectionFactory 35 QueueConnectionFactory sub context 45 server nam
79. e settings Modifying the eWay Environment Properties These parameters are commonly global applying to all eWays of the same type in the Project The saved properties are shared by all eWays for the specified External System 1 From the Environment Explorer tree right click the WebLogic External System Select Properties from the shortcut menu The Properties Editor opens with the WebLogic eWay Environment properties 2 Make any necessary modifications to the Environment properties and click OK to save the settings 314 Using the Properties Editor Modifications to the eWay properties are made using the WebLogic eWay Properties Editor WebLogic eWay Adapter User s Guide 18 Sun Microsystems Inc Chapter 3 Section 3 1 Setting Properties of the WebLogic eWay Configuring the WebLogic eWay Properties Modifying the Default eWay Properties 1 From the upper left pane of the Properties Editor select a subdirectory of the Properties tree The parameters contained in that subdirectory are now displayed in the right pane of the Properties Editor For example clicking on the parameter settings subdirectory displays the editable parameters in the right pane as shown in Figure 2 Figure 2 Properties Editor WebLogic eWay Environment Configuration JAg v we LO ServerName localhost Port 18002 Description ServerName Specifies the name ofthe other application server Comments ServerName
80. eWay is an application specific eWay that facilitates integration between applications built on the WebLogic platform and eGate using the Enterprise Java Bean EJB component model synchronous communication The eWay also provides an example of how to exchange JMS messages between WebLogic server and eGate asynchronously 13 What s New in This Release The Sun SeeBeyond eWay Adapter for WebLogic includes the following changes and new features New for Version 5 1 2 This is a maintenance release No new features New for Version 5 1 1 This is a maintenance release No new features New for Version 5 1 0 Version Control An enhanced version control system allows you to effectively manage changes to the eWay components Multiple Drag and Drop Component Mapping from the Deployment Editor The Deployment Editor now allows you to select multiple components from the Editor s component pane and drop them into your Environment component Support for Runtime LDAP Configuration eWay configuration properties now support LDAP key values Connectivity Map Generator Generates and links your Project s Connectivity Map components using a Collaboration or Business Process Dependency on Client Libraries Uses IIOP to reduce dependency on specific Application Server client libraries WebLogic 9 Provides added support of WebLogic 9 for synchronous communication Many of these features are documented further in the Sun See
81. ean in that it does not have any state context A Message Driven Bean differs from Session and Entity Beans in that it has no local remote or localhome home interfaces An MDB is not exposed to a client at all The MDB simply subscribes to a Topic or a Queue receives messages from the container via the Topic or Queue and then process the messages it receives from the container An MDB implements two interfaces javax ejb MessageBean and javax jms MessageListener Minimally the MDB must implement the setMessageDrivenContext ejbCreate and ejbRemove methods from the javax ejb MessageBean interface In addition the MDB must implement the onMessage method of the javax jms MessageListener interface The container calls the onMessage method passing in a javax jms Message when a message is available for the MDB 44 XA Transactions XA is a two phase commit protocol that is natively supported by many databases and transaction monitors It ensures data integrity by coordinating single transactions accessing multiple relational databases XA guarantees that transactional updates are WebLogic eWay Adapter User s Guide 28 Sun Microsystems Inc Chapter 4 Section 4 4 WebLogic Server Components XA Transactions committed in all of the participating databases or are fully rolled back out of all of the databases reverting to the state prior to the start of the transaction The X Open XA specification defines the interactions between the Transact
82. ears Select Code Base From the Select Code Base page you can select the directory that contains your EJB class files by selecting the root directory above the top level Java package or you can select a specific JAR file containing the EJB class files 5 Note To select the root directory or archive file that contains the EJB class files click Browse and navigate to and select the specific root directory or archive file The EJB archive file must contain at a minimum both the Home and Remote Interface class pair for the EJB Click Add or Remove to select or unselect any additional archive files to be available for design time that is in the JCD and runtime that is in the Project EAR file With the file or directory selected at a minimum click Next see Figure 28 If you do not specify a JAR file the program searches through the entire directory looking for all Java Archive files Searches on top level drives or directories can significantly increase search times Only recognized Class File Root file names are accepted in the File Name field EJB class files must contain a package name for the EJB Home and Remote Interface Classes The wizard does not support EJB class files that do not provide a package name EJB Class files and their dependent files must be located in a directory to be used with the OTD Wizard The Wizard does not support EJB classes imbedded in archived files such as EAR WAR or SAR files These files m
83. eate and Start the Domain 1 Navigate to your lt JavaCAPS51 gt logicalhost directory where lt JavaCAPS51 gt is the location of your Sun Java Composite Application Platform Suite installation WebLogic eWay Adapter User s Guide 80 Sun Microsystems Inc Chapter 8 Section 8 3 Implementing the WebLogic eWay Sample Projects Using the Sample Projects in eGate Double click the domainmgr bat file The Domain Manager appears If you have already created a domain select your domain in the Domain Manager and click the Start an Existing Domain button Once your domain is started a green check mark indicates that the domain is running If there are no existing domains a dialog box indicates that you can create a domain now Click Yes The Create Domain dialog box appears Make any necessary changes to the Create Domain dialog box and click Create The new domain is added to the Domain Manager Select the domain and click the Start an Existing Domain button Once your domain is started a green check mark indicates that the domain is running For more information about creating and managing domains see the Sun SeeBeyond eGate Integrator System Administration Guide 83 8 Building and Deploying the Project The Build process compiles and validates the Project s Java files and creates the Project EAR file Note If your EJB was compiled with JDK 1 5 see Build the Deployment EAR File Using the Commandline Codegen Tool on
84. ed for the MDB in the lt assembly descriptor gt tag In lt container transaction gt it s specified that all methods including the onMessage method are required to participate in an XA transaction This is done by setting lt trans attribute gt to Required and the lt method gt tag with lt ejb name gt set to the name of the MDB and lt method name gt set to used as a wildcard to signify all methods weblogic ejb jar xml In addition to the ejb jar xml file the MDB also needs to be included in the weblogic ejb jar xml file lt weblogic ejb jar gt lt weblogic enterprise bean gt lt ejb name gt STCXAReceiverMDBean lt ejb name gt lt message driven descriptor gt lt pool gt lt max beans in free pool gt 15 lt max beans in free pool gt lt initial beans in free pool gt 5 lt initial beans in free pool gt lt pool gt lt destination jndi name gt SunMicrosystems Queues STCQueue3 lt destination jndi name gt lt initial context factory gt weblogic jndi WLInitialContextFactory lt initial context factory gt lt provider url gt t3 localhost 7001 lt provider url gt lt connection factory jndi name gt SunMicrosystems QueueConnectionFactories xXAQueueConnectionFactor y lt connection factory jndi name gt lt message driven descriptor gt lt reference descriptor gt lt resource description gt lt res ref name gt jdbc demoXAPool lt res ref name gt lt jndi name gt example
85. eives a reply on the request sent It exposes the remote method request which takes a String as an argument The Session Bean receives the message and sends it to a Sun Microsystems JMS Queue The Session Bean then gets a reply from eGate ejb jar xml The following is the deployment descriptor for this MDB ejb jar xml lt ejb jar gt lt enterprise beans gt lt session gt lt ejb name gt STCQueueRequestorSLSessionBean lt ejb name gt lt home gt com stc eways ejb sessionbean queuerequestor STCQueueRequestors LSessionHome lt home gt lt remote gt com stc eways ejb sessionbean queuerequestor STCQueueRequesto rSLSession lt remote gt lt ejb class gt com stc eways ejb sessionbean queuerequestor STCQueueRequestors LSessionBean lt ejb class gt lt session type gt Stateless lt session type gt lt transaction type gt Bean lt transaction type gt lt env entry gt WebLogic eWay Adapter User s Guide 98 Sun Microsystems Inc Chapter 9 Section 9 3 Sun Microsystems Sample Message Driven Beans Accessing Session Beans lt env entry name gt ReceiveTimeout lt env entry name gt lt env entry type gt java lang Long lt env entry type gt lt env entry value gt 60000 lt env entry value gt lt env entry gt lt resource ref gt lt res ref name gt jms QueueConnectionFactory lt res ref name gt lt res type gt javax jms QueueConnectionFactory lt res type gt lt res auth gt Application lt res auth gt lt
86. ents gtd This page allows you to define the configuration for this JDBC data source jCOM a upBe Name examples dataSource demoXAPool Bac tion Pool See oe The name of this JDBC data source demoPoo demoxaPoo JNDI Name examples dataSource demoXAP oraclePoo E multiPools The JNDI path to where this JDBC data source is bound Pool Name demoXAPoal v The JDBC connection pool associated with this data source The connection pool you select is used to supply database connections to client applications that request a connection from this data source ums Gi messaging Bridge D xm Advanced Options Hide uta E snmp This pane allows you to set additional configuration options for this JDBC data source Bwe E WLEC deprecated A Row Prefetch Enabled Dott Specifies whether multiple rows should be prefetched that is sent from the virtual Hosts server to the client in one server access Gi mail FileT3 Row Prefetch Size 48 Specifies the number of result set rows between 2 and 65536 to prefetch for lt j x EA a Local intranet WebLogic eWay Adapter User s Guide 113 Sun Microsystems Inc Index Index A alert codes viewing 16 Asynchronous Communication 31 Asynchronous Interaction 34 C Clustering 8 Configuring WebLogic 7 0 49 WebLogic 8 1 54 Configuring WebLogic Server 49 Connectivity Map properties 17 20 conventions text 10 D
87. ep url http localhost 12000 rep commandline rep user Administrator commandline rep pass STC commandline rep dir localrepository commandline rep projectName prjWebLogice_Sample_JCD commandline rep projectDeployName dpWebLogic_Sample_JCD 6 Open a Command Prompt to the commandlinecodegen directory 7 Make sure JAVA_HOME and ANT_HOME are pointing to the proper directory this should be consistent with step 3 and 4 above 8 Run commandline codegen by issuing the following command from the Command Prompt in your commandlinecodegen directory ant propertyfile build properties 9 The resulting EAR file is be located in the following directory command1linecodegen localrepository DEST This is where the EAR file for the next step is located 10 Deploy the EAR file into Sun SeeBeyond eGate Integrator using the Sun SeeBeyond Enterprise Manager See the Sun SeeBeyond eGate System Administration Guide Chapter 3 for details 8 2 11 Running the Project To run your deployed sample Project do the following 1 From your configured input directory paste or rename the sample input file to trigger the eWay From your output directory verify the output data a3 Using the Sample Projects in eGate This section describes how the sample projects included with the WebLogic eWay are implemented using eGate Integrator WebLogic eWay Adapter User s Guide 76 Sun Microsystems Inc Chapter 8 Section 8 3 Implementing
88. er installing the Sun Microsystems supplied Session Beans and Message Driven Beans installs Topic and Queue objects into the naming service Message Flow from eGate to WebLogic Using JMS Objects To enable message flow from eGate to WebLogic WebLogic uses the Sun MicrosystemsTopicConnectionFactory to create the necessary JMS TopicConnection s and TopicSession s and uses the Sun Microsystems QueueConnectionFactory to create the JMS QueueConnection s and QueueSession s Likewise XATopicConnectionFactory is used to create the necessary JMS XATopicConnection s and XATopicSession s and the Sun Microsystems XAQueueConnectionFactory is used WebLogic eWay Adapter User s Guide 35 Sun Microsystems Inc Chapter 5 Section 5 3 WebLogic eWay Component Communication Asynchronous Communication in eGate to create the JMS XAQueueConnection s and XAQueueSession s The weblogic ejb jar xml deployment descriptor allows the configuration of Sun Microsystems JMS as a foreign JMS to which the MDBs subscribe The diagram in Figure 12 shows the components involved in eGate to WebLogic mode The arrows represent message flow Figure 12 Message Flow from eGate to WebLogic eGate on some Host WebLogic on some Host SBYN SBYN Topic Queue Connection Connection Factory Factory SeeBeyond JMS Connection To External To External Figure 13 displays an example of the ejb jar xml for the Topic MDB which receives messages from a Sun Micr
89. er 8 Implementing the WebLogic eWay Sample Projects Provides instructions for installing and running the sample Projects Chapter 9 Sun Microsystems Sample Message Driven Beans Provides further information on the messaging objects designed to route messages from clients to other Enterprise Java Beans 14 1 Scope This user s guide provides a description of the WebLogic eWay Adapter It includes directions for installing the eWay configuring the eWay properties and implementing the eWay s sample Projects This document is also intended as a reference guide listing available properties functions and considerations 142 Intended Audience This guide is intended for experienced computer users who have the responsibility of helping to set up and maintain a fully functioning Java Composite Application Platform Suite system This person must also understand any operating systems on which the Java Composite Application Platform Suite will be installed Windows and UNIX and must be thoroughly familiar with Windows style GUI operations WebLogic eWay Adapter User s Guide 9 Sun Microsystems Inc Chapter 1 Section 1 5 Introducing the WebLogic eWay Sun Microsystems Inc Web Site 143 Text Conventions The following conventions are observed throughout this document Table 1 Text Conventions Text Convention Used For Examples Bold Names of buttons files icons Click OK parameters variables methods On
90. erence descriptor gt WebLogic eWay Adapter User s Guide 97 Sun Microsystems Inc Chapter 9 Section 9 3 Sun Microsystems Sample Message Driven Beans Accessing Session Beans lt jndi name gt SunMicrosystems STCPublisherSLSessionBean lt jndi name gt lt weblogic enterprise bean gt lt weblogic ejb jar gt lt ejb name gt Tag The value for lt ejb name gt tag must match that defined in ejb jar xml lt pool gt Tag The lt pool gt tag defines the maximum number of Session Beans in the free pool and the initial pool size by using the lt max beans in free pool gt and lt initial beans in free pool gt tags respectively lt jndi name gt Tag The value for the lt jndi name gt tag for the resource name jms TopicConnectionFactory is SunMicrosystems TopicConnectionFactories lopicConnectionFactory The value for the lt jndi name gt tag for the jms Topic entry is SunMicrosystems Topics STCTopic2 These values define the resource reference name to JNDI name mappings The Topic and TopicConnectionFactory must have already been created and registered with JNDI by the startup class See Sun Microsystems WebLogic Startup Class on page 43 for details The container locates these JNDI objects in its own JNDI as specified by the lt initial context factory gt and lt provider url gt SLS Bean Request Reply To Sun Microsystems Queue This Stateless Session Bean sends a request to the Sun Microsystems JMS Queue and rec
91. erty The eWay concatenates the server name and port number with the JNDI name and provides the qualified JNDI name For example if the specified server name is MyServer the specified port number is 1111 and the JNDI name is ejb MyStorageBin the eWay uses these property to construct the qualified JNDI name corbaname ii0p 1 2 MyServer 1111 ejb MyStorageBin Specify a qualified JNDI name in the Connectivity Map property ejbJndiName This name supercedes any values specified in the Environment properties For example corbaname iiop 1 2 MyServer 1111 ejb MyStorageBin 33 WebLogic eWay Properties The WebLogic properties are organized into the following sections WebLogic eWay Connectivity Map Properties on page 20 WebLogic eWay Environment Properties on page 21 33 1 WebLogic eWay Connectivity Map Properties The eWay properties accessed from the Connectivity Map are organized into the following sections parameter settings Connectivity Map on page 20 parameter settings Connectivity Map The parameter settings section of the Connectivity Map properties contains the top level parameters displayed in Table 3 WebLogic eWay Adapter User s Guide 20 Sun Microsystems Inc Chapter 3 Section 3 3 Setting Properties of the WebLogic eWay WebLogic eWay Properties Table 3 Connectivity Map parameter settings Name Description Required Value EjbJndiName Specifies the JNDI name of the EJB on the remote Enter a JND
92. es list 46 servers configuration 46 topic destinations 47 Topic sub context 45 TopicConnectionFactory 35 TopicConnectionFactory sub context 45 XAQueueConnectionFactory 35 XATopicConnectionFactory 35 Select Wizard Type 60 ServerName property 21 specifying JNDI names 21 Session Beans 28 Setting the Properties 72 78 Startup Class 43 Implementation 44 Properties File 44 startup class STCWLStartup class 44 Startup Properties File STCWLStartup properties 44 Sun Microsystems Inc Index STCWLStartup properties file 44 supporting documents 10 Synchronous Communication 31 eGate JMS to WebLogic Message Driven Bean 32 eGate to WebLogic 31 WebLogic EJB to eGate JMS 32 synchronous interaction 33 T text conventions 10 Thread and Connection Pooling 8 topic 27 U Updating the WebLogic JMS 37 Using eGate Sample Projects 76 82 W WebLogic eWay Setting Properties 17 WebLogic features Clustering 8 Object Pooling 7 Thread and Connection Pooling 8 WebLogic JMS Updating 37 WebLogic OTD 33 WebLogic Server components 49 JNDI tree 53 57 startup class 51 55 Configuring 49 file structure 50 54 Overview 7 WebLogic Server Components 23 EJB 27 Naming Service 23 XA Transactions 28 WebLogic T3 naming service 23 X XA confirming succeed or fail 86 90 verifying XA at work 109 XA Transactions 28 two phase commit protocol 28 XA transactions overview 28 WebLogic eWay Adapter User s Guide 116 SeeBeyond JMS XARe
93. ey The Remote Interface withdraw methods are used to getHandle run processes on the remove current remote interface balance deposit WebLogic eWay Adapter User s Guide 33 Sun Microsystems Inc Chapter 5 Section 5 3 WebLogic eWay Component Communication Asynchronous Communication in eGate 53 Asynchronous Communication in eGate The following section describes how Sun Microsystems implementation of JMS applies to asynchronous interaction between the eWay Adapter for WebLogic and WebLogic Server The eWay incorporates the Sun Microsystems JMS IQ Manager into the WebLogic environment allowing EJBs in the WebLogic container to receive messages from or send messages to eGate Two messaging procedures are used to facilitate interaction Message Driven Beans subscribing to Sun Microsystems JMS Session Beans publishing sending to Sun Microsystems JMS Note Installation of the eGate API Kit is required for asynchronous communication in eGate 53 1 Additional Messaging Service Requirements Other WebLogic subsystems required to facilitate messaging services include EJB Containers contains and provides persistence distributed objects concurrency security and transactions to all EJBs Naming Services required to locate distributed objects the Java Naming and Directory Interface JNDI enables servers to host objects at specific times The naming service allows you to bind the
94. for the publish method of the sample Topic Publisher Session Bean initialize is called in order to create the necessary JMS connections to publish to the JMS Topic This process is known as lazy loading Lazy loading is used because JMS objects may not have been bound to the naming service during the deployment of the EJB This is because the Sun Microsystems WebLogic startup class can not be deployed prior to the EJB Therefore it may not be guaranteed that calling initalize in ejbCreate creates the JMS Topic connection WebLogic does not allow the user to specify the deployment of a startup class prior to the deployment of an EJB Kk i Send a text message to Sun Microsystems JMS Topic k param message The text message to send toa JMS Topic throws EJBException Upon error TU SunMicrosystems public void publish String message throws EJBException If not initialized already then do it lazy loading initialize if message null throw new EJBException Can not publish a null message try TextMessage textMsg sbynJMSTopicObject createTextMessage message sbynJMSTopicObject publish textMsg catch Exception ex throw new EJBException Exception caught while publishing message exception ex toString The following code is for initialize Notice that the EJB s ENC is used for getting the TopicConnectionFactory
95. ges asynchronously from a JMS queue JMSQueueSend an outbound example that demonstrates how to pass messages into a JMS queue asynchronously before ultimately passing into a WebLogic container JMSTopicPublish an outbound example that demonstrates how messages are read subscribed and published to a JMS topic asynchronously before passing into a WebLogic container JMSTopicSubscribe an inbound example that demonstrates how a remote client is used to send a messages to eGate asynchronously through a JMS topic JMSXA QueueSend an outbound example that demonstrates how to asynchronously pass two phase commit protocol XA messages into a JMS queue before ultimately passing into a WebLogic container JMSXATopicSubscribe an inbound example that demonstrates how a remote client is used to asynchronously pass two phase commit protocol XA messages into a JMS topic WebLogic eWay Adapter User s Guide 32 Sun Microsystems Inc Chapter 5 Section 5 2 WebLogic eWay Component Communication Synchronous Communication in eGate 52 Synchronous Communication in eGate Synchronous communication is carried out by the WebLogic eWay and requires the creation of an OTD using the WebLogic OTD Wizard WebLogic OTDs are created using WebLogic s Session and Entity Beans not Message Driven Beans EJB interface classes that represent the methods of the EJB Once created these methods are called from within a Collaboration making t
96. he JMS client properties and the MDB are configured to connect to the JMS IQ Manager as the JMS server For more information on how to configure deploy the MDB to use the Sun Microsystems JMS IQ Manager to drive the MDB see Sun Microsystems JMS on page 35 The STCXARecieverMDBean MDB receives the message in the format accountID balance where accountID is a String account ID and balance is a numerical balance amount The STCXAReceiverMDBean is configured to use the Sun Microsystems JMS XAResource and the PointBase sample demoXAPool to receive messages from Sun Microsystems JMS and write database records into the sample WebLogic eWay Adapter User s Guide 89 Sun Microsystems Inc Chapter 8 Section 8 4 Implementing the WebLogic eWay Sample Projects Using the JMS Sample Projects in eGate PointBase database table Checking the database to see that the record is there does not necessarily confirm occurrence of the two stage commit Verify XA functionality by looking into the weblogic log file for the examples domain and also the Sun Microsystems IQ Manager log For more information on how to effect proper logging and to see XA at work see Verifying XA At Work on page 109 XA prepares and commits should be called on both database and Sun Microsystems JMS XA Resource To simulate a rollback pass an account ID of rollback For more details on the demoXAPool resource see examples dataSource demoXAPool on page 11
97. he WebLogic Administrative Console for version 7 1 and earlier does NOT allow creation of any foreign JMS objects This must be done outside of the Administrative Console The task of creating the Sun Microsystems JMS objects is done by the Sun Microsystems WebLogic startup class called WeblogicStartup See the section Sun Microsystems WebLogic Startup Class on page 43 to see how the startup class works and how to configure and deploy it The three tag entries lt initial context factory gt lt provider url gt and lt connection factory jndi name gt are necessary because Sun Microsystems JMS is being used as a foreign JMS into WebLogic The same entries can be added for subscribing to a Sun Microsystems Queue using the Sun Microsystems QueueConnectionFactory as the connection factory and Sun Microsystems Queue as the destination WebLogic eWay Adapter User s Guide 38 Sun Microsystems Inc Chapter 5 Section 5 3 WebLogic eWay Component Communication Asynchronous Communication in eGate Message Flow from WebLogic to eGate Using JMS Objects For message flow from WebLogic to eGate Session Beans can publish send JMS messages to Sun Microsystems JMS Topics Queues In addition to the connection factories the Topic and Queue destinations are also bound to the naming service before they are referenced by the Session Beans Creating these Sun Microsystems JMS objects and JNDI bindings is done through the Sun Microsystems WebLogi
98. he localhost at port 7001 By default each WebLogic Server instance is installed to listen on port 7001 If your server instance is running listening on port 7003 for example then you do not need to modify the deployment descriptors for the EJBs Otherwise modify the deployment descriptors by completing the following steps A Extract weblogic ejb example jar to a temporary file and edit META INF weblogic ejb jar xml B For each Bean that is run find the Provider_URL tag of the deployment descriptor change the port number from 7001 to 7003 and if necessary change localhost to the name of your specific computer C Save re jar zip and replace weblogic ejb example jar 6 Start an instance of the application server in this case the user defined domain server 7 When the server has finished booting start the Administration Console Go to Deployments Startup amp Shutdown and click on Configure a New Startup Class see Figure 21 Enter the following Values Name SunMicrosystems_Startup CLASSNAME com stc eways weblogic startup weblogicstartup Deployment Order 1000 default Arguments sbyn wlstartup propsfile lt BEA HOME gt weblogic700 server lib weblogicstartup _properties where lt BEA HOME gt is the home directory of the WebLogic Server Click Create and Apply WebLogic eWay Adapter User s Guide 51 Sun Microsystems Inc Chapter 6 Configuring WebLogic Server for Asynchronous Communication Sec
99. hem accessible to the user The OTD queries the JNDI directory services and locates a home interface uses the home interface to acquire remote interfaces applies Iterator methods for managing multiple remote interface instances and provides access to the remote interface methods Collaborations can then be built between the OTD and OTDs for other applications making the EJB methods available to that application 521 The WebLogic OTD The WebLogic OTD contains EJB methods that are callable from inside a Collaboration The OTD is divided into two portions Home Interface Methods used to acquire the Remote Interface allowing OTDs to find and invoke EJB instances As an example the home interface method findBigAccounts seen in Figure 10 could use the argument balanceGreaterThan 100 000 to find all account EJBs with a balance over 100 000 and assign their remote interface to the Remote Instances OTD node Remote Interface Methods contains remote interface methods that allow processes to be run on the current remote interface Figure 10 EJB OTD nodes represent both Home and Remote Interface methods Object Type Definition ae Homelnterface O getEJBMetaData getHomeHandle create The Home Interface findBigAccounts methods are used to remove acquire the remote remove interface findByPrimaryKey a Remotelnterface jsldentical getEJBHome getPrimaryK
100. hey are specified as javax jms TopicConnectionFactory and javax jms Topic for the resource type respectively These resource references are another level of JNDI indirection They don t specify the actual JNDI names of the JMS objects but instead reference the JNDI name Additionally the EJB can reference jms TopicConnectionFactory but does not really care what the actual JNDI name is The actual JNDI names for these references are defined in the weblogic ejb jar xml file The weblogic ejb jar xml defines the actual JNDI name of the resource references defined in ejb jar xml for the Session Bean as seen in Figure 19 WebLogic eWay Adapter User s Guide 42 Sun Microsystems Inc Chapter 5 Section 5 4 WebLogic eWay Component Communication Sun Microsystems WebLogic Startup Class Figure 19 weblogic ejb jar xml defines the actual JNDI name File Edit View Favorites Tools Help Q Bek Q x B A Search Se Favorites GA Media amp vat E X LJ rel A 2o Address E C hawaii eWays51 0D ev eways ejbadapter startup weblogic examples deployment ME T4 INF ejb jar xml v Ed Go Links So Snagit J Search O p A Check Autollink v AutoFill Options lt DOCTYPE ejb jar View Source for ful doctype gt lt ejb jar gt lt enterprise beans gt lt message driven gt lt message driven gt lt message driven gt lt session gt lt ejb name gt STCPublisherSLSessionBean lt ejb name gt lt
101. home gt com stc eways ejb sessionbean publisher STCPublisherSLSessionHome lt home gt lt remote gt com stc eways ejb sessionbean publisher STCPublisherSLSession lt remote gt lt ejb class gt com stc eways ejb sessionbean publisher STCPublisherSLSessionBean lt ejb class gt lt session type gt Stateless lt session type gt lt transaction type gt Bean lt transaction type gt lt resource ref gt lt res ref name gt jms TopicConnectionFactory lt res ref name gt lt res type gt javax jms TopicConnectionFactory lt res type gt lt res auth gt Application lt res auth gt lt resource ref gt lt resource env ref gt lt resource eny ref name gt jms Topic lt resource eny ref name gt lt resource eny ref type gt javax jms Topic lt resource eny ref type gt lt resource env ref gt lt session gt lt session gt lt session gt lt enterprise beans gt lt assembly descriptor gt lt ejb jar gt d My Computer The value for the jndi name tag for the resource name jms TopicConnectionFactory is SunMicrosystems TopicConnectionFactories TopicConnectionFactory and the value for the jndi name tag for the jms Topic entry is SunMicrosystems Topics STCTopicz2 These define the resource reference name to JNDI name mappings As mentioned earlier these JNDI bound objects need to be created by the startup class s4 Sun Microsystems WebLogic Startup Class To bind the Sun Microsystems JMS objects into the WebLogic naming se
102. in milliseconds the socket will close and the client can detect that the connection is lost Note The sample above demonstrates how two JMS server instances are configured on two different ports There are four possible connection factories that can be configured TopicConnectionFactory QueueConnectionFactory XATopicConnectionFactory XAQueueConnectionFactory For the connection factories the property value is used as the JNDI name of the factory object created In the example above we are telling the startup to create a TopicConnectionFactory with SunMicrosystems TopicConnectionFactories TopicConnectionFactory as the JNDI name for the TopicConnectionFactory Notice that the Sun Microsystems sub context and the TopicConnectionFactories sub context are pre pended Sun Microsystems JMS Topic Destinations The next section allows the user to specify the Topics to create and bind to JNDI Sun Microsystems JMS Topics This section configures the Sun Microsystems JMS Topics The property name for each Topic entry must start with Topic For each Topic entry the property name will be used as the JMS Topic name and the property value will be used as the JNDI name for the Topic JE SHE HE HEHE SHEE EE HE A sample JMS Topic with name Topic Samplel and JNDI name STCTOpLGL Topic Samplel STCTopicl WebLogic eWay Adapter User s Guide 47 Sun Microsystems Inc Chapter 5 Section 5 4 WebLogic eWay Compo
103. ion Manager TM and the Resource Manager The Transaction Manager also known as the XA Coordinator manages the XA or global transactions The Resource Manager manages a particular resource such as a database or a JMS system In addition an XA Resource exposes a set of methods or functions for managing the resource In order to be involved in an XA transaction the XA Resource must make itself known to the Transaction Manager This process is called enlistment Once an XA Resource is enlisted the Transaction Manager ensures that the XA Resource takes part ina transaction and makes the appropriate method calls on the XA Resource during the lifetime of the transaction For an XA transaction to complete all the Resource Managers participate in a two phase commit 2pc A commit in an XA transaction is called a two phase commit because there are two passes made in the committing process In the first pass the Transaction Manager asks each of the Resource Managers via the enlisted XA Resource whether they will encounter any problems committing the transaction If any Resource Manager objects to committing the transaction then all work done by any party on any resource involved in the XA transaction must all be rolled back The Transaction Manager calls the rollback method on each of the enlisted XA Resources However if no resource Managers object to committing then the second pass involves the Transaction Manager actually calling commit on each
104. ion gt lt resource description gt lt res ref name gt jdbc demoXAPool lt res ref name gt lt jndi name gt examples dataSource demoXAPool lt jndi name gt lt resource description gt lt resource env description gt lt res env ref name gt jms Topic lt res env ref name gt lt jndi name gt SunMicrosystems Topics STCTopic3 lt jndi name gt lt resource env description gt lt reference descriptor gt WebLogic eWay Adapter User s Guide 108 Sun Microsystems Inc Chapter 9 Section 9 4 Sun Microsystems Sample Message Driven Beans Sun Microsystems Sample XA Message Driven Beans lt jndi name gt SunMicrosystems STCXAPublisherSLSessionBean lt jndi name gt lt weblogic ejb jar gt The value for lt ejb name gt must match that defined in ejb jar xml The lt pool gt tag defines the maximum number of Session Beans in the free pool and the initial pool size by using the lt max beans in free pool gt and lt initial beans in free pool gt tags respectively The value for the jndi name tag for the resource name jms XATopicConnectionFactory is SunMicrosystems TopicConnectionFactories xX ATopicConnectionFactory The value for the jndi name tag for the jms Topic entry is SunMicrosystems Topics STCTopic3 These values define the resource reference name to JNDI name mappings The Topic and XATopicConnectionFactory must already be created and registered with JNDI by the startup class See Sun Microsystems WebLogic Star
105. ions Manager tab go to the Auto Install from Repository sub tab and connect to your Repository 3 Select the application plug ins you require and click Install The application plug ins are installed and deployed To add plug ins from the Sun Java Composite Application Platform Suite Installer 1 From the Sun Java Composite Application Platform Suite Installer s Downloads tab select the Plug Ins you require and save them to a temporary directory 2 From the Enterprise Manager s Explorer toolbar click configuration 3 Click the Web Applications Manager tab and go to the Manage Applications sub tab 4 Browse for and select the WAR file for the application plug in that you downloaded and click Deploy The plug ins is installed and deployed WebLogic eWay Adapter User s Guide 15 Sun Microsystems Inc Chapter 2 Section 2 4 Installing the WebLogic eWay Installing Enterprise Manager eWay Plug Ins 241 Viewing Alert Codes You can view and delete alerts using the Enterprise Manager An alert is triggered when a specified condition occurs in a Project component The purpose of the alert is to warn the administrator or user that a condition has occurred To View the eWay Alert Codes 1 Add the eWay Enterprise Manager plug in for this eWay 2 From the Enterprise Manager s Explorer toolbar click configuration 3 Click the Web Applications Manager tab and go to the Manage Alert Codes sub tab Your installed eWay alert codes
106. irectory named bea by default this name may be changed during installation Sample servers are located in the lt BEA HOME gt weblogic700 samples server config directory Servers created by the user are located under lt BEA HOME gt user_projects lt domain name gt see Figure 20 WebLogic eWay Adapter User s Guide 49 Sun Microsystems Inc Chapter 6 Section 6 1 Configuring WebLogic Server for Asynchronous Communication Configuration for WebLogic 7 0 Figure 20 WebLogic Server File Structure bea 4 jdk131_03 O logs 2 QO user_projects Bg mydomain a applications Ga logs nj ie myserver A userConfig C utils weblogic700 J common BO samples server 5 0 config wy examples a0 petstore i eval H E sre Ho stage H E workshop H server E uninstall BHO workshop 1 Verify that the system classpath contains ejb jar weblogic jar with ejb jar proceeding weblogic jar in order and weblogic ejb example jar 2 Copy the following files to the lt BEA HOME gt weblogic700 server lib directory com stc jms stcjms jar weblogic ejb example jar weblogic startup jar weblogic startup properties com stc jms stcjms jar can be found in the Java CAPS Repository at repository data files InstallManager javamodules JMSJCA com stc jm s stcjms jar The required JAR files can be downloaded from the link WebLogic eWay Runtime Asynchronous Communication samples under the Downloads tab in the Sun Java Co
107. ject do the following 1 From your configured input directory paste or rename the sample input file to trigger the eWay From your output directory verify the output data a4 Using the JMS Sample Projects in eGate This section describes how the JMS sample projects included with the WebLogic eWay are implemented using eGate Integrator WebLogic eWay Adapter User s Guide 82 Sun Microsystems Inc Chapter 8 Section 8 4 Implementing the WebLogic eWay Sample Projects Using the JMS Sample Projects in eGate 34 1 The JMSQueueRequestor Sample Project JMSQueueRequestor is an inbound sample project that demonstrates how a remote client requests and receives messages asynchronously from a JMS queue The Connectivity Map for this sample project appears as follows Figure 46 JMSQueueRequrestor Connectivity Map JMS client properties JMS client properties Spe Queue Sample2 crJMSQueueRequestor1 DurnmyQueue In this sample the Collaboration crJMSQueueRequestor subscribes to the Queue Queue Sample2 picks up messages and then publishes messages to a second Queue DummyQueuel1 The Collaboration is configured to use the internal Sun Microsystems JMS IQ Manager as the JMS server The Collaboration constructs a reply string by prepending the String This is a text message to the message it received from the Queue and manually publishes the reply back to the Session Bean In this case the STCQueueRequestorSLSessionBean Session
108. knowledge mode gt Auto acknowledge lt acknowledge mode gt lt message driven destination gt lt destination type gt javax jms Topic lt destination type gt lt subscription durability gt Durable lt subscription durability gt lt message driven destination gt lt message driven gt lt enterprise beans gt lt assembly descriptor gt lt container transaction gt lt method gt lt ejb name gt STCXAReceiverMDBean lt ejb name gt lt method name gt lt method name gt lt method gt lt trans attribute gt Required lt trans attribute gt lt container transaction gt lt container transaction gt lt method gt lt ejb name gt STCXAPublisherSLSessionBean lt ejb name gt lt method name gt createAccountAndPublish lt method name gt lt method gt lt method gt lt ejb name gt STCXAPublisherSLSessionBean lt ejb name gt lt method name gt getBalance lt method name gt lt method gt lt trans attribute gt Required lt trans attribute gt lt container transaction gt lt assembly descriptor gt lt ejb jar gt lt ejb name gt Tag The lt ejb name gt defines the name of the MDB and is used to uniquely identify the MDB by the container This name is displayed in the WebLogic Administrative Console to identify this MDB lt ejb class gt Tag The lt ejb class gt tag defines the class that implements that MDB The class that implements the Topic subscribing MDB is
109. l and the initial pool size by using the lt max beans in free pool gt and lt initial beans in free pool gt tags respectively lt destination jndi name gt Tag The lt destination jndi name gt tag tells the container the JNDI name of the Sun Microsystems Queue that this MDB is to subscribe lt connection factory jndi name gt Tag The lt connection factory jndi name gt specifies the QueueConnectionFactory to use The Queue and QueueConnectionFactory must have already been created and registered with JNDI by the startup class See Sun Microsystems WebLogic Startup Class on page 43 for details The container locates these JNDI objects in its own JNDI as specified by the lt initial context factory gt and lt provider url gt 93 Accessing Session Beans Session Beans can be accessed from an eGate Collaboration by using the EJB OTD Builder to create an OTD for the Session Bean This is done by 1 Using Create on the home interface to create a remote instance 2 Call methods on the remote instance 3 Free resources by calling remove when finished WebLogic eWay Adapter User s Guide 95 Sun Microsystems Inc Chapter 9 Section 9 3 Sun Microsystems Sample Message Driven Beans Accessing Session Beans 93 1 Sun Microsystems Sample Session Beans There are two Stateless Session Beans available with the WebLogic eWay A Session Bean that publishes to a Sun Microsystems JMS Topic A Session Bean that uses the STCQue
110. ling the WebLogic eWay Installing Enterprise Manager eWay Plug Ins 3 Deploy your Projects Note Only projects developed on ICAN 5 0 2 and later can be imported and migrated successfully into the Sun Java Composite Application Platform Suite 24 Installing Enterprise Manager eWay Plug Ins The Sun SeeBeyond Enterprise Manager is a Web based interface you use to monitor and manage your Sun Java Composite Application Platform Suite applications The Enterprise Manager requires an eWay specific plug in for each eWay you install These plug ins enable the Enterprise Manager to target specific alert codes for each eWay type as well as start and stop the inbound eWays The Sun Java Composite Application Platform Suite Installation Guide describes how to install Enterprise Manager The Sun SeeBeyond eGate Integrator System Administration Guide describes how to monitor servers Services logs and alerts using the Enterprise Manager and the command line client The eWay Enterprise Manager Plug ins are available from the List of Components to Download under the Sun Java Composite Application Platform Suite Installer s Downloads tab There are two ways to add eWay Enterprise Manager plug ins From the Sun SeeBeyond Enterprise Manager From the Sun Java Composite Application Platform Suite Installer To add plug ins from the Enterprise Manager 1 From the Enterprise Manager s Explorer toolbar click configuration 2 Click the Web Applicat
111. lly invoked Sun Microsystems startup 10 Start the Administration Console 11 In the Console go to Servers lt myserver gt or the new server instance Right click exampleServer and select View JNDI Tree to open the JNDI Tree window Expand the Sun Microsystems node to verify that all Sun Microsystems JMS objects are now available see Figure 25 Figure 25 View the JNDI Tree File Edit View Favorites Tools Help a esk gt Q A A Asearch Gyravorites media D S fw S 60 Links ae examplesServer _appsdir_ejb20_basic_statelessSession_earejb20_b _appsdir_webserices_trader_eartrader_jarTraderSer examples gt Servers gt examplesServer gt JNDI Tree Connected to 7001 You are logged in as weblogic Logout ejb20 beanManaged AccountHome ejb20 containerManaged AccountHome Use the tree on the left to browse the naming tree for this server This can ejb20 statefulSession TraderHome be useful in developing and debugging your applications ejb20 statelessSession TraderHome examples dataSource demoPool Naming Context examples dataSource demoXAPool e Bound Object javax jms jta jmsjdbc ReceivelnTxHome jta_ejb_jmsjdbejta_ejb_jmsjdbcreceivelnTx_EO NameService quotes G sunmicrosystems QueueConnectionFactories QueueConnectionFactory XAQueueConnectionFactory o Queues sTCQueuel sTCQueue2 sTCQueue3 sTCPublisherSLSessionBean sTCQueueReque
112. lt JTA gt lt lt 5 fa80cC71858e3d95b gt lt 000000 gt lt ResourceDescriptor com SunMicrosystems jms client STCXAResource endResourceUse Number of active requests 0 gt lt Apr 4 20xx 5 49 53 PM PST gt lt Debug gt lt JTA gt lt lt 000000 gt lt xXAResource demoXAPool1 commit xid 5 fa80c7 lt Apr 4 20xx 5 49 53 PM PST gt lt Debug gt lt JTA gt lt lt 000000 gt lt ResourceDescriptor demoXAPool startResourceUse Number of active requests 1 last alive lt Apr 4 20xx 5 49 53 PM PST gt lt Debug gt lt JTA gt lt lt 5 f a80C71858e3d95b gt lt 000000 gt lt 5 fa80C71858e3d95b XA commit DONE rm demoXAPool xar demoXAPool gt lt Apr 4 20xx 5 49 53 PM PST gt lt Debug gt lt JTA gt lt jms oca oca oca oca oca oca oca oca oca Section 9 4 Sun Microsystems Sample XA Message Driven Beans host gt lt examplesServer gt lt Thread 3 gt lt gt host gt lt examplesServer gt lt Thread 3 gt lt gt lt gt lt XAResource com SunMicrosystems jms client STCXAResource commit xid 5 fa80c71858e3d95b onePhase f host gt lt examplesServer gt lt Thread 3 gt lt gt lt gt client STCXAResource startResourceUse host gt lt examplesServer gt lt Thread 3 gt lt gt a gt host gt lt examplesServer gt lt Thread 3 gt lt gt host gt lt examplesServer gt lt Thread 3 gt lt gt lt gt 858e3d95b onePhase false gt host gt lt examplesServe
113. mposite Application Platform Suite Installer 3 Copy the JSSE jar file from repository jre 1 4 2 lib and place into bea weblogic700 server lib 4 Modify startExamplesServer cmd and setExamplesEnv cmd located at lt BEA HOME gt user_projects lt domain name gt appending com stc jms stcjms jar and weblogic startup jar to the classpath for each For example For startExamplesServer cmd CLASSPATH C bea jdk131_03 lib tools jar POINTBASE _HOME 1l1ib pbse rver42ECF183 jar POINTBASE _ HOME lib pbclient42ECF183 jar CLIENT _CLASSES 3SERVER_CLASSES COMMON_CLASSES SCLIENT_CLASSES utils _common jar C bea weblogic700 server lib com stc jms stcjms jar C bea weblogic700 server lib weblogic startup jar For setExampleEnv cmd CLASSPATH CLIENT_CLASSES 3SERVER_CLASSES SAMPLES HOME server eval pointbase lib pbserver42ECF183 jar SAMPLES _HOME server eval pointbase lib pbclient42ECF183 jar 3WL_HOME server lib classes12 WebLogic eWay Adapter User s Guide 50 Sun Microsystems Inc Chapter 6 Section 6 1 Configuring WebLogic Server for Asynchronous Communication Configuration for WebLogic 7 0 Zip COMMON_CLASSES C bea weblogic700 server lib com stc jms st cjms jar C bea weblogic700 server lib weblogic startup jar 5 The sample EJBs have been configured to reference the T3 naming service that is running on t
114. n for the WebLogic eWay appears in the right pane 3 Click the icon next to Sample Projects and extract the ZIP file Note that the WebLogic_eWay_Sample zip file contains an additional ZIP file for each sample Project Refer to Importing a Sample Project on page 69 for instructions on importing the sample Project into your repository via the Enterprise Designer 23 ICAN 5 0 Project Migration Procedures This section describes how to transfer your current ICAN 5 0 x Projects to the Sun Java Composite Application Platform Suite 5 1 2 To migrate your ICAN 5 0 x Projects to the Sun Java Composite Application Platform Suite 5 1 2 do the following Export the Project 1 Before you export your Projects save your current ICAN 5 0 x Projects to your Repository 2 From the Project Explorer right click your Project and select Export from the shortcut menu The Export Manager appears 3 Select the Project that you want to export in the left pane of the Export Manager and move it to the Selected Projects field by clicking the Add to Select Items arrow button or click All to include all of your Projects 4 Inthe same manner select the Environment that you want to export in the left pane of the Export Manager and move it to the Selected Environments field by clicking the Add to Select Items arrow button or click All to include all of your Environments 5 Browse to select a destination for your Project ZIP file and enter a name for your
115. n jndi name gt lt initial context factory gt weblogic jndi WLInitialContextFactory lt initial context factory gt lt provider url gt t3 localhost 7001 lt provider url gt lt connection factory jndi name gt SunMicrosystems TopicConnectionFactories TopicConnectionFactory lt connection factory jndi name gt lt message driven descriptor gt lt jndi name gt SunMicrosystems STCSubscriberMDBean lt jndi name gt lt weblogic enterprise bean gt lt weblogic enterprise bean gt lt weblogic enterprise bean gt lt weblogic enterprise bean gt lt weblogic enterprise bean gt lt weblogic enterprise bean gt lt weblogic ejb jar gt In the above figure the lt destination jndi name gt tag of the Topic is SunMicrosystems Topics STCTopic1 this is a Sun Microsystems JMS Topic Using the WebLogic naming service the two entries initial context factory and provider url are weblogic jndi WLInitialContextFactory and t3 localhost 7001 respectively Since the container needs to use the Sun Microsystems JMS TopicConnectionFactory we specify the Sun Microsystems TopicConnectionFactory with the lt connection factory jndi name gt tag as SunMicrosystems TopicConnectionFactories TopicConnectionFactory The JNDI bound objects SunMicrosystems Topics STCTopic1 and SunMicrosystems TopicConnectionFactories TopicConnectionFactory must be created and bound to the WebLogic JNDI for this server instance before deploying and using the MDB T
116. n overview of how components of the WebLogic eWay Adapter communicate with the WebLogic Application Server What s in This Chapter Synchronous and Asynchronous Communication on page 30 Synchronous Communication in eGate on page 33 Asynchronous Communication in eGate on page 34 Sun Microsystems WebLogic Startup Class on page 43 s1 Synchronous and Asynchronous Communication WebLogic eWay takes advantage of both Synchronous and Asynchronous communication in message delivery Asynchronous messages provide both inbound and outbound communication between eGate and WebLogic using the WebLogic JMS Synchronous messages only provide outbound communication and require OTDs to hold the data structure and define rules referenced in the EJB Figure 7 WebLogic Synchronous and Asynchronous Communication WebLogic eWay Communication Provides both inbound Provides outbound and outbound oe Sas communication only communication Asynchronous Synchronous Message Message Uses JMS to provide s 4 point to point queuing JMS Pegar ea en pug by and topic publish e WebLogic subscribe behaviour Wizard WebLogic eWay Adapter User s Guide 30 Sun Microsystems Inc Chapter 5 Section 5 1 WebLogic eWay Component Communication Synchronous and Asynchronous Communication 5 11 Synchronous Communication Synchronous communication is considered an unbuffered process requiring either complete data transmission and reply or confirm
117. n s home interface in order to create the Session Bean remote object which is essentially the bean s factory The Session Bean is exposed to the client with the remote interface The client uses the remote interface to invoke the bean s methods The actual implementation of the Session Bean is done with the bean class See Accessing Session Beans on page 95 Entity Beans Entity Beans are data objects that represent the real life objects on which Session Beans perform actions Objects may include items such as accounts employees or inventory An Entity Bean like a Session Bean consists of the remote home and bean classes The client references the Entity Bean s home interface in order to create the Entity Bean remote object essentially the bean s factory The Entity Bean is exposed to the client with the remote interface which the client uses to invoke the bean s methods The implementation of the Entity Bean is done with the bean class See Entity Beans on page 28 Message Driven Beans Message Driven Beans MDBs are messaging objects designed to route messages from clients to other Enterprise Java Beans In the WebLogic eWay MDBs are only supported with asynchronous communication with JMS However Message Driven Beans deal with asynchronous subscription publication of JMS messages in a different manner than Entity and Session Beans EJB 2 0 specification Message Driven Beans are often compared to a Stateless Session B
118. nent Communication Sun Microsystems WebLogic Startup Class Another sample JMS Topic with name Topic Sample2 and JNDI name NSTCTODLEZA Topic Sample2 STCTopic2 Another sample JMS Topic with name Topic Sample3 and JNDI name STCTopic3 Topic Sample3 STCTopic3 For each Topic to configure the property name must start with Topic The startup class uses the property name as the Topic name when creating the Sun Microsystems Topic This Topic name is the name to be used in the eGate environment the name of the event created with the Enterprise Manager The property value for the Topic is used as the JNDI name for the Topic The JNDI name is used by the EJB via the EJB s deployment descriptor See the section Message Flow from eGate to WebLogic Using JMS Objects on page 35 and Message Flow from WebLogic to eGate Using JMS Objects on page 39 for more information on the EJB deployment descriptors Sun Microsystems JMS Queue Destinations The next section allows the user to specify the Queues to create and bind to JNDI Sun Microsystems JMS Queues This section configures the Sun Microsystems JMS Queues The property name for each Queue entry must start with Queue For each Topic entry the property name will be used as the JMS Queue name and the property value will be used as the JNDI name for the Queue He SHE HE HEHE SHEE EE H A sample JMS Queue with name Queue Samplel and JN
119. ns EJB Java Source Files Selected Add Remove lt Back Net Finish f Cance f Help 9 Click Add to locate and add Java source files to the EJB Java Source Files Selected field Remove unwanted files from the EJB Java Source Files Selected field by selecting the file and clicking Remove At least two files must be supplied one for the home interface and one for the remote interface or one EJB bean implementation source Once the field contains all the necessary files click Next Caution It is the user s responsibility to match the correct source files to the EJB Review Selections 10 The Review Selections page appears Review your selection information in the right pane of the page To change any entries click Back and return to the appropriate step Generate the OTD 11 Once you are satisfied with your selection information click Finish The OTD Editor appears with the generated OTD see Figure 31 WebLogic eWay Adapter User s Guide 64 Sun Microsystems Inc Chapter 7 Using the WebLogic OTD Wizard Figure 31 OTD Editor New OTD Section 7 1 Creating a WebLogic OTD ena Reference i Internal External gt Account WebLogic eWay Adapter User s Guide v Object Type Definition Homelnterface findBigAccounts create getHomeHandle 2 remove findByPrimaryKey remove getEJBMetaData G amp
120. o the JMS Queue The JMS Connection is configured to use a JMS Queue and acts as a QueueSender Both the JMS Connection and the MDB on WebLogic are configured to connect to the JMS IQ Manager as the JMS server When WebLogic intercepts a JMS message it delegates and dispatches the message to the MDB WebLogic eWay Adapter User s Guide 87 Sun Microsystems Inc Chapter 8 Section 8 4 Implementing the WebLogic eWay Sample Projects Using the JMS Sample Projects in eGate Note For more information on how to configure deploy the MDB to use the Sun Microsystems JMS IQ Manager to drive the MDB see Sun Microsystems JMS on page 35 8 45 The JMSTopicPublish Sample JMSTopicPublish is an outbound example that demonstrates how messages are read subscribed and published to a JMS topic asynchronously before passing into a WebLogic container The Connectivity Map for this sample appears as follows Figure 54 JMSTopicPublish Connectivity Map Inbound file eWay JMS client properties Ni ai ary Fileln cruJMSTopicPublish1 Topic Sample In this sample the Outbound File eWay publishes messages to the JMS Topic Topic Sample1 The Inbound File eWay looks for input files with the extension tfin within the input directory C InputData The Collaboration crJMSTopicPublish subscribes to this external data source and then publishes to the JMS Topic The JMS client properties is configured to use the internal Sun Microsystems JMS IQ Manager as
121. of the enlisted XA Resources This process guarantees the ACID atomicity consistency isolation and durability properties of a transaction that can span multiple resources Both Sun Microsystems JMS and BEA WebLogic Server implement the X Open XA interface specifications Because both systems support XA the EJBs running inside the WebLogic container can subscribe or publish messages to Sun Microsystems JMS in XA mode When running in XA mode the EJBs subscribing or publishing to Sun Microsystems JMS can also participate in a global transaction involving other EJBs For the example EJBs running in XA mode Container Managed Transactions CMTs are used In other words we define the transactional attributes of the EJBs through their deployment descriptors and allow the container to transparently handle the XA transactions on behalf of the EJBs The WebLogic Transaction Manager coordinates the XA transactions The Sun Microsystems JMS XA Resource is enlisted to a transaction so that the WebLogic Transaction Manager is aware of the Sun Microsystems JMS XA Resource involved in the XA transaction The WebLogic container interacts closely with the Transaction Manager in CMT such that transactions are almost transparent to an EJB developer See Sun Microsystems Sample XA Session Beans on page 105 WebLogic eWay Adapter User s Guide 29 Sun Microsystems Inc Chapter 5 WebLogic eWay Component Communication This chapter provides a
122. ogic 7 0 the Sun Microsystems node to verify that all Sun Microsystems JMS objects are now available see Figure 22 Figure 22 View the JNDI Tree File Edit View Favorites Tools Help a enk gt amp A A Qsearch Favorites media 3 B S fal S ae examplesServer _appsdir_ejb20_basic_statelessSession_earejb20_b _appsdir_webserices_trader_eartrader_jarTraderSer ejb20 beanManaged AccountHome os ejb20 containerManaged AccountHome Use the tree on the left to browse the naming tree for this server This can ejb20 statefulSession TraderHome be useful in developing and debugging your applications oejb20 statelessSession TraderHome examples dataSource demoPool Naming Context examples dataSource demoXAPool e Bound Object javax jms jta jmsjdbc ReceivelnTxHome jta_ejb_jmsjdbcjta_ejb_jmsjdbcreceivelnTx_EO NameSenice quotes G sunmicrosystems QueueConnectionFactories QueueConnectionFactory XAQueueConnectionFactory o Queues sTCQueuel sTCQueue2 sTCQueue3 sTCPublisherSLSessionBean sTCQueueRequestorSLSessionBean STCxAPublisherSLSessionBean aa TopicConnectionFactories TopicConnectionFactory XATopicConnectionF actory a Topics STCTopic1 STCTopic2 STCTopic3 FA wahlnnie E S Applet navapplet started GE Local intranet 12 From the Navigator pane on the left click on Examples Deployments EJB Click on Configure a new EJ
123. osystems JMS Topic WebLogic eWay Adapter User s Guide 36 Sun Microsystems Inc Chapter 5 Section 5 3 WebLogic eWay Component Communication Asynchronous Communication in eGate Figure 13 ejb jar xml Topic MDB e C hawail eW ays510Dev eways ejbadapter startup weblogic examples deployment ME TA INF ejb jar_xm Microsoft Interne File Edit View Favorites Tools Help l y T 2 Qis O x a A smn Sero ee UA S Address e C hawaii eWays51 OD ev eways ejbadapter startup weblogic examples deployment ME TA INF ejb jar Go Links So Snaglt g Google z C Seach O SF Check Autollink E AutoFil faa Options 8 lt DOCTYPE ejb jar View Source for full doctype gt lt ejb jar gt lt enterprise beans gt lt message driven gt lt ejb name gt STCSubscriberMDBean lt ejb name gt lt ejb class gt com stc eways ejb messagebean STCSubscribermMDBean lt ejb class gt lt transaction type gt Bean lt transaction type gt lt acknowledge mode gt Auto acknowledge lt acknowledge mode gt lt message driven destination gt lt destination type gt javax jms Topic lt destination type gt lt subscription durability gt Durable lt subscription durability gt lt message driven destination gt lt message driven gt lt message driven gt lt message driven gt lt session gt lt session gt lt session gt lt enterprise beans gt lt assembly descriptor gt lt fejb jar gt
124. p weblogic81 common 4 integration O javelin O pi3n portal samples domains O end2end O examples B integration O medrec portal workshop integration 4 platform S O portal server server 4 bin a builder a O ext O lib uninstall workshop 1 Verify that the system classpath contains ejb jar weblogic jar with ejb jar preceding weblogic jar in order and weblogic ejb example jar 2 Copy the following files to the lt BEA HOME gt weblogic81 server lib directory com stc jms stcjms jar weblogic ejb example jar e weblogic startup jar weblogic startup properties com stc jms stcjms jar can be found in the Java CAPS Repository at repository data files InstallManager javamodules JMSJCA com stc jm s stcjms jar The required JAR files can be downloaded from the link WebLogic eWay Runtime Asynchronous Communication samples under the Downloads tab in the Sun Java Composite Application Platform Suite Installer 3 Modify startExamplesServer cmd and setExamplesEnv cmd located at lt BEA HOME gt lt user_projects gt lt domain name gt appending com stc jms stcjms jar and weblogic startup jar to the classpath for each For example WebLogic eWay Adapter User s Guide 54 Sun Microsystems Inc Chapter 6 Section 6 2 Configuring WebLogic Server for Asynchronous Communication Configuration for WebLogic 8 1 For startExamplesServer
125. page 75 Build the Project 1 2 3 From the Deployment Editor toolbar click the Build icon If there are any validation errors a Validation Errors pane will appear at the bottom of the Deployment Editor and displays information regarding the errors Make any necessary corrections and click Build again After the Build has succeeded you are ready to deploy your Project Deploy the Project 1 2 From the Deployment Editor toolbar click the Deploy icon Click Yes when the Deploy prompt appears A message appears when the project is successfully deployed 83 9 Build the Deployment EAR File Using the Commandline Codegen Tool The Sun SeeBeyond Enterprise Designer is packaged with JDK 1 4 If your EJB is compiled with JDK version 1 5 or above you must use Command Line Codegen to build the Deployment EAR file Please refer to the Sun SeeBeyond eGate Integrator User s Guide Building an Application File From the Command Line for details For a simple description of how to use the Commandline Codegen Tool to create an EAR file do the follow 1 Download the CommandLineCodegen tool from the Sun Java Composite Application Platform Suite Installer WebLogic eWay Adapter User s Guide 81 Sun Microsystems Inc Chapter 8 Section 8 4 Implementing the WebLogic eWay Sample Projects Using the JMS Sample Projects in eGate 2 Extract the files into a local directory 3 Download and install JDK 1 5 from Sun website o
126. picConnectionFactory lt res type gt lt res auth gt Application lt res auth gt lt resource ref gt lt resource env ref gt lt resource env ref name gt jms Topic lt resource env ref name gt lt resource env ref type gt javax jms Topic lt resource env ref type gt lt resource env ref gt lt session gt lt ejb jar gt WebLogic eWay Adapter User s Guide 96 Sun Microsystems Inc Chapter 9 Section 9 3 Sun Microsystems Sample Message Driven Beans Accessing Session Beans lt ejb name gt Tag The lt ejb name gt tag defines the name of the Stateless Session Bean and is used to uniquely identify the Session Bean by the container This name is displayed in the WebLogic Administrative Console to identify this Bean lt ejb class gt Tag The lt ejb class gt tag defines the class that implements that Session Bean The home interface for this bean is com stc eways ejb sessionbean publisher STCPublisherSLSessionHome The remote interface for the bean is com stc eways ejb sessionbean publisher STCPublisherSLSession The class which implements the home and remote interfaces as well as the bean itself is com stc eways ejb sessionbean publisher STCPublisherSLSessionBean The Session Bean knows about the TopicConnectionFactory and Topic destinations via the resource reference tags Notice that the value for the res ref name tag is jms TopicConnectionFactory and the value for the resource env ref name environment ent
127. r gt lt enterprise beans gt lt message driven gt lt ejb name gt STCReceiverMDBean lt ejb name gt lt ejb class gt com stc eways ejb messagebean STCReceiverMDBean lt ejb class gt lt transaction type gt Bean lt transaction type gt lt message driven destination gt lt destination type gt javax jms Queue lt destination type gt lt subscription durability gt Durable lt subscription durability gt lt message driven destination gt lt message driven gt lt assembly descriptor gt lt container transaction gt lt method gt lt ejb name gt STCXAReceiverMDBean lt ejb name gt lt method name gt lt method name gt lt method gt lt trans attribute gt Required lt trans attribute gt lt container transaction gt lt assembly descriptor gt lt ejb jar gt lt ejb name gt Tag The lt ejb name gt defines the name of the MDB and is used to uniquely identify the MDB by the container This name is displayed in the WebLogic Administrative Console to identify this MDB lt ejb class gt Tag The lt ejb class gt tag defines the class that implements that MDB The class that implements the Queue subscribing MDB is com stc eways ejb messagebean STCReceiverMDBean lt destination type gt Tag Since this MDB is subscribing to a Sun Microsystems Queue you must specify the lt destination type gt tag as javax jms Queue lt subscription durability gt Tag In order to create a du
128. r gt lt Thread 3 gt lt gt lt gt host gt lt examplesServer gt lt Thread 3 gt lt gt host gt lt examplesServer gt lt Thread 3 gt lt gt lt 5 a80c71858e3d95b gt lt 000000 gt lt ResourceDescriptor demoXAPool endResourceUse Number of active requests 0 gt Additional Logging and Monitoring of JTA and JMS XA Additional logging and monitoring of JTA and JMS XA can be configured for WebLogic Server 7 0 and 8 1 through the Administrator Console From the navigation pane on the left expand the Servers node and select the appropriate server Configure monitoring and logging in the following locations Select the Monitoring tab and click on the JMS and JTA subtabs Select the Logging tab and click on the JTA and Debugging subtabs examples dataSource demoXAPool As part of its examples server WebLogic pre installs a pre configured datasource named examples dataSource demoXAPool see Figure 58 and associates it with the pre installed connection pool named demoXAPool see Figure 59 This datasource is intended for use with the sample WebLogic EJBs that are deployed with the examples server but it is also used by the EJBs supplied with the WebLogic eWay Use the figures below to verify that the WebLogic examples server is properly set up to work with the sample eGate projects EJBs discussed in this document WebLogic eWay Adapter User s Guide 111 Sun Microsystems Inc Chapter 9 Section
129. r gt JNDI Tree Connected to localhost 7001 You are logged in as weblogic Logout 42 Java Messaging Service JMS The Java Messaging Service is a messaging oriented middleware API designed by Sun The client makes use of these APIs allowing portability with any JMS implementation JMS allows clients to be de coupled from one another The clients do not communicate with each other directly but rather by send messages to each other via middleware Each client in a JMS environment connects to a messaging server The messaging server facilitates the flow of messages among all clients The messaging server guarantees that all messages arrive at the appropriate destinations The messaging server also guarantees quality of services as transactions local or XA persistence durability and others Clients send messages to or receive messages from Topics or Queues see Figure 5 and Figure 6 The difference between a Topic and a Queue is that all subscribers to a Topic receive the same message when the message is published and only one subscriber to a Queue receives a message when the message is sent see Sun Microsystems JMS on page 35 WebLogic eWay Adapter User s Guide 26 Sun Microsystems Inc Chapter 4 Section 4 3 WebLogic Server Components Enterprise JavaBeans EJBs Figure 5 Topic The Publish Subscribe Model Msg a Msg Cm C O Crm Ms A gt a D
130. r make a note of the JDK that was used to compile the EJB 4 Download and install ANT version 1 6 2 or above from Apache Software Foundation at http ant apache org 5 Change the build properties file in the commandlinecodegen directory At a minimum you must change the following parameters with sample data Make sure there is no trailing space after each parameter The parameters below are usually different for each specific environment commandline rep url http localhost 12000 rep commandline rep user Administrator commandline rep pass STC commandline rep dir localrepository commandline rep projectName prjWebLogiceWay commandline rep projectDeployName dpBmpSimple 6 Open a Command Prompt to the commandlinecodegen directory 7 Make sure JAVA_HOME and ANT_HOME are pointing to the proper directory this should be consistent with step 3 and 4 above 8 Run commandline codegen by issuing the following command from the Command Prompt in your commandlinecodegen directory ant propertyfile build properties 9 The resulting EAR file is be located in the following directory command1linecodegen localrepository DEST This is where the EAR file for the next step is located 10 Deploy the EAR file into Sun SeeBeyond eGate Integrator using the Sun SeeBeyond Enterprise Manager See the Sun SeeBeyond eGate System Administration Guide Chapter 3 for details 8 3 10 Running the Project To run your deployed sample Pro
131. rable subscriber MDB the lt subscription durability gt tag is specified as Durable weblogic ejb jar xml In addition to the ejb jar xml file the MDB also needs to be included in the weblogic ejb jar xml file lt weblogic ejb jar gt WebLogic eWay Adapter User s Guide 94 Sun Microsystems Inc Chapter 9 Section 9 3 Sun Microsystems Sample Message Driven Beans Accessing Session Beans lt weblogic enterprise bean gt lt ejb name gt STCReceiverMDBean lt ejb name gt lt message driven descriptor gt lt pool gt lt max beans in free pool gt 15 lt max beans in free pool gt lt initial beans in free pool gt 5 lt initial beans in free pool gt lt pool gt lt destination jndi name gt SunMicrosystems Queues STCQueuel lt destination jndi name gt lt initial context factory gt weblogic jndi WLInitialContextFactory lt initial context factory gt lt provider url gt t3 localhost 7001 lt provider url gt lt connection factory jndi name gt SunMicrosystems QueueConnectionFactories QueueConnectionFactory lt connection factory jndi name gt lt message driven descriptor gt lt jndi name gt SunMicrosystems STCReceiverMDBean lt jndi name gt lt weblogic enterprise bean gt lt weblogic ejb jar gt lt ejb name gt Tag The value for lt ejb name gt tag must match that defined in ejb jar xml lt pool gt Tag The lt pool gt tag defines the maximum number of MDBs in the free poo
132. references another resource by the reference name jdbc demoXAPool This resource is of type javax sql DataSource The actual JNDI name of this resource is defined in the weblogic ejb jar xml deployment descriptor The CMT is specified in the lt transaction type gt for the SLS Bean It is also required that the lt container transaction gt be specified for the SLS Bean in the lt assembly descriptor gt tag In lt container transaction gt it s specified that the methods createAccountAndPublish and getBalance are required to participate in an XA transaction Although getBalance is marked as required the container optimizes for a one phase commit or rollback because it only accesses one XA Resource the database XA Resource weblogic ejb jar xml In addition to the ejb jar xml file the Session Bean must also be included in the weblogic ejb jar xml file lt weblogic ejb jar gt lt ejb name gt STCXAPublisherSLSessionBean lt ejb name gt lt stateless session descriptor gt lt pool gt lt max beans in free pool gt 15 lt max beans in free pool gt lt initial beans in free pool gt 5 lt initial beans in free pool gt lt pool gt lt stateless session descriptor gt lt reference descriptor gt lt resource description gt lt res ref name gt jms XATopicConnectionFactory lt res ref name gt lt jndi name gt SunMicrosystems TopicConnectionFactories XATopicConnectionFactor y lt jndi name gt lt resource descript
133. rosystems sub context configured JNDI subcontext for Sun Microsystems JMS Queue connection factories This section configures the JNDI subcontext to which all the Sun Microsystems JMS QueueConnectionFactory objects will bind WARNING Only the property value can be changed here Subcontext QueueConnectionFactory QueueConnectionFactories The user should not have to change this SunMicrosystems JMS Topic Sub context The next section allows the user to specify the JNDI sub context where all instances of Sun Microsystems JMS Topic destinations are bound This sub context is under the Sun Microsystems sub context configured JNDI subcontext for SunMicrosystems JMS Topics This section configures the JNDI subcontext to which all the Sun Microsystems JMS Topic objects will bind WARNING Only the property value can be changed here Subcontext Topic Topics The user should not have to change this WebLogic eWay Adapter User s Guide 45 Sun Microsystems Inc Chapter 5 Section 5 4 WebLogic eWay Component Communication Sun Microsystems WebLogic Startup Class SunMicrosystemsJMS Queue Sub context The next section allows the user to specify the JNDI sub context where all instances of Sun MicrosystemsJMS Queue destinations are bound This sub context is under the Sun Microsystems sub context configured JNDI subcontext for
134. rprise Explorer s Project Explorer right click the Project and select New gt Deployment Profile WebLogic eWay Adapter User s Guide 79 Sun Microsystems Inc Chapter 8 Section 8 3 Implementing the WebLogic eWay Sample Projects Using the Sample Projects in eGate 2 From the Create Deployment Profile dialog box enter a name for the Deployment Profile for this example dpWebLogic_Sample_JCD Select the appropriate Environment envWebLogic and click OK 3 Click the Auto Map icon as displayed in Figure 44 Figure 44 Deployment Profile Auto Map Environment envvvebLogic Gy J Map variables f Build Deploy AccountCreate_Collab1 Fileln gt AccountCreate_Collab1 AccountCreate_Collab1 gt VWebLogicevWay AccountCreate_Collab1 gt FileOut fe DepositAmount_Collab1 Fileln gt DepositAmount_Collab1 DepositAmount_Collab1 gt VWebLogicevVay DepositAmount_Collab1 gt FileOut 4 The Project s components are automatically mapped to their system windows as seen in Figure 45 Figure 45 Deployment Profile E AccountCreate_Collab1 gt FileOut Fileln gt AccountCreate_Collab1 a Fileln gt DepositAmount_Collab1 3 AccountCreate_Collab1 gt WebLogiceay 4 Se Ge IntegrationSvr1 EC AccountCreate_Collab1 da Deposit mount_Collab1 8 3 7 Creating and Starting the Domain To deploy your Project you must first create a domain A domain is an instance of a Logical Host Cr
135. rvice a Sun Microsystems startup class is installed on the WebLogic Server The startup class is loaded by the WebLogic Server when the server is booted and the startup method of the class is invoked Upon invocation of the startup method the following objects are instantiated and bound to WebLogic s naming service A Sun Microsystems MyTopicConnectionFactory A Sun Microsystems MyQueueConnectionFactory All Configured Topics All Configured JMS Queues WebLogic eWay Adapter User s Guide 43 Sun Microsystems Inc Chapter 5 Section 5 4 WebLogic eWay Component Communication Sun Microsystems WebLogic Startup Class The configuration file for the startup class is in the form of a Java properties file Before describing the format of this file let s look at the implementation of the startup class 54 1 Startup Class Implementation The startup class is called WeblogicStartup class It implements the weblogic common T3StartupDef interface The WeblogicStartup class only needs to implement two methods setServices startup setServices method The setServices method is trivial the server passes in an instance of T3ServicesDef which can be saved by the startup class as an attribute See the WebLogic documentation on T3ServicesDef for more information on this interface startup method The startup method is where the crux of the work is done This method is invoked by the server and this is where the Sun Micros
136. ry is jms Topic They are specified as javax jms TopicConnectionFactory and javax jms Topic for the resource type respectively These resource references are another level of JNDI indirection They don t specify the actual JNDI names of the JMS objects but rather they are references to the JNDI name So the EJB can reference jms TopicConnectionFactory but does not really care what the actual JNDI name is The actual JNDI names for these references are defined in the weblogic ejb jar xml file weblogic ejb jar xml In addition to the ejb jar xml file the Session Bean also needs to be included in the weblogic ejb jar xml file lt weblogic ejb jar gt lt weblogic enterprise bean gt lt ejb name gt STCPublisherSLSessionBean lt ejb name gt lt stateless session descriptor gt lt pool gt lt max beans in free pool gt 15 lt max beans in free pool gt lt initial beans in free pool gt 5 lt initial beans in free pool gt lt pool gt lt stateless session descriptor gt lt reference descriptor gt lt resource description gt lt res ref name gt jms TopicConnectionFactory lt res ref name gt lt jndi name gt SunMicrosystems TopicConnectionFactories TopicConnectionFactory lt jndi name gt lt resource description gt lt resource env description gt lt res env ref name gt jms Topic lt res env ref name gt lt jndi name gt SunMicrosystems Topics STCTopic2 lt jndi name gt lt resource env description gt lt ref
137. s Inc Chapter 8 Section 8 4 Implementing the WebLogic eWay Sample Projects Using the JMS Sample Projects in eGate Figure 51 JMSXATopicSubscribe Sample Components WebLogic Container STCXAPublisherSLSessionClient Topic Sample3 crJMSXATopicSubscribe1 crealeAccountAndPublish A Remote XA Publisher Publis c _ Collaboration Client SLSessionBean sig getBalance oin Definition Java Connection Connection Demo Database S Fi PointBase J JMS IQ Manager The stand alone remote client com stc eways ejb sessionbean xapublisher STCXA PublisherSLSessionClient is used to invoke the createAccountAndPublish method of the STCXAPublisherSLSessionBean This method takes two parameters Outbound File eWay An account ID of type java lang String A balance of type double The XA Session Bean inserts a record into the demo database and publishes to the topic with a message indicating that the record is successfully inserted into the database The parameters taken by the client are The provider URL of the WebLogic JNDI where the Session Bean is bound The JNDI name of the Session Bean SunMicrosystems STCXAPublisherSLSessionBean An account ID A balance for the account to create in the database For example the following command inserts a record into the database with the ID JohnDoe and a balance of 8888 99 java com stc eways ejb sessionbean xapublisher STCXA
138. s deploy applications and EJB modules Apply l Done 2 Local intranet 8 Click on the Target and Deploy tab and move the new server instance from Available to Chosen using the arrow button Click Apply 9 Stop and restart the server by completing the following steps A From the navigator pane on the left go to lt mydomain gt Servers and right click on lt myserver gt or the new server instance Click on Start stop this server B Inthe pane on the right under the Start Stop tab click on Graceful shutdown of this server and Apply The server shuts down C To restart the server from the Windows Programs menu select BEA WebLogic Platform 8 1 Examples WebLogic Server Examples Launch WebLogic server Examples D When prompted enter user name and password If the startup class is successfully invoked you should see the following text in the Start Server command window weblogicstartup Sun Microsystems startup class invoked SunMicrosystems_Startup weblogicstartup Topic name Topic Sample3 weblogicstartup Topic name Topic Sample2 weblogicstartup Topic name Topic Samplel WebLogic eWay Adapter User s Guide 56 Sun Microsystems Inc Chapter 6 Section 6 2 Configuring WebLogic Server for Asynchronous Communication Configuration for WebLogic 8 1 weblogicstartup Queue name Queue Sample3 weblogicstartup Queue name Queue Sample2 weblogicstartup Queue name Queue Samplel weblogicstartup Successfu
139. s integration servers and message servers used by a Project and contain the configuration information for these components Environments are created using the Environment Editor 1 From the Enterprise Explorer click the Environment Explorer tab 2 Right click the Repository and select New Environment A new Environment is added to the Environment Explorer tree 3 Rename the new Environment to envWebLogic 4 Right click envWebLogic and select New gt WebLogic External System Name the External System esWebLogic Click OK esWebLogic is added to the Environment Editor 5 Right click envWebLogic and select New gt File External System Name the External System esFile Click OK esFile is added to the Environment Editor 6 Right click envWebLogic and select New gt Logical Host LogicalHost1 is added to the Environment Editor 7 From the Environment Explorer tree right click LogicalHost1 and select New gt Sun SeeBeyond Integration Server A new Integration Server IntegrationSvr1 is added to the Environment Explorer tree under LogicalHost1 seeFigure 43 Figure 43 Environment Editor esWebLogic Sk e IntegrationSvri 83 6 Creating the Deployment Profile Deployment Profiles are specific instances of a Project in a particular Environment A Deployment Profile is created using the Enterprise Designer s Deployment Editor To create a Deployment Profile do the following 1 From the Ente
140. s dataSource demoXAPool lt jndi name gt lt resource description gt lt reference descriptor gt lt jndi name gt SunMicrosystems STCXAReceiverMDBean lt jndi name gt lt weblogic enterprise bean gt lt weblogic ejb jar gt The value for lt ejb name gt must match the value defined in ejb jar xml lt pool gt Tag The lt pool gt tag defines the maximum number of MDBs in the free pool and the initial pool size by using the lt max beans in free pool gt and lt initial beans in free pool gt tags respectively lt destination jndi name gt Tag The lt destination jndi name gt tag tells the container the JNDI name of the Sun Microsystems Queue to which this MDB is to subscribe lt connection factory jndi name gt Tag The lt connection factory jndi name gt tag specifies the XAQueueConnectionFactory to use The Queue and XAQueueConnectionFactory must already be created and WebLogic eWay Adapter User s Guide 104 Sun Microsystems Inc Chapter 9 Section 9 4 Sun Microsystems Sample Message Driven Beans Sun Microsystems Sample XA Message Driven Beans registered with JNDI by the startup class See Sun Microsystems WebLogic Startup Class on page 43 for details The container locates these JNDI objects in its own JNDI as specified by the lt initial context factory gt and lt provider url gt Notice also that the actual JNDI name for the jdbc demoXAPool resource is examples dataSource demoXAPool This is the
141. s seen in Figure 49 the stand alone remote client com stc eways ejb sessionbean publisher STCPublisherSLSessionClient can be used to invoke the publish method of the STCPublisherSLSessionBean to send a message to eGate asynchronously The parameters taken by the client are Remote Client SLSessionBean Outbound File eWay The provider URL of the WebLogic JNDI where the Session Bean is bound The JNDI name of the Session Bean SunMicrosystems STCPublisherSLSessionBean A text message or a file name The option specifying whether the third parameter is a file or a text message msg WebLogic eWay Adapter User s Guide 84 Sun Microsystems Inc Chapter 8 Section 8 4 Implementing the WebLogic eWay Sample Projects Using the JMS Sample Projects in eGate For example the following command sends the message This is a text message java com stc eways ejb sessionbean publisher STCPublisherSLSessionClient t3 localhost 7001 SunMicrosystems STCPublisherSLSessionBean This is a text message msg Whereas the following command sends the message contained in the file c temp testfile txt java com stc eways ejb sessionbean publisher STCPublisherSLSessionClient t3 localhost 7001 SunMicrosystems STCPublisherSLSessionBean c temp testfile txt file Note Before running this client make sure that the system classpath includes ejb jar weblogic jar with ejb jar proceeding weblogic jar in order and we
142. s using WebLogic s Session and Entity Beans EJB interface classes Sample projects using synchronous communication in this manner include The prjWebLogic_Sample_BPEL Sample Project on page 70 WebLogic eWay Adapter User s Guide 66 Sun Microsystems Inc Chapter 8 Section 8 1 Implementing the WebLogic eWay Sample Projects Sample Projects Overview The prjWebLogic_Sample_JCD Sample Project on page 77 8 1 2 Asynchronous Communication WebLogic EJB to eGate JMS Asychronous Communication from the WebLogic EJB to eGate JMS requires the implementation of Sun Microsystems JMS IQ Manager into the WebLogic environment allowing EJBs in the WebLogic container to receive messages from or send messages to eGate Sample projects using synchronous communication in this manner include The JMSQueueRequestor Sample Project on page 83 The JMSTopicSubscribe Sample on page 84 The JMSXATopicSubscribe Sample on page 85 Note Installation of the eGate API Kit is required for asynchronous communication in eGate Note WebLogic 9 is not supported for asynchronous communication Preparing WebLogic The following steps required to prepare WebLogic EJB for interaction with the eGate JMS 1 Configure WebLogic to create JNDI entries for Sun Microsystems JMS on WebLogic Server instance startup 2 Create an EJB that can publish to Sun Microsystems JMS The basic sample Session Beans STCPublisherSLSession and STCQueueRequrestorSLSession
143. scriberMDBean lt jndi name gt lt weblogic enterprise bean gt lt weblogic ejb jar gt lt ejb name gt Tag The value for lt ejb name gt must match that defined in ejb jar xml lt pool gt Tag The lt pool gt tag defines the maximum number of MDBs in the free pool and the initial pool size by using the lt max beans in free pool gt and lt initial beans in free pool gt tags respectively lt destination jndi name gt Tag The lt destination jndi name gt tells the container the JNDI name of the Sun Microsystems Topic that this MDB is to subscribe lt connection factory jndi name gt Tag Also the lt connection factory jndi name gt specifies the TopicConnectionFactory to use The Topic and TopicConnectionFactory must have already been created and registered with JNDI by the startup class See Sun Microsystems WebLogic Startup Class on page 43 for details The container locates these JNDI objects in its own JNDI as specified by the lt initial context factory gt and lt provider url gt 92 MDB Subscribing to Sun Microsystems Queue This MDB subscribes to only one Sun Microsystems JMS Queue and simply receives and displays the JMS Messages WebLogic eWay Adapter User s Guide 93 Sun Microsystems Inc Chapter 9 Section 9 2 Sun Microsystems Sample Message Driven Beans MDB Subscribing to Sun Microsystems Queue ejb jar xml The following is the deployment descriptor for this MDB ejb jar xml lt ejb ja
144. see Setting the Properties on page 72 Configure the Integration Server see Configuring the Integration Server on page 72 Create an Environment see Creating an Environment on page 73 Create a Deployment Profile see Creating the Deployment Profile on page 73 Create and start a domain see Creating and Starting the Domain on page 74 Build and deploy the Project see Building and Deploying the Project on page 75 8 22 The elnsight Engine and Components eGate components can be deployed as Activities in eInsight Business Processes Once a component is associated with an Activity eInsight invokes it using a Web Services interface eGate components that can interface with eInsight in this way include the following Object Type Definitions OTDs eWays using default receive and write operators of the File eWay Collaborations Using the Enterprise Designer and elnsight you can add an Activity to a Business Process then associate that Activity with an eGate component for example an eWay Then when elnsight runs the Business Process it automatically invokes that component via its Web Services interface WebLogic eWay Adapter User s Guide 69 Sun Microsystems Inc Chapter 8 Section 8 2 Implementing the WebLogic eWay Sample Projects Using Sample Projects in elnsight 82 3 The prjWebLogic_Sample_BPEL Sample Project The elnsight sample project prj WebLogic_Sample_BPEL
145. server by completing the following steps A From the navigator pane on the left go to lt mydomain gt Servers and right click on lt myserver gt or the new server instance Click on Start stop this server B Inthe pane on the right under the Start Stop tab click on Shutdown this server then click Yes The server shuts down C To restart the server from the Windows Programs menu select BEA WebLogic Platform 7 0 User Projects lt mydomain gt Start Server D When prompted enter user name and password If the startup class is successfully invoked you should see the following text in the Start Server command window weblogicstartup Sun Microsystems startup class invoked SunMicrosystems_Startup weblogicstartup Topic weblogicstartup weblogicstartup weblogicstartup weblogicstartup weblogicstartup weblogicstartup Topic Topic Queue Queue Queue name name name name name name Topic Sample3 Topic Sample2 Topic Samplel Queue Sample3 Queue Sample2 Queue Samplel Successfully invoked Sun Microsystems startup 10 Start the Administration Console 11 In the Console go to Servers lt myserver gt or the new server instance Right click exampleServer and select View JNDI Tree to open the JNDI Tree window Expand WebLogic eWay Adapter User s Guide 52 Sun Microsystems Inc Chapter 6 Section 6 1 Configuring WebLogic Server for Asynchronous Communication Configuration for WebL
146. sion descriptor gt lt reference descriptor gt lt resource description gt lt res ref name gt jms TopicConnectionFactory lt res ref name gt lt jndi name gt SunMicrosystems TopicConnectionFactories TopicConnectionFactory lt jndi name gt lt resource description gt lt resource eny description gt lt res env ref name gt jms Topic lt res env ref name gt lt jndi name gt SunMicrosystems Topics STCTopic2 lt jndi name gt lt resource env description gt lt reference descriptor gt lt jndi name gt SunMicrosystems STCPublisherSLSessionBean lt jndi name gt lt weblogic enterprise bean gt lt weblogic enterprise bean gt lt weblogic enterprise bean gt lt weblogic ejb jar gt zi BOOS l My Computer A Figure 18 displays an example of the ejb jar xml deployment descriptor for the Session Bean publishing to a Sun Microsystems JMS Topic E co Links Snagit t WebLogic eWay Adapter User s Guide 41 Sun Microsystems Inc Chapter 5 Section 5 3 WebLogic eWay Component Communication Asynchronous Communication in eGate Figure 18 ejb jar xml deployment descriptor Session Bean to Sun Microsystems JMS Topic depioyme ATAT SE al R M aaga JUJA File Edit View Favorites Tools Help VE Om O AAA Dome r Que OC a US Address E C hawaii eWays51 0D ev eways eibadapter startup weblogic examples deployment ME TA INF ejb jar xml ba Go Links So Snagit j Search D EA le
147. source 105 SeeBeyond XA MDBs 102 subscribing to SeeBeyond JMS queue 102 SeeBeyond XA Session Beans 105 verifying XA 109 Sun Microsystems Inc
148. ssage To simulate an XA rollback the remote client can pass in an accountld of rollback in the createAccountAndPublish remote method call The Session Bean prepares to insert the record to the database and prepares to publish to the Sun Microsystems JMS Topic Finally it checks whether the accountld is rollback If it is the Session Bean throws an EJBException or any EJB SystemException so that the container calls rollback on both XA resources When the client calls getBalance passing in an accountld of rollback the client will see that this record is not inserted Moreover eGate does not receive the rollback message ejb jar xml Tag The following is the deployment descriptor for this Session Bean ejb jar xml lt ejb jar gt lt enterprise beans gt lt session gt lt ejb name gt STCXAPublisherSLSessionBean lt ejb name gt lt home gt com stc eways ejb sessionbean xapublisher STCXAPublisherSLSessi onHome lt home gt lt remote gt com stc eways ejb sessionbean xapublisher STCXAPublisherSLSes sion lt remote gt WebLogic eWay Adapter User s Guide 106 Sun Microsystems Inc Chapter 9 Section 9 4 Sun Microsystems Sample Message Driven Beans Sun Microsystems Sample XA Message Driven Beans lt ejb class gt com stc eways ejb sessionbean xapublisher STCXAPublisherSLSessi onBean lt ejb class gt lt session type gt Stateless lt session type gt lt transaction type gt Container lt transaction type gt l
149. stems Inc Web Site on page 10 Documentation Feedback on page 10 11 About WebLogic Application Server WebLogic Server BEA defines WebLogic Server as a fully featured standards based application server providing the foundation on which an enterprise builds its applications More specifically WebLogic Application Server is used to build Web applications that share data and resources with other systems and then generate dynamic information for Web pages and other user interfaces WebLogic Application Server streamlines the process of building distributed scalable highly available systems by offering services that users previously had to write themselves including connectivity business logic re usability security concurrency access is serialized and transactionally using XA to assure a successful transfer update or rollback Other features offered by WebLogic include Object Pooling conserves system resources by placing objects in a pool so that the next request for the object does not require a re allocation of memory WebLogic eWay Adapter User s Guide 7 Sun Microsystems Inc Chapter 1 Section 1 2 Introducing the WebLogic eWay About the WebLogic eWay Thread and Connection Pooling works much the same way as Object Pooling to save memory and connection resources Clustering allows easy movement or distribution of applications to other machines 12 About the WebLogic eWay The WebLogic
150. stems Queues STCQueue2 lt jndi name gt lt resource env description gt lt reference descriptor gt lt jndi name gt SunMicrosystems STCQueueRequestorSLSessionBean lt jndi name gt lt weblogic enterprise bean gt lt weblogic ejb jar gt lt ejb name gt Tag The value for lt ejb name gt must match that defined in ejb jar xml lt pool gt Tag The lt pool gt tag defines the maximum number of Session Beans in the free pool and the initial pool size by using the lt max beans in free pool gt and lt initial beans in free pool gt tags respectively lt jndi name gt Tag The value for the lt jndi name gt tag for the resource name jms QueueConnectionFactory is SunMicrosystems QueueConnectionFactories QueueConnectionFactory The value for the lt jindi name gt tag for the jms Queue entry is SunMicrosystems Queues STCQueue2 These values define the resource reference name to JNDI name mappings The Queue and QueueConnectionFactory must have already been created and registered with JNDI by the startup class See Sun Microsystems WebLogic Startup Class on page 43 for details The container locates these JNDI objects in its own JNDI as specified by the lt initial context factory gt and lt provider url gt WebLogic eWay Adapter User s Guide 100 Sun Microsystems Inc Section 9 3 Chapter 9 Accessing Session Beans Sun Microsystems Sample Message Driven Beans 933 Lazy Loading The following code is
151. storSLSessionBean STCxAPublisherSLSessionBean Ba TopicConnectionFactories TopicConnectionFactory XATopicConnectionF actory a Topics STCTopic1 STCTopic2 STCTopic3 FP waohlanie ea gt Up Sa cae eae ES aS Ss esas 12 From the Navigator pane on the left click on Examples Deployments EJB Click on Configure a new EJB Note Before deploying the EJB make sure that the JMS IQ Manager is running in Enterprise Manager To Deploy the EJB 1 In the left pane of the WebLogic Server Home click open the Deployments node 2 Right click the EJB Deployments node and select Deploy a new EJB Module from the menu WebLogic eWay Adapter User s Guide 57 Sun Microsystems Inc Chapter 6 Section 6 2 Configuring WebLogic Server for Asynchronous Communication Configuration for WebLogic 8 1 3 Select lt BEA Home gt weblogic81 server lib 4 Click the upload your file s link then click Browse and select lt BEA Home gt weblogic81 server lib weblogic ejb example jar With the file selected click Upload 5 Select the uploaded weblogic ejb example jar and click Target Module 6 Select the server instance under Available Servers Click the right arrow to move the new server instance to Target Servers 7 Enter weblogic ejb example as the name for this application EJB 8 Click the Deploy button This installs the EJB on the WebLogic Administration Server WebLogic eWay Adapter User s Guide 58 Sun Microsystems Inc
152. t File eWay revealing the updated balance 833 Setting the Properties Each sample project contains properties accessible either through the File or WebLogic eWay located on the Project Explorer Connectivity Map or from the WebLogic eWay External System located in the Environment To configure the WebLogic eWay properties for your project see Setting Properties of the WebLogic eWay on page 17 834 Configuring the Integration Server You must set your SeeBeyond Integration Server Password property before deploying your Project 1 From the Environment Explorer right click IntegrationSvr1 under your Logical Host and select Properties from the shortcut menu The Integration Server Properties Editor appears 2 Click the Password property field under Sun SeeBeyond Integration Server Configuration An ellipsis appears in the property field 3 Click the ellipsis The Password Settings dialog box appears 4 Enter STC as the Specific Value and as the Confirm Password and click OK WebLogic eWay Adapter User s Guide 78 Sun Microsystems Inc Chapter 8 Section 8 3 Implementing the WebLogic eWay Sample Projects Using the Sample Projects in eGate 5 Click OK to accept the new property and close the Properties Editor For more information on deploying a Project see the Sun SeeBeyond Java Composite Application Platform Suite Deployment Guide 83 5 Creating an Environment Environments include the external systems Logical Host
153. t resource ref gt lt res ref name gt jms XATopicConnectionFactory lt res ref name gt lt res type gt javax jms XATopicConnectionFactory lt res type gt lt res auth gt Container lt res auth gt lt resource ref gt lt resource ref gt lt res ref name gt jdbc demoXAPool lt res ref name gt lt res type gt javax sql DataSource lt res type gt lt res auth gt Container lt res auth gt lt resource ref gt lt resource env ref gt lt resource env ref name gt jms Topic lt resource env ref name gt lt resource env ref type gt javax jms Topic lt resource env ref type gt lt resource env ref gt lt session gt lt enterprise beans gt lt assembly descriptor gt lt container transaction gt lt method gt lt ejb name gt STCXAPublisherSLSessionBean lt ejb name gt lt method name gt createAccountAndPublish lt method name gt lt method gt lt method gt lt ejb name gt STCXAPublisherSLSessionBean lt ejb name gt lt method name gt getBalance lt method name gt lt method gt lt trans attribute gt Required lt trans attribute gt lt container transaction gt lt assembly descriptor gt lt ejb jar gt lt ejb name gt Tag The lt ejb name gt defines the name of the Stateless Session Bean and is used to uniquely identify the Session Bean by the container This name is displayed in the WebLogic Administrative Console to identify this Bean lt ejb class gt Tag The
154. the JMS server and is responsible for copying data from the source event to the output event The STCSubscriberMDBean receives messages from the Topic Sample1 Topic and displays the message it receives to the WebLogic console Figure 55 JMSTopicPublish Sample Components crJMSTopicPublish Topic Sample1 i Collaboration Inbound File Definition Connection Subscriber eWay Java MDB a x Connections x Connection JMS IQ Manager As seen in Figure 55 the Outbound File eWay reads a file containing the input message event Collaboration subscribes to the external data source and then publishes the input message as a Topic Sample1 event to the JMS client properties The JMS eWay Connection is configured to use a JMS Topic acting as a TopicPublisher Both the JMS Connection and the MDB are configured to connect to the JMS IQ Manager as the JMS server The STCSubscriberMDB then receives the message passed to it by the container and displays the message in standard output the WebLogic console WebLogic eWay Adapter User s Guide 88 Sun Microsystems Inc Chapter 8 Section 8 4 Implementing the WebLogic eWay Sample Projects Using the JMS Sample Projects in eGate Note For more information on how to configure deploy the MDB to use the Sun Microsystems JMS IQ Manager to drive the MDB see Sun Microsystems JMS on page 35 3 46 The JMSXAQueueSend Sample JMSXAQueueSend is an outbound sample project that demonstrates how
155. the startup class 8 44 The JMSQueueSend Sample JMSQueueSend is an outbound sample project that demonstrates how to pass messages into a JMS queue asynchronously before ultimately passing into a WebLogic container The Connectivity Map for this sample project appears as follows Figure 52 JMSQueSend Connectivity Map Inbound File eWay JMS client properties Ni re po paoia Fileln crJMSQueueSend1 Queue Samplet In this sample the Inbound File eWay feeds messages to the Queue Queue Sample1 The eWay looks for files with extension qfin as input files the input directory configured is C temp The crJMSQueueSend1 Collaboration subscribes to the external data source and publishes to the Queue The Collaboration is configured to use the internal Sun Microsystems JMS IQ Manager as the JMS server and is responsible for copying data from the source event to the output event The STCReceiverMDBean MDB receives messages from the Queue and displays the receiving message to the WebLogic console Figure 53 JMSQueueSend Sample Components WebLogic Container Queue Sample1 crJMSQueueSend1 Collaboration Definition Java JMS Connection Point STCReceiver MDB Inbound File eWay Connection Connection JMS IQ Manager As seen in Figure 53 the Inbound File reads a file containing the input message event A Collaboration subscribes to the external data source and publishes the input message t
156. til the receiver is ready to process them This can be comparable to a mail message in which mail is sent and forgotten until sometime later when a response is received WebLogic eWay Adapter User s Guide 31 Sun Microsystems Inc Chapter 5 Section 5 1 WebLogic eWay Component Communication Synchronous and Asynchronous Communication Figure 9 Asynchronous Communication Send Signal Reply Reply Asynchronous Communication in eGate Includes WebLogic EJB to eGate JMS Transactions an inbound transaction where the JMS dictates how client applications talk to a Queue and the WebLogic EJBs publish to the eGate JMS IQ Manager For more information see Asynchronous Communication in eGate on page 34 eGate JMS to WebLogic Message Driven Bean Transactions an outbound transaction where the eGate JMS publishes to a WebLogic Application Server Message Driven Bean A Message Driven Bean MDB is a specialized EJB that acts like a trigger which executes whenever there is activity on a specific Queue A message published to eGate s JMS causes an MDB stored in WebLogic to execute For more information see Asynchronous Communication in eGate on page 34 Associated Sample Projects Six sub projects are included in the WebLogic eWay WebLogicJMS zip file to demonstrate Asynchronous message interactions JMSQueueRequestor an inbound example that demonstrates how a remote client requests and receives messa
157. tilizes two XA Resources in order to exhibit a two phase commit or rollback behavior The sample Session Bean uses both the Sun Microsystems JMS XAResource and the demo XA database resource pool See examples dataSource demoXAPool on page 111 for details This Session Bean exposes two remote methods createAccountAndPublish getBalance The createAccountAndPublish method takes two parameters accountld of type java lang String and balance of type double This method inserts a new record into a table of the demo database and publishes a JMS Message to a Sun Microsystems JMS Topic upon successfully inserting the record into the table Both the insert and the publish are treated as a single XA transaction The getBalance method accesses the database and retrieves the balance for the record specified by the account ID passed to the method as argument This method can be used to verify that a particular record has been successfully inserted into the database by the createAccountAndPublish method In fact the remote client tester for this Session Bean does invoke createAccountAndPublish and then invokes the getBalance method immediately after the createAccountAndPublish method invocation returns Upon successful commit of the XA transaction both the insert to the database table and the publish to the Sun Microsystems JMS Topic are committed The getBalance method returns the correct balance and eGate receives the published me
158. tion 6 1 Configuration for WebLogic 7 0 Figure 21 WebLogic Server Console Create a New StartupClass WebLogic Server Console Microsoft Internet Explorer E E i Al 10 x Fie Edit View Favorites Tools Help Bak gt A GQsearch Favorites media lt 4 B S E Address ja CType 3DDomain amp bodyFrameld wl_console_frame_1040243434916 z Cao Links Customize Links Free Hotmail Windows Media Windows Console examples SI servers Clusters E machines EI Network Channels E Deployments E El Applications Ses Slweb Applications Eweb Service Components Connectors E Startup amp Shutdown hello hello_cluster multihello poolReceive Seebeyond_Startup sererReceive startBrowser StopPointBaseServer o services Ecom a Bgc a Gums E messaging Bridge 4 Configuration Connected to localhost 7001 Name Targets ClassName examples gt Startup amp Shutdown gt Seebeyond_Startup p m e Domain examples Dec 18 2002 12 34 26 PM PS Seebeyond_Startup com stc eways weblogic startup Deployment Order fi 000 Arguments T Failure is fatal sbyn wlstartup propsfile C bea weblogic 7005 server lib STCULStartup properties l Run before application deployments gt E Local intranet 7 8 Click on the Targets tab and move the new server instance from Available to Chosen using the arrow button Click Apply 9 Stop and restart the
159. to create in the database and balance is the initial balance of the account to be created s The MDB parses these values separated by the pipe character If a XA commit occurs successfully both the JMS Message receive and the insert into the database get committed To simulate an XA rollback create a JMS Message with an accountld of rollback The MDB throws an EJBException or any EJB SystemException if it sees rollback as the accountld after preparing to insert into the database table Throwing EJBException causes the XA rollback to happen on both the database and the Sun Microsystems JMS Queue Upon rollback the JMS Message is again delivered to the MDB The MDB can t keep any state therefore in order to determine whether the rollback message has been sent again it checks the JMSRedelivered flag on the JMS Message it received If the JMSRedelivered flag is set to true the MDB does not open a connection to the database or throw any exceptions By not throwing an exception on a rollback message that is being resent a one phase commit on the JMS Queue occurs The MDB must check the JMSRedelivered flag in order to prevent indefinite rollbacks ejb jar xml The following is the deployment descriptor for this MDB ejb jar xml lt ejb jar gt lt enterprise beans gt lt message driven gt lt ejb name gt STCXAReceiverMDBean lt ejb name gt lt ejb class gt com stc eways ejb messagebean STCXAReceiverMDBean lt ejb class gt
160. to write protected each component These protected components appear in the Explorer tree with a red padlock in the bottom left corner of each icon Before you can deploy the imported Project the Project s components must first be checked out of Version Control from both the Project Explorer and the Environment Explorer To check out all of the Project s components do the following A From the Project Explorer right click the Project and select Version Control gt Check Out from the shortcut menu The Version Control Check Out dialog box appears B Select Recurse Project to specify all components and click OK C Select the Environment Explorer tab and from the Environment Explorer right click the Project s Environment and select Version Control gt Check Out from the shortcut menu D Select Recurse Environment to specify all components and click OK 2 If your imported Project includes File eWays these must be reconfigured in your Environment prior to deploying the Project To reconfigure your File eWays do the following A From the Environment Explorer tree right click the File External System and select Properties from the shortcut menu The Properties Editor appears B Set the inbound and outbound directory values and click OK The File External System can now accommodate both inbound and outbound eWays WebLogic eWay Adapter User s Guide 14 Sun Microsystems Inc Chapter 2 Section 2 4 Instal
161. torage for example deleting an account from a database or databases 94 Sun Microsystems Sample XA Message Driven Beans A MDB can subscribe to a Sun Microsystems JMS Topic or Queue in an XA transaction If the transaction needs to roll back the message received by the MDB is rolled back and re delivered to the MDB MDB Subscribing to Sun Microsystems JMS Queue Transactionally The MDB subscribes to a single Sun Microsystems JMS Queue This MDB uses Container Managed Transaction Because the WebLogic container optimizes to one phase commit or rollback if only one XA resource is used the MDB must also be configured to use another XA Resource in order to observe a two phase commit or rollback Therefore in addition to the Sun Microsystems JMS XAResource the MDB is also deployed to use the demo XA database resource pool The examples WebLogic Server instance already has a XA database resource pool configured The pool s JNDI name is examples dataSource demoXAPool The MDB references this pool see examples dataSource demoXA Pool on page 111 for more information The MDB expects the JMS TextMessage to contain in its body content a text string that looks like the following WebLogic eWay Adapter User s Guide 102 Sun Microsystems Inc Chapter 9 Section 9 4 Sun Microsystems Sample Message Driven Beans Sun Microsystems Sample XA Message Driven Beans accountId balance where accountld is a String ID for the account
162. tup Class on page 43 for details The container locates these JNDI objects in its own JNDI as specified by the lt initial context factory gt and lt provider url gt Notice that the actual JNDI name for the jdbc demoXAPool resource is examples dataSource demoXA Pool This is the JNDI name of the datasource XA pool that is already created and configured for the examples WebLogic Server when WebLogic is installed Verifying XA At Work XA works transparently when the EJBs are running To observe XA working look at the Sun Microsystems JMS server log When XA works the user sees the XA APIs being called To see the XA APIs being logged write the trace messages to a file The JMS server log should appear something like this 17 49 53 299 JMS I 2676 Session cpp 716 XA prepare for Session sessionid 63737404 transaction txnid 63737405 17 49 53 299 JMS I 2676 SessionManager cpp 694 XAPrepare xid 48801 0005fa80c71858e3d95b 636 6d2e7365656265796f6e642e6a6d732e636c69656e742e53544358415265736 75726365 17 49 53 460 JMS I 2676 Session cpp 775 Session XACommit session sessionid 63737404 transaction txnid 63737438 17 49 53 460 JMS I 2676 SessionManager cpp 710 XACommit xid 48801 0005fa80c71858e3d95b 636 6d2e73 65656265796 f6e642e6a6d732e636c69656e742e53544358415265736 75726365 In addition WebLogic JTA and JMS XA tracing can be turned on by doing the following For WebLogic 7 0 and 8 1 modify startExamplesSer
163. ueRequestor to send and receive a message to and from Sun Microsystems JMS In the following sections there are references to two XML files ejb jar xml and weblogic ejb jar xml These files are used as the Session Bean s deployment descriptor The ejb jar xml deployment descriptor is specified by the EJB 2 0 specification The weblogic ejb jar xml is proprietary to WebLogic Both need to define in order to deploy the MDBs 93 2 SLS Bean Publishing to Sun Microsystems Topic This Stateless Session Bean publishes to a Sun Microsystems JMS Topic It exposes the remote method publish which takes a String as an argument The Session Bean gets the message and publishes the message to a Sun Microsystems JMS Topic ejb jar xml The following is the deployment descriptor for this Session Bean ejb jar xml lt ejb jar gt lt enterprise beans gt lt session gt lt ejb name gt STCPublisherSLSessionBean lt ejb name gt lt home gt com stc eways ejb sessionbean publisher STCPublisherSLSessionHo me lt home gt lt remote gt com stc eways ejb sessionbean publisher STCPublisherSLSession lt remote gt lt ejb class gt com stc eways ejb sessionbean publisher STCPublisherSLSessionBe an lt ejb class gt lt session type gt Stateless lt session type gt lt transaction type gt Bean lt transaction type gt lt resource ref gt lt res ref name gt jms TopicConnectionFactory lt res ref name gt lt res type gt javax jms To
164. ur products installation is complete open the Enterprise Designer and select Update Center from the Tools menu The Update Center Wizard appears 3 For Step 1 of the wizard simply click Next For Step 2 of the wizard click the Add All button to move all installable files to the Include in Install field then click Next For Step 3 of the wizard wait for the modules to download then click Next The wizard s Step 4 window displays the installed modules Review the installed modules and click Finish When prompted restart the IDE Integrated Development Environment to complete the installation WebLogic eWay Adapter User s Guide 12 Sun Microsystems Inc Chapter 2 Section 2 3 Installing the WebLogic eWay ICAN 5 0 Project Migration Procedures After Installation Once you install the eWay it must then be incorporated into a Project before it can perform its intended functions See the eGate Integrator User s Guide for more information on incorporating the eWay into an eGate Project 222 Extracting the Sample Projects The WebLogic eWay includes sample Projects The sample Projects are designed to provide you with a basic understanding of how certain database operations are performed using the eWay Steps to extract the Sample Projects include 1 Click the Documentation tab of the Sun Java Composite Application Platform Suite Installer then click the Add ons tab 2 Click the WebLogic eWay Adapter link Documentatio
165. ust be extracted to a directory before they can be used to create an OTD WebLogic eWay Adapter User s Guide 61 Sun Microsystems Inc Chapter 7 Section 7 1 Using the WebLogic OTD Wizard Creating a WebLogic OTD Figure 28 Select Code Base page Select Home and Remote Interfaces Select Wizard Type Select the directory or jar file containing your EJB class files Note Specify OTD Name specify the root directory above the top level Java package the java Select Code Base package path must be consistent with the directory path Select Interfaces Select Method Arguments ctijarfiles ejb20_basic_beanManaged_clientjar Review Selections Add Remove Back C nete Finish Cancel elp Select Home and Remote Interfaces The Select Home and Remote Interfaces page displays the selected Java Home and Remote Interfaces These fields are automatically populated Both fields include a drop down list that allows you to select the appropriate home and remote interface if more than one choice is available 6 Review the selected Home and Remote Interface fields see Figure 29 WebLogic eWay Adapter User s Guide 62 Sun Microsystems Inc Chapter 7 Section 7 1 Using the WebLogic OTD Wizard Creating a WebLogic OTD Figure 29 Select Home and Remote Interfaces page Select Home and Remote Interfaces Select Wizard Type Select Java classes for Specify OTD Name Select Code Base Home Interface Select
166. vax jms Queue for the resource type respectively These resource references are another level of JNDI indirection They don t specify the actual JNDI names of the JMS objects but rather they are references to the JNDI name So the EJB can reference jms QueueConnectionFactory but does not really care what the actual JNDI name is The actual JNDI names for these references are defined in the weblogic ejb jar xml file WebLogic eWay Adapter User s Guide 99 Sun Microsystems Inc Chapter 9 Section 9 3 Sun Microsystems Sample Message Driven Beans Accessing Session Beans weblogic ejb jar xml In addition to the ejb jar xml file the Session Bean also needs to be included in the weblogic ejb jar xml file lt weblogic ejb jar gt lt weblogic enterprise bean gt lt ejb name gt STCQueueRequestorSLSessionBean lt ejb name gt lt stateless session descriptor gt lt pool gt lt max beans in free pool gt 15 lt max beans in free pool gt lt initial beans in free pool gt 5 lt initial beans in free pool gt lt pool gt lt stateless session descriptor gt lt reference descriptor gt lt resource description gt lt res ref name gt jms QueueConnectionFactory lt res ref name gt lt jndi name gt SunMicrosystems QueueConnectionFactories QueueConnectionFactory lt jndi name gt lt resource description gt lt resource env description gt lt res env ref name gt jms Queue lt res env ref name gt lt jndi name gt SunMicrosy
167. ver cmd at lt BEA HOME gt user_projects lt domain name gt to set the JTA JMS debug flag as follows JAVA_VM Dweblogic Debug weblogic JTAXA Dweblogic Debug DebugJMSXA true or JAVA_OPTIONS Dweblogic Debug weblogic JTAXA Dweblogic Debug DebugJMSXA true WebLogic eWay Adapter User s Guide 109 Sun Microsystems Inc Chapter 9 Sun Microsystems Sample Message Driven Beans Section 9 4 Sun Microsystems Sample XA Message Driven Beans Once these properties are added restart the server JTA and JMS XA tracing is written to the server log which is typically located in a subdirectory with the same name as the server under the current domain in use For example given a server named serv the location would be BEA WebLogic7 user_projects mydomain serv serv log lt Apr 4 20xx 5 49 52 PM PST gt lt Debug gt lt JTA gt lt loca lt 5 f a80c71858e3d95b gt lt 000000 gt lt 5 f a80c71858e3d95b XA start rm com SunMicrosystems jms client STCXAResou xar com SunMicrosystems jms client STCXAResource 82e lt Apr 4 20xx 5 49 52 PM PST gt lt Debug gt lt JTA gt lt loca lt 000000 gt lt ResourceDescriptor com SunMicrosystems jms Number of active requests 1 lt Apr 4 20xx 5 49 52 PM PST gt lt Debug gt lt JTA gt lt loca lt s rm com SunMicrosystems jms client STCXAResource xar com SunMicrosystems jms client STCXAResource 82e lt Apr 4 20xx 5 49 52 PM PST gt lt Debug gt lt JTA gt lt loca lt 5
168. weblogic ejb example jar 5 Start an instance of the application server in this case the user defined domain server 6 When the server has finished booting start the Administration Console Go to Deployments Startup amp Shutdown and click on Configure a New Startup Class see Figure 21 Enter the following Values Name SunMicrosystems_Startup CLASSNAME com stc eways weblogic startup weblogicstartup Deployment Order 1000 default Arguments sbyn wlstartup propsfile lt BEA HOME gt weblogic81 server lib weblogicstartup _properties where lt BEA HOME gt is the home directory of the WebLogic Server 7 Click Create and Apply WebLogic eWay Adapter User s Guide 55 Sun Microsystems Inc Chapter 6 Section 6 2 Configuring WebLogic Server for Asynchronous Communication Configuration for WebLogic 8 1 Figure 24 WebLogic Server Console Create a New StartupClass A WebLogic Server Console Microsoft Internet Explorer File Edit View Favorites Tools Help ay Q ex Q x El KA Search She Favorites Media amp B a lad amp al_console_frame_10753298829558 amp MBean examples 3AName 3Dexamples 2CType 3DDomain V EA So Links Address a alse amp frameId wl_console_frame_1075329882954 amp sidebarFrameId Console 8 examples o A Severs Q examplesServer Clusters E Machines E amp Deployments This page allows you to define the general configuration of this startup class E
169. ystems JMS objects are created and bound to the naming service The startup method takes two parameters that are provided by the server name which is of type java lang String is the name of the startup class args which is of type HashTable contains name value pairs that are passed to the startup as program arguments Both the name and args program arguments are defined when the startup class is deployed in the server using the WebLogic Administrative Console 542 Startup Properties File The startup properties file weblogic startup properties is read by the startup class when the startup method is invoked by the WebLogic Server and is used to configure information about the Sun Microsystems JMS specific information This file consists of name value pairs There are seven sections to this properties file Each name and value in the different sections have different meanings Each section of the default weblogic startup properties file in detail Comment lines in the properties file start with either a or a character Any changes to the startup configuration properties file does not take effect right away The WebLogic Server must be restarted in order for the startup class to get reloaded and for the startup class to read the changes to the configuration file For example if a new Topic or Queue is added the WebLogic Server needs to be restarted weblogic startup properties File Sun Microsystems JNDI

Download Pdf Manuals

image

Related Search

Related Contents

JVC AV-29V514/B User's Manual  USER`S MANUAL TAPE EXTENSOMETER MODEL 98073  MANUALE DI ISTRUZIONE PER SALDATRICE A FILO  Sony RM-AV2100B User's Manual  DEFY HB3708 User's Manual  HALUROCK - Prostage AS    MANUEL D`UTILISATION  

Copyright © All rights reserved.
Failed to retrieve file