Home
Installation and Usage of SBML under JBoss
Contents
1. Note As an alternative to setting up SBMLServer locally the C41 center will installed SBML version 2 5 both SOAP based and RESTful on the machine bml server3 c4i gmu edu for remote requests Because of security concerns bml server3 will only be available on our VPN Please contact help c4i gmu edu to request VPN access We will attempt but do not guarantee to keep this service up and current To build from source will require the installation of NetBeans with JBoss added as a server The SOAP based items are built using Ant while the RESTful items are built using Maven There are libraries included in several of the RESTful items that must be added to you to your local Maven repository before building INSTALLATION INSTRUCTIONS for SBML Server both SOAP based and RESTful 1 System and Software Requirements These instructions assume that the installation will be done on a Linux system We have successfully installed just the SOAP based SBMLServer on a Windows XP system in the past but do not test this type of installation with updates to the server We have used both Fedora release 12 Constantine and CentOS 5 3 and 5 5 as systems for installation and testing but any recent Linux system should work There are several pieces of software required for SBMLServer and SBMLServerREST The following software list gives the version number tested and url for downloading Other version numbers may work as well JBoss SBML 2 5 Installation and Usag
2. SBMLClient_ Contains a sample client application that uses the SBMLClientLib provided class SBMLSubscriberHornetQ Contains a sample PubSub subscriber application that uses the SBMLClientLib provided class formally named SBMLSubscriber in version 2 4 SBMLReplay Contains a sample client application that replays the transactions in a replay log generated by the SOAP based SBMLServer again by using the SBMLClientLib provided class RESTful Sample Code SBML 2 5 Installation and Usage Page 1 SBMLClientREST Contains a sample client to the RESTful version of the SBML server SBMLSubscriberJmsREST Contains a sample PubSub subscriber application using the HornetQ JMS api SBMLSubscriberHornetQREST Contains a sample PubSub subscriber application using the HornetQ REST interface SBMLReplayREST Contains a sample client that replays the transactions in a replay log generated by SBMLServerREST Other subdirectories in the repository are SBMLJars Contains a build of SOAP based items SBMLServer SBMLClientLib SBMLClient SBMLReplay and SBMLSubscriberHornetQ as well as RESTful item SBMLServerREST SBMLHornetQREST SBMLClientREST SBMLReplayREST SBMLSubscriberJmsREST and SBMLSubscriberHornetQREST Translators Contains source for the CSL Condensed Scripting Language compiler The repository also contains this document as well as a CSL programming guide for users that would like to write their own mapping scripts
3. to subscribe to the SBMLTopic used by SBMLServer and SBMLServerREST to publish reports using the HornetQ REST interface you must deploy SBMLHornetQREST war which implements this interface The repository subdirectory SBMLSubscriberHornetQREST is an example of how to use the HornetQ REST interface to subscribe using only an HTTP client library Subscribing in this way is available to a client written in any language that has access to an HTTP client library 10 Start jboss Execute JBOSS_ HOME bin run sh b 0 0 0 0 c default with hornetq 11 Use sample code to access both versions of the SBML server See the next Usage section for more information on accessing SBMLServer and SBMLServerREST services Testing and Usage After SBMLServer and SBMLServerREST are installed and started this section describes how to test and use these web services Usage Included with the SBML repository in the SBMLJars SBMLClient dist directory is a sample test client SBMLClient jar to access the SOAP based SBML server In SBMLJars SBMLClientREST is a sample test client target SBMLClientREST 1 0 jar with dependencies jar to access the RESTful SBML server In both SBMLClient Sample Inputs input and SBMLClientREST src main scripts input there are a set of IBML and C_BML test input files In SBML 2 5 Installation and Usage Page 7 both SBMLClient Sample Inputs output and SBMLClientREST src main scripts output are the corresponding sets of ex
4. Edit the configuration file so that the netty connector has its host set to machine that has JBoss installed If you have made local updates to hornetq jms xml you may have to merge the two files The provided hornetq configuration xml file disables security roles and provides a possible password for cluster administration c Copy mysql JDBC connector mysql connector java 5 1 6 bin jar found in SBMLServerLib setup to SJBOSS_HOME server default with hornetq lib d Copy jboss log4j xml from SBMLServerLib setup to SJBOSS_HOME server default with hornetq conf If you have made updates to the log4j configuration file you may have to merge the copy supplied with your local copy 7 SBMLServer deployment SBML 2 5 Installation and Usage Page 6 a b 8 a b 9 For the SOAP based version of the server copy SBMLServer jar from SBMLars or build another copy of SBMLServer jar from source to JBOSS_HOME server default with hornetq deploy Copy sbml properties with any local configuration updates from SBMLServer setup to SJBOSS_HOME server default with hornetq conf SBMLServerREST deployment For the RESTful version of the server copy SBMLServerREST ear from SBMLJars or build from source to SJBOSS_HOME server default with hornetq deploy Copy sbmlrest properties with any local configuration updates from SBMLServerREST ear setup to SJBOSS_HOME server default with hornetq conf SBMLHornetQREST war deployment If you would like
5. Installation and Usage of SBML 2 5 Installation General Information on the SBML Server can be accessed via the URL http netlab gmu edu OpenBML SBML source code can be found in the SVN repository linked to by the OpenBML website Version 2 5 is in the repository subdirectory SBMLWS trunk This is the most recent version of SBMLServer and is still in development Previous stable versions of SBMLServer can be found in the repository subdirectory SBMLWS branches The main enhancement for version 2 5 was the addition of a RESTful version of SBMLServer along with sample clients This change requires configuring JBoss to use HornetQ for messaging The new repository items with version 2 5 are listed in bold below The main subdirectories of the repository are SBMLServer Contains the SOAP based server code SBMLServerREST Contains the RESTful version of the server SBMLServerLib Contains the routines and setup files that are used by both the SOAP based and RESTful server SBML_ HOME Contains scripts configuration files and schemas SBMLHornetQREST Contains the web application that provides the HornetQ REST interface In addition there is sample code on how to interact with the SOAP based and RESTful server The subdirectories of the repository with this sample code are SOAP Based Sample Code SBMLClientLib Contains a convenience class that can be used by java client applications to interact with the SOAP based server
6. SBMLServer or SBMLServerREST You would run the subscriber code with the following command java jar lt subscriber jar gt lt ip addr of SBMLServer gt Testing As mentioned before in the SBMLClient Sample Input input and SBMLClientREST src main scripts input directories are a set of sample input xml using IBML and C_BML that can be used for testing and illustrate the type of requests that can be made of SBMLServer and SBMLServerREST Test XML Description IBML NewUnitType xml Add new unit types IBML NewUnit xml Add new units IBML ListWhoAll xml Retrieve information on all units IBML ListWho xml Retrieve information on a particular unit IBML SampleOrderPush1 xml Push a ground order SBML 2 5 Installation and Usage Page 8 IBML SampleOrderPull xml Retrieve a ground order IBML SamplePositionStatusReportPush xml Push a Position Status report IBML SampleGeneralStatusReportPush xml Push a General Status report IBML SampleSpotReportPush xml Push a Spot report IBML SampleBridgeReportPush xml Push a Bridge report IBML SampleMinefieldReportPush xml Push a Minefield Obstacle report IBML SampleTrackReportPush xml Push a Air Track report IBML ReportInfoPull xml Retrieve list of latest reports IBML ReportPull xml Retrieve a particular report C_BML SamplelBMLOrderPush xml Push an IBML order with C_BML components including a lt Task g
7. e Page 2 version 4 2 3 http www jboss org jbossas downloads Java SE Version 1 6 0_18 http www oracle com technetwork java javase downloads index html Ant version 1 7 1 http archive apache org dist ant binaries needed for JBossWS installation and building from source JBossWS version 3 0 5 http www jboss org jbossws downloads MySQL Community Server version 14 14 distribution 5 1 47 http dev mysql com downloads mysql 5 1 html downloads HornetQ version 2 1 1 Final http www jboss org hornetq downloads also see http community jboss org thread 154727 tstart 0 to fix error in jca resource adaptor after installation RESTEasy version 2 0 1 GA http sourceforge net projects resteasy files Resteasy 20JAX RS 2 0 1 GA does not need to be installed required RESTEasy libraries are supplied with included builds HornetQ REST Interface version 1 0 beta 3 http sourceforge net projects resteasy files HornetQ 20REST 20Interface war file that implements the interface is provided in the repository and must be copied to the default with hornetq deploy directory interface only needed for subscriptions using the HornetQ REST Interface as illustrated in the SBMLSubscriberHornetQREST sample code 2 Build Database jc3iedm_sbml used by both SBML servers Obtain the database initialization script jc3iedm_init sql from the SBML repository under SBMLServerLib setup Assuming that the database does no
8. erties will need to be set for this environment SBMLHome points to the location of the SBML_HOME directory copied in a previous step Note that there must be separate SBML_HOME directories for SBMLServer and SBMLServerREST dbURL Contains the name of the host where the database server is located dbUname The name of a MySQL account configured with rights on the database SBML 2 5 Installation and Usage Page 4 dbPwd The database password for dbUname Note The MySQL root account cannot be used remotely There are many other properties that can be set through the properties file summarizes them The following table Property Description Valid Req d Default values SBMLHome Absolute path to the Yes none SBML_HOME directory that contains scripts csl and xml scripting schema namespace mappings and IBML schemas nsMappingFileName Filename of namespace No NSMapping xml prefix to URI mapping file within SBMLHome schemaDirectory Directory that contains IBML No schema schemas within SBMLHome CSLDirectory Directory that contains CSL No CSL_Scripts scripts within SBMLHome replayLog Generation of replay log yn No n Validate Validation of input BML yn No n testMode Testing mode for scripting yn No n changes csl scripts are re compiled with every request riActive Requests to the RI available yn No n jc3Host IP address of the RI Yes jc3Port Por
9. ntation for RESTEasy and HornetQ HornetQ 2 1 Quick Start Guide http hornetq sourceforge net docs hornetq 2 1 0 Final quickstart guide en html_ single index html HornetQ 2 1 User Manual http hornetg sourceforge net docs hornetq 2 1 0 Final user manual en html single index html RESTEasy JAX RS RESTful Web Services for Java 2 0 1 GA http docs jboss org resteasy docs 2 0 0 GA userguide html single index html HornetQ REST Interface 1 0 beta 3 SBML 2 5 Installation and Usage Page 10
10. pected output These sample test clients take four input parameters at execution location of SBML server input bml xml domain and type of bml To run either of these clients enter the following command java jar lt client jar gt lt ip of SBMLServer gt lt input xml gt lt domain gt lt bml type gt The lt input xml gt is expected to adhere to the schemas provided in SSBML_HOME schema For lt domain gt the options are DB or RI case insensitive For the publically available version of SBML server the RI domain is disabled For lt bml type gt the options are IBML or C_BML also case insensitive The C_BML option is based on light mappings in the January 2011 Trial Use package and only currently implements a push and pull of a lt Task gt Also included in the SBMLJars directory is a build of the sample subscriber SBMLSubscriberHornetQ to the SOAP based SBML server Under SBMLSubscriberJmsREST and SBMLSubscriberHornetQREST are builds of two sample subscribers to the RESTful SBML server SBMLSubscriberJmsREST uses the HornetQ JMS api to create subscriptions while SBMLSubscriberHornetQREST uses a HTTP client library and the HornetQ REST Interface to create subscriptions SBMLSubscriberJmsREST could only be written in Java while SBMLSubscriberHornetQREST could be written in any language that has access to a HTTP client library This sample codes take one input parameter which specifies the location of
11. t with an lt AtWhere gt C_BML SamplelIBMLOrderPush2 xml Push an IBML order with C_BML components with multiple lt Task gt s includeing an lt AtWhere gt and a lt RouteWhere gt C_BML SamplelIBMLOrderPull xml Pull an IBML order with C_BML components that includes a single lt Task gt C_BML SamplelBMLOrderPull2 xml Pull an IBML order with C_BML components that include multiple lt Task gt s Note There is not a sample IBML air order included Differentiating between different types of orders for past versions of SBMLServer required adding additional columns to JC3IEDM tables Script changes that do not rely on these extra columns are not yet complete After initializing the MSG database you can test your installation by running each of these sample input xml files in the order presented in the above table and comparing to the expected output which is located in SBMLClient Sample Input output or SBMLClientREST src main scripts output A python test script is provided in SBMLClient Sample Inputs scripts run_al SBMLClientREST src main scripts run_all ll_tests py and _tests py to make this testing more automatic Note this python script has run successfully on Linux with python 2 6 2 but is untested on other operating systems Torun this script enter python run_all_tests py atthe shell prompt After the script has finished please check the file SBMLClient dist diffResults
12. t already exist build the database by entering mysql u root lt jc3iedm_ init sql SBML 2 5 Installation and Usage Page 3 Note This assumes the database root password is blank If access to database is needed from another system set up permissions for remote access 3 Setup SBML HOME Copy the SBML_HOME Directory onto the machine that will run SBMLServer and or SBMLServerREST Make sure that jboss has access privileges to SBML_HOME since the CSL compiler output will be written to this directory Note that you will need to have two copies of SBML_HOME if you plan to deploy both SBMLServer and SBMLServerREST 4 Set Environment Variables For example using the bash shell export JAVA_HOME jdk export JBOSS HOME jboss 4 2 3 GA 5 Setup sbml properties and or sbmlrest properties Located in SBMLServer setup is the sample properties file soml properties There is a corresponding properties file in SBMLServerREST ear setup named sbmirest properties These property files are read during initialization of SBMLServer and SBMLServerREST and should be copied to SJBOSS_HOME server default with hornetq conf before deploying SBMLServer or SBMLServerREST The following shows a typical properties file Ht Configuration file for SBML web service Ht SBMLHome yourdir SBML HOME SQL Database dbActive y dbURL jdbc mysql dbhost jc3iedm_ sbml dbUname db_acct_name dbPwd db_pwd pubsubActive y The following prop
13. t for SBMLServer to talk Yes to the RI jc3CbPort Call back port from the RI to Yest SBMLServer riLocal Use a local interface to the RI yn No n SBML 2 5 Installation and Usage Page 5 riLocal Use a local interface to the RI yn No n rather than JBoss remoting dbActive Requests to the local MSG yn No y database available dbURL URL of the MSG database Yes none dbUname MySQL user name Yes none dbPwd MySQL password for the Yes none dbUname specified pubsubActive Subscription to published yn No n ilabl jc3Host jc3Port and jc3CbPort are only required properties when riActive y dbURL dbUname and dbPwd are only required properties when dbActive y x not available with publically available version of SBMLServer Note Either riActive or dbActive or both must be set to y for SBMLServer to process requests 6 Server Deployment a Copy hornetq jms xml from the repository SBMLServerLib setup to SJBOSS_HOME server default with hornetq deploy hornetq sar If you have made local updates to hornetq jms xml you may have to merge the two files The SBML servers are dependent on the definition of the topic SBMLTopic and entry name of the NettyConnection factory defined within the repository version of hornetq jms xml b Copy hornetq configuration xml from the repository SBMLServerLib setup to SJBOSS_HOME server default with hornetq deploy hornetq sar
14. txt or SBMLClientREST target diffResults txt to make sure there were no differences with the expected output an empty file means that the tests ran successfully When executing the SBMLSubscriberHornetQ subscriber code expect output similar to the following Begin Subscriber Connecting to localhost InitialContext created SBML 2 5 Installation and Usage Page 9 Subscribing to allPSR with search TypeOfReport PositionStatusReport Subscribing to allGSR with search TypeOfReport GeneralStatusReport Subscribing to allSIMCI with search contains name REP Waiting for messages When the subscriber detects a new report expect the output to be similar to 1 2011 41 23 10 41 51 BMLType IBML Sent Wed Mar 23 10 41 51 EDT 2011 sgSelector allPSR RootNode BMLREPORT Date FirstReportID ReportType PositionStatusReport Reporter 1 675 Executer 1 675 2 2011 41 23 10 41 51 BMLType IBML Sent Wed Mar 23 10 41 51 EDT 2011 sgSelector allSIMCI RootNode BMLREPORT Date FirstReportID ReportType PositionStatusReport Reporter 1 675 Executer 1 675 The output for SBMLSubscriberJmsREST and SBMLSubscriberHornetQREST is very similar Note that there is just one topic named SBMLTopic that is currently shared between SBMLServer and SBMLServerREST Any subscriber will get messages published from either SBML server In the future this could change On line Docume
Download Pdf Manuals
Related Search
Related Contents
dynamics Bedienungsanleitung Remote Alarm II Frequently Asked Questions TP-Link TL-WR1043ND V1 Declaration of Conformity Copyright © All rights reserved.
Failed to retrieve file