Вы находитесь на странице: 1из 66

A TIBCO BusinessWorks-based file gateway Part 1

02JAN

4 Votes

RE I!IO" #$1%
Change 1: The following changes have been made to the ParseAndTransform process. - Add 2 o tp t parameter to the process. The! are config red as the inp t parameter of the "#nd$ activit! of the process. % empColl & This element contains a cop! of the empAcc m lator process variable % o tp t'ile(ame & This element contains the o tp t filename to be sed b! the downstream file writer activit!. The reason behind this design decision is that when a new data model o tp t is re) ired* a new s b-process will be created b! the developer and deplo!ed into the +, engine. -ifferent ParseAndTransfor process responsible to prod ce different data model based on different .sd will ca se a different /01 file name to be written b! the downstream writer activit!. #.ample: ParseAndTransform s b-process will have its o tp t writen to a file called Cons mer///2ni) e3-..ml. ParseAndTransform will have its o tp t written to a file called Cons mer4442ni) e3-..ml. These o tp t filename will event all! be p blished to interested parties. Change 2: #mplo!ee-ata'ormat 5-ata 'ormat6 has been pdated to contain "Comple. #lement$ rather than "/01 #lement 7eference$ to demonstrate the difference between the data model of the original inp t file and the desired o t file 5emplo!ees .sd6. The -ata 'ormat defines the C8V file to contain the following fields lastname*fistname*emp( m*hire-ate*department*manager 9999999999999999999999+een b s! with wor: and done heaps of catch p with the T3+C; 8;A platform. Came bac: from the T3+C; (;, seminar in 0elbo rne and got a good pict re of what to e.pect from T3+C; prod ct roadmap. 3 have to sa! T3+C;$s platform is nimble. The! reall! :now how to do integration and have learned a lot from their c stomers in specific verticals. + t that is from a helicopter view. ;<* let$s start. This article is a part of the series of articles target to describe cr de "reference implementation$ of 'ile =atewa! pattern in the boo: >8;A -esign Patterns? b! Thomas #rl.

This article e.plains the steps to create a file gatewa! that perform the following tas:s. 16 A legac! s!stem writes a batch flat-file into an inbo nd folder 26 The parser-transformer component polls and retrieve the flat file @6 The parser-transformer parses the data and performs data format transformation 46 The parser-transformer optionall! performs data model transformation A6 The parser-transformer writes file to an o tbo nd folder B6 The parser-transformer optionall! broadcastsCtriggers an event that a file is read! for cons mption To help !o vis alise what we are abo t to b ild* refer to this end-state.

The final product


- e to the width and depth covered in this topic* this article is split into 4 parts. The first part tal:s abo t how to create a T3+C;-+, process definition to parse and transform data models. 3n the second part we will be e.tending the parser-transformer process to write the res ltant file into the o tbo nd folder. ,e will also implement fo r more global variables to enable config ration of inbo nd file path* o tbo nd file path* semaphore file e.tension as well as the file pattern to watch. The third part of this article will describe the steps to create a simple file poller process and invocation of the parser-transformer process.

The fo rth part of this article will loo: at testing and deplo!ment of this gatewa! into the T3+C; +, infrastr ct re* some performance t ning and monitoring sing T3+C; Daw: agents. 3n the roadmap* one wo ld hope to haveCbe able to interact with the following capabilities: 16 P blish transformation completion events to the interested parties 5t!picall! the cons mers* can also be the legac! providers provided the! are capable of listening to events6 26 Pl ggable architect re of schema specific parsersCtransformation engines* effectivel! s pporting one so rce m ltiple target se. @6 1oad balancing via T3+C; infrastr ct res 46 8ervice call-bac: 5pattern6 A6 Protocol bridging 5pattern6 B6 8chema Centralisation 5pattern6 ,e will disc ss the appropriateness of item 4* A E B when time permits. The writing of this article is nrehearsed. 3t ma! and will contain errors and inacc racies* both technicall! and organisationall!. 4o r comments and corrections are ver! welcomed. Dere goes the first part. +egin with the ends in mindFhere is what we will get at the end of this article.

16 Create the following folders str ct re in the file s!stem. This file s!stem is a location to e.change inbo nd and o tbo nd files. 3t can be a folder in an ftp server or a mappable folder on the (A8.

The inbo nd folder is for incoming files* s all! file d mps performed b! the legac! s!stem. Corresponding semaphore files will also transientl! e.ist in this folder. The o tbo nd folder* on the other hand* holds the parsed and transformed files for the targeted cons mers. 26 Create a /01 schema that defines the data str ct re to be handled b! the parserCtransformer process. ,e created the schema sing ;racle G-eveloper* based on the #0P table from the 8C;TT schema. 3

have to admit that this tool* li:e man! other commercial /01 tools* provides better ser e.perience thro gh the adoption of widel! accepted vis al paradigm.

@6 Create a new T3+C; -esigner proHect. 1a nch the T3+C; -esigner. Create a new empt! proHect* name it as 'ile=atewa!.

46 Create a new folder to contain o r + siness,or:s process. To create a new folder* right clic: on the root node in the ProHect Panel of the T3+C; -esigner* select the "(ew 'older$ men item* and a new folder with a defa lt name "'older$ will be added. 7ename the folder to "ParseAndTransform$ directl! in the Config ration Panel.

A6 3mport the schema of the data model o tp t e.pected from this process. This schema will be referenced m ltiple times thro gho t the entire process definition. (otabl! in the definition of -ata 'ormat* Parse -ata and other activities. To import the schema we have created in 8tep 2* ma:e s re the ParseAndTransform folder is selected. 2nder the ProHect men * select "3mport 7eso rces from 'ile* 'older* 271F$.

3n the "3mport 7eso rce of 'ileF$ dialog e bo.* select the "'ile 5..sd* ..slt* .wsdl* .I6$ as the 'ormat.

3n the "'ile:$ field* clic: on the binoc lar icon to browse for !o r schema file. ; r file is named emplo!ees..sd. 4o sho ld now have a schema appearing on the -esigner Panel.

-o ble-clic: the schema icon* !o can inspect the schema thro gh T3+C; -esigner$s schema editor. Clic: the ";verview$ b tton on top to see the schema overview. ,e are not going to ma:e an! changes thro gh this editor thro gho t this proHect.

B6 ; r parser will need to :now how to parse the C8V. This step involve the process of defining an activit! call "-ata 'ormat$. G st as one wo ld do when importing a C8V file into 08 #.cel* we will define the format* the delimiter character* the #;1 character and other characteristic of the inp t flat file. +ac: to the ParseAndTransform folder* in the -esigner Panel* right-clic: and select "Add 7eso rce$ J Parse J "-ata 'ormat$ s b-men item.

7ename the activit! to "#mplo!ee-ata'ormat$ and clic: "Appl!$.

3n the config ration panel* clic: on the "-ata 'ormat$ tab* we will specif! the content t!pe as "Comple. #lement$. Clic: on the "K$ b tton* a defa lt "root$ element will be added. 7ename it to "emp$. -efine the children elements as shown in the pict re below.

Clic: the "Appl!$ b tton to commit !o r changes. +efore we process f rther* let$s loo: at what we have done. ,e have - Created a /01 schema sing o r preferred /01 a thoring tool. ,e called that schema "emplo!ees..sd$. 3t contains 2 comple. t!pes and 2 elements. - Created an empt! T3+C; -esigner proHect called 'ile=atewa!. - Create a new folder called ParseAndTransform in the 'ile=atewa! proHect. - 3mported the "emplo!ees..sd$ schema into the ParseAndTransform folder - Created a -ata 'ormat that references the emplo!ees..sd* we called this -ata 'ormat "#mplo!ee-ata'ormat$. 3n the ne.t step we will create a process definition that will perform the following tas:s. - Ta:es an inp t that contains filename information from an e.ternal process. - Parses the inbo nd file 5Parse -ata activit!6 - Constr cts the emplo!ees collection from the parsed records 50apper activit!6 - 2pdates a process variable that acts as acc m lator 5Assign activit!6

This process definition will be b ilt with the following capabilities: - Config rable n mber of records to be gro ped for reso rce optimisationCt ning L6 Add a new process nder the ParseAndTransform folder. Clic: on the ParseAndTransform node on the ProHect Panel. ;ne the -esigner Panel* right clic: and select the Process J Process -efinition s b-men item.

A new process definition with a defa lt name "Process -efinition$ will be added. 7ename the process definition to "ParseAndTransform$ directl! in the Config ration Panel.

-efine a process variable to act as an acc m lator of emplo!ee records.

M6 2p to this stage* we have an empt! process definition. This process will not poll the file s!stem* the polling part will be performed b! the parent process* or even a separate component* depends on o r designN instead* this process ta:es an inp t that specifies the f ll! ) alified filename to be parsed. 3n this step* we need to specif! the inp t parameter* and we will define this at the "8tart$ activit! of the process definition. -o ble clic: on the ParseAndTransform process definition icon in the -esigner Panel.

Clic: on the "8tart$ activit! icon* in the Config ration Panel* clic: on the "; tp t #ditor$ tab. Clic: the "K$ sign nder the "; tp t #ditor$ tab and name that parameter as "inbo nd'ile(ame$. 8pecif! the Content as "#lement of T!pe$ and the T!pe as "8tring$. Clic: the "Appl!$ b tton to ma:e the changes effective. (ote: This tab is called "; tp t #ditor$ beca se it allows one to specif! the o tp t that will be available to all downstream activities. This "o tp t$ parameter will appear as "inp t$ parameter when the entire process is reference from another activit! or process. ,e will see how this wor:s in the coming steps. O6 -efine a global variable called CD2(<P83Q# of t!pe integer. This variable will be referenced in the "=ro p$ for gro ping of records for processing. This val e of this variable can be config red in the T3+C; Administrator console d ring the deplo!ment and possibl! wo ld be sef l for performance t rning. To define a global variable* clic: on the =lobal Variables panel. Clic: on the pencil icon to open the Advanced #ditor. Clic: the "abc$ icon at the bottom of the =lobal Variables pop- p window and name that variable as "CD2(<P83Q#$ of t!pe 3nteger. Assign it a defa lt val e of "@$.

,e shall see the newl! created variable appear in the =lobal Variables list together with other pre-defined variables. 1R6 Add the necessar! activities into the process definition. Add the "Parse -ata$ activit!. -o ble clic: on the ParseAndTransform process definition* in the -esigner Panel* right-clic: on the white space area to insert a Parse -ata activit!.

7ename the Parse -ata activit! to "Parse#mpsC8V$. 3n the config ration tab of config ration panel for Parse#mpsC8V activit!* clic: on the binoc lar icon to select the -ata 'ormat created earlier.

Clic: ;<. ,hen bac: to the config ration tab* ens re the "3np t T!pe$ field is specified as "'ile$. Clic: "Appl!$ and save the proHect. 116 ,ire the "8tart$ and "Parse#mpsC8V$ activities together. 7ight clic: on the "8tart$ activit! to select "Create 8ingle Transition$ men item. (ote that the c rsor pointer changes to a hairline "K$.

-rag a line from "8tart$ to "Parse#mpsC8V$ activities to represent the direction of the transition. At this stage* there is no config ration re) ired for this transition line.

Clic: on the Parse#mpsC8V activit! to contin e wor:ing on it. 3n the config ration tab* clic: on the binoc lar icon to pic: the re) ired -ata 'ormat.

Clic: ;<. 3n the 3np t T!pe* select "'ile$ from the dropdown bo..

Clic: on the inp t tab* map the inp t fields with the re) ired process data. Two val es are re) ired. The first one* is the filename which will be mapped to the "inbo nd'ile(ame$ of the 8tart activit!. The second inp t* no;f7ecords* will be mapped to the CD2(<P83Q# defined as the process variable earlier.

#nter a literal 0 into the 8:ipDeaderCharacters field as o t C8V file starts from the first col mn. The ne.t activit! in the process will be the 0apper activit!. This activit! in o r process will perform 2 f nctions. 'irst* it acts as a mapper to map the o tp t of the Parse -ata activit! into the final form. The second f nction which is e) all! important is that it will perform the "acc m lation$ of the emplo!ee records in ever! iteration of the gro p 5will be disc ssed later6 it operates in. 126 Add a 0apper activit!* name it as + ild#mpsColl. 7ight clic: on the -esigner Panel to add a 0apper activit! located nder "=eneral Activities$ men .

Create a transition from Parse#mpsC8V into + ild#mpsColl. 3n the inp t editor tab* define the inp t parameter that this activit! will ta:e.

3n the inp t tab* we need to map 2 inp ts from the process data into one emplo!ee collection. ;ne of the process data is the o tp t of Parse#mpsC8V activit!* the other is the empAcc m lator process variable. Parsed res lt from ever! iteration will be acc m lated in empAcc m lator process variable. 7ight clic: on the emp element in the Activit! 3np t pane and select "- plicate$

To map the process data* e.pand SempAcc m lator in the process data pane and drag the child node 5empColl6 into the first cop! of emp in the Activit! 3np t pane.

3n the dialog e bo.* select "0a:e a cop! of each "emp$$

7epeat the same for the o tp t of Parse#mpsC8V activit!.

3n the dialog e bo.* select the "'or eachF$ option.

Clic: the "(e.t$ b tton.

(ote that onl! 2 fields are a tomaticall! mapped. This is beca se the so rce file 5flat file6 contain different data model and even the field name are not all the same. ,e will need to man all! map the rest.

0apper is a powerf l activit! that can perform man! transformation tas:s. 3n the above e.ample* the incoming C8V file contains 2 col mns for a name* i.e. first name and last name. The o tp t file 5the .sd schema6 has onl! one element called ename* so we need to concat the fields into one. This of co rse depends on the re) irement. 7efer to the T3+C; doc mentation for more details and e.amples. (ow we need to pdate the acc m lator with this new val e. ,e se the "Assign$ activit! for that. 1@6 Add a "Assign$ activit! to the process. Assign activit! is nder the "=eneral Activities$ palette. (ame the activit! "2pdateProcessVar$. The process variable to pdate is empAcc m lator. Create the re) ired transition* incl ding the one that transition to the "#nd$ activit!. 3n the inp t tab* map the entire empColl into the process variable.

,hen as:ed* H st specif! >select "0a:e a cop! of each "empColl$?. 2p to now* o r process definition loo:s li:e this.

,e are getting there. The ne.t step is to wrap all the activities into a gro p so that iteration can be performed based on gro p of records. This approach is optional* b t will become visibl! important when the file siTe being processed is large* s ch as 1=+ or even 2=+. 146 =ro p the activities. 8elect the activities that we want to gro p. Parse#mpsC8V* + ild#mpsColl and 2pdateProcessVar. 0 lti select can be performed b! holding down the control :e! while selecting. Clic: the "Create a gro p$ icon on the tool bar.

1A6 Config re the gro p. 8elect the created gro p* in the config ration tab* select "7epeat-2ntil-Tr e$ as the gro p action. #nter "i$ as the inde. name and se the following /Path e.pression as the condition to stop the iteration.

$ParseEmpsCSV/Output/EOF = string((true()))
The e.pression will ca se the iteration to e.it when the parser 5Parse#mpsC8V6 enco nters the #;' character in the inp t file.

1B6 -efine the process o tp t at the "#nd$ activit!. Clic: on the "#nd$ activit!. 3n the "3np t #ditor$ tab* add the following elements nder a defa lt root schema called "gro p$. 4o can choose other name for this root schema* 3 wo ld H st accept the defa lt name "gro p$.

3n the "3np t$ tab* drag the SempAcc m lator process variable into the empColl element in the Activit! 3np t pane. This will be o t process o tp t. This o tp t will be sed b! the downstream writer to create the /01 file. Paste the following /Path form la into the "o tp t'ile(ame$ element.

concat('EMP-OUT !-'" ti#$%ormat-&ateTime('''''MM&&-((-mm-ss'" current-&ateTime())")*+M,))


The first part of the o tp t filename is hardcoded for the sa:e of simplicit!. This is not critical as the filename convention is specific to this partic lar implementation of ParseAndTransform process.

,ell* that is part 1.

A TIBCO BusinessWorks-based file gateway Part &


02JAN

2 Votes

3n the previo s article* we went thro gh the steps to create a T3+C; +, process that parses a flat C8V file and transforms the data format from C8V to /01. Along the process we also transformed the data model* concatenating the firstname and lastname fields into a single element specified in the emplo!ee..sd.

This article adds a file poller process with 7ender /01 activit! and sets p a few global variables for config rations. At the end of this article* we will have something li:e this.

'or now* the following are config rable: 3nbo nd director!: -ir3nbo nd'older 5defa lt to "c:UfgwUinbo ndU$6 ; tbo nd director!: -ir; tbo nd'older 5defa lt to "c:UfgwUo tbo ndU$6 8emaphore file e.tension: 3nbo nd8emaphore#.t 5defa lt to "done$6 8emaphore e.tension separator: 3nbo nd8emaphore#.t8eparator 5defa lt to ".$6 8earch pattern: 3nbo nd8emaphorePattern 5defa lt to "I$6

8teps This article ass mes that !o alread! :new how to perform basic tas:s in T3+C; -esigner. 16 Add a new folder nder the 'ile=atewa! root folder. 26 Add a new process definition with a name Poll#mpsC8V @6 -o ble-clic: the newl! created process definition. Add a 'ile Poller activit! into the process. (ote that the original "8tart$ activit! is now replaced b! the 'ile Poller activit!. 46 Config re the 'ile Poller activit!. 3n the Config ration tab* paste the following string into the 'ile (ame field:

--.ir/n#oun&Fo0&er----/n#oun&Semap1orePattern---/n#oun&Semap1oreE2tSeparator----/n#oun&Semap1oreE2t-The global variable name s rro nded b! do ble V signs will be resolved d ring r n time.

3n the Advanced tab:

A6 #.pand the ParseAndTransform folder in the ProHect Panel. -rag the "ParseAndTransform$ process into the Poll#mpsC8V process. ,ire the Poll- mpCompletion activit!* ParseAndTransform process and the #nd activit! in the following order.

B6 An inp t parameter has alread! been defined earlier in the "8tart$ activit! of the ParseAndTransform process. This parameter holds the f ll! ) alified name of the file to be parsed b! the parser. ,hile the Poller activit! polls for the semaphore file* we will need to constr ct the filename re) ired. This step ass mes that the semaphore file witho t the e.tension is the filename to be processed. 3n the inp t tab of ParseAndTransform s b-process* clic: on the pencil icon to bring p the /Path editor.

Paste the following /Path form la into the form la pane.

ti#$su#string-#e%ore0ast($Po00.umpComp0etion/ns$E3entSourceOuput4oContentC0ass/%i0e/n%o /%u004ame"string-

0engt1($5g0o#a0Varia#0es/p%2$60o#a0Varia#0es//n#oun&Semap1oreE2tSep arator) 7 string0engt1($5g0o#a0Varia#0es/p%2$60o#a0Varia#0es//n#oun&Semap1oreE2t))


The above /Path form la ret rns the filename re) ired b! the Parse#mpsC8V activit! inside the s bprocess. 3f the semaphore filename is c:UfgwUinbo ndUempRR1.t.t.done then the inp t filename to the parser activit! will be c:UfgwUinbo ndUempRR1.t.t There are different wa!s to implement semaphore. Another alternative is to rename the so rce file when the transferCfile creation b! the legac! s!stem has completed. 8emaphore is re) ired when writing large file that ta:es time to complete. This is to avoid the process from reading an incomplete file. L6 The ParseAndTransform s b-process provides 2 o tp t elements in its o tp t schema defined in its "#nd$ activit!. 7efer step 1@ of part 1 of this article. Add a render /01 activit! followed b! a write file activit!. The write file activit! will se the filename specified in the "o tp t'ile(ame$ element of the ParseAndTransform o tp t schema. M6 'or the sa:e of simplicit!* add a "Catch$ activit! that catches all nhandled e.ceptions.

The final process loo:s li:e this.

A TIBCO BusinessWorks-based file gateway Part '


02JAN

1 Vote

Publis(ing an e)ent to TIBCO E*! to+i, fro- BusinessWorks$

,e will loo: at the mechanism to p blish the file processing completion events from the 'ile=atewa!. The following se case describes the flow. Trigger: 'ile=atewa! finished writing the /01 file to the o tbo nd folder. 'low: 1. 'ile=atewa! p blishes event to '=,.'31#7#A-4 topic. 2. #nd of se case.

W(at we need
A target topic ,e have config red the T3+C; #08 to address part of this re) irement. 7efer to this article for details of setting p the topic* ser and access control list. An .ml schema for event message This schema is sed b! both the prod cer and the cons mer of the event message. The T3+C; + siness,or:s G08 P blish activit! will p blish the message according to this schema and the cons mer will reference this schema when parsing the message. As s al* create the schema sing !o r favorite .ml tool. Dere is the completed schema. view plaincop! to clipboardprintW 1. XW.ml versionY?1.RZ encodingY?2T'-MZW% 2. X/8-:8CD#0A .mlns:.sdY?http:CCwww.w@.orgC2RR1C/018chema? .mlns:fgwY?http:CCsoapla!gro nd.:ein.comCfilegwCfile3nfo? targetnamespaceY?http:CCsoapla!gro nd.:ein.comCfilegwCfile3nfo? elementformdefa ltY?) alified?% @. X/8-:#1#0#(T nameY?file3nfo?% 4. X/8-:C;0P1#/T4P#% A. X/8-:8#[2#(C#% B. X/8-:#1#0#(T nameY?file(ame? t!peY?.sd:string?% L. X/8-:#1#0#(T nameY?file8iTe? t!peY?.sd:int?% M. X/8-:#1#0#(T nameY?file-ateTime? t!peY?.sd:dateTime?% O. X/8-:#1#0#(T nameY?transport?% 1R. X/8-:C;0P1#/T4P#% 11. X/8-:8#[2#(C#% 12. X/8-:#1#0#(T nameY?propert!? ma.occ rsY? nbo nded?% 1@. X/8-:C;0P1#/T4P#% 14. X/8-:ATT73+2T# nameY?name? seY?re) ired?% 1A. X/8-:ATT73+2T# nameY?val e? seY?re) ired?% 1B. XC/8-:ATT73+2T#%XC/8-:ATT73+2T#%XC/8-:C;0P1#/T4P#% 1L. XC/8-:#1#0#(T% 1M. XC/8-:8#[2#(C#% 1O. X/8-:ATT73+2T# nameY?t!pe? t!peY?.sd:string? seY?re) ired?% 2R. XC/8-:ATT73+2T#%XC/8-:C;0P1#/T4P#% 21. XC/8-:#1#0#(T% 22. XC/8-:#1#0#(T%XC/8-:#1#0#(T%XC/8-:#1#0#(T%XC/8-:8#[2#(C#%

2@. 24. 2A.

XC/8-:C;0P1#/T4P#% XC/8-:#1#0#(T% XC/8-:8CD#0A%

892m0 3ersion=):* ) enco&ing=)UTF-;)9<


3mport the .ml schema into the T3+C; -esigner proHect. 3f !o haven$t been following the series of articles on 'ile=atewa!* !o can learn abo t the 'ile=atewa! in the following posts. Part 1 Part 2

A G08 P blish activit! in the + siness,or:s process Dere are the steps to add a p blish G08 activit! into the process 1. Create a G08 Connection shared config ration. 2nder the Poll#mpsC8V folder* create a G08 Connection. 2nchec: the >2se G(-3 for Connection 'actor!? as o r cons mers will be connecting directl! witho t getting the reso rce handle from the G(-3. #nter the sername and password of the fgw ser.

8tart the T3+C; #08 server and clic: on the >Test Connection? b tton to ens re correct config ration.

2. Add a G08 Topic P blisher activit!. 3n the Poll- mpCompletion process* add a G08 Topic P blisher and name it as >P blish#vent?. 3n the config ration tab* enter >'=,.'31#7#A-4? in the -estination Topic field. 3n the >0essage T!pe? dropdown* select >/01 Te.t?.

Create a transition from ,rite/01'ile to P blish#vent* and from P blish#vent to #nd activities. ,ith P blish#vent activit! selected* go to the >3np t #ditor? tab. Clic: on the >K? icon and select >/01 #lement 7eference? from the >Content? dropdown. +rowse to the schema file3nfo..sd and select the element >file3nfo?

=o to the >3np t? tab* map the file(ame* file8iTe and file-ateTime elements of the activit! inp t to the corresponding fields of S,rite/01'ile process data. - plicate the >propert!? element of the file3nfo instance to contain additional informations* s ch as the sername and password of the ftp server where the o tp t file is located* the rl of the ftp server and so forth. The val e of the >transport? element indicates how the o tp t file is hosted. Possible val es are ftp* http* https or even a >7#8Tf l file server?W\. ,ell* the password is in plain-te.t* not an ideal implementation* b t that is a separate e.ercise\

Dere we are* done. A 'ile=atewa! that broadcasts the file conversion event to interested parties.

!u--ary of .ile/ateway +ro0e,t


02JAN

1 Vote

3 realised some of the previo s articles describing the 'ile=atewa! are a bit haphaTard* n-organised at best. 8o here is a s mmar! that 3 hope to clear the mess 3 have introd ced. 'inall! we have completed a concept al 'ile=atewa! based on some of the design patterns described in >8;A -esign Patterns? b! Thomas #rl. The patterns involved are: 'ile =atewa! -ata 0odel Transformation -ata 'ormat Transformation Part of 8ervice +ro:er 5LRL6

Part of #nterprise 8ervice + s 5LR46

'ig re 1: Concept al Architect re of 'ile=atewa! Dere is a s mmar! of articles to follow: Part 1 Part 2 Part @ Config re T3+C; #08

Configuring TIBCO E*! for .ile/ateway to broad,ast ,o-+letion e)ent


02JAN

1 Vote

3n o r ne.t article* we will add a new feat re to the 'ile=atewa!. This article describes the steps to set p the #08 for that p rpose. ,e need: a sec red topic an #08 ser a thoriTation enabled #08 access control list 5acl6

Before you start


8tart #08 server. - simpl! e.ec te tibemsd.e.e in the bin folder of !o r T3+C; #08 installation 5windows6. The defa lt #08PD;0# for win@2 installation is c:UtibcoUemsUA.1 for T3+C; #08 A.1... 1. V#08PD;0#VUbinUtibemsd.e.e -config f llpathPtoP!o rPtibemsd.confPfile

-EMS5(OME-=#in=ti#ems&*e2e -con%ig %u00pat15to5'our5ti#ems&*con%5%i0e

1a nch #08 admin console. 3n the same director! of tibemsd.e.e* e.ec te the tibemsadmin.e.e 1. V#08PD;0#VUbinUtibemsadmin.e.e

-EMS5(OME-=#in=ti#emsa&min*e2e

Connect to #08 server - 3n the T3+C; #08 Administration console* enter the command >connect?. Ass ming !o have not changed the admin password* login as admin with no password.

Creating a to+i, and se,uring it

,e will create a #08 topic called '=,.'31#7#A-4 to which the 'ile=atewa! will p blish its file completion events. G st to add a little sec rit! to it* we will sec re this topic b! allowing onl! a thoriTed cons mers to s bscribe* effectivel! bloc:ing the anon!mo s cons mers. #nter the following commands into the admin console. 1. create topic '=,.'31#7#A-4 sec re

create topic F6>*F/,E?E!.@ secure


To see the newl! created topic in the console* enter the following command. 1. show topics

s1oA topics
(ote the "K$ sign nder the col mn "8$* it indicates the topic is secured.

Enable E*! aut(ori1ation


The "sec re$ propert! of a #08 topic or ) e e will onl! come to effect if the server a thoriTation is enabled. To enable a thoriTation on #08 server* enter the following command at the admin console. 1. set server a thoriTationYenabled

set ser3er aut1oriBation=ena#0e&


A thoriTation can also be t rned on via the tibemsd.conf file. 1. a thoriTation Y enabled

aut1oriBation = ena#0e&
8erver restart is re) ired if this method is sed.

Creating an E*! user


To access to sec red topics* the G08 cons mer needs to provide credentials when s bscribing. 'or that reason we will create a ser called >fgw ser? with the password >fgw ser?. #nter the following commands into the admin console.

1.

create ser fgw ser >'ile=atewa! 2ser? passwordYfgw ser

create user %gAuser )Fi0e6ateAa' User) passAor&=%gAuser


2se the following command to list the created ser. 1. show ser fgw ser

s1oA user %gAuser

Configure t(e a,,ess ,ontrol list 2a,l3


The cons mer of '=,.'31#7#A-4 topic needs at least the "s bscribe$ privilege in order to s bscribe to the topic. 3f the cons mer intends to become a d rable s bscriber* it also needs to be given the "d rable$ privilege. (ote that in o r scenario* the cons mer is not allowed to p blish to this topic* hence the absence of "p blish$ privilege. #nter the following command into the admin console. 1. grant topic '=,.'31#7#A-4 fgw ser s bscribe* d rable

grant topic F6>*F/,E?E!.@ %gAuser su#scri#e" &ura#0e


To inspect the privileges assigned to fgw ser* se the following commands 1. showacl topic '=,.'31#7#A-4

s1oAac0 topic F6>*F/,E?E!.@

;7 1. showacl ser fgw ser

s1oAac0 user %gAuser

!u--ary
+! now we have config redCcreated the following: A sec red #08 topic called '=,.'31#7#A-4

An #08 ser called fgw ser Access control on fgw ser #08 server a thoriTation Y enabled

Tibco #08

Configuring TIBCO E*! for .ile/ateway to broad,ast ,o-+letion e)ent 02JAN


3n o r ne.t article* we will add a new feat re to the 'ile=atewa!. This article describes the steps to set p the #08 for that p rpose. ,e need: a sec red topic an #08 ser a thoriTation enabled #08 access control list 5acl6

Before you start


8tart #08 server. - simpl! e.ec te tibemsd.e.e in the bin folder of !o r T3+C; #08 installation 5windows6. The defa lt #08PD;0# for win@2 installation is c:UtibcoUemsUA.1 for T3+C; #08 A.1... 1. V#08PD;0#VUbinUtibemsd.e.e -config f llpathPtoP!o rPtibemsd.confPfile

-EMS5(OME-=#in=ti#ems&*e2e -con%ig %u00pat15to5'our5ti#ems&*con%5%i0e

1a nch #08 admin console. 3n the same director! of tibemsd.e.e* e.ec te the tibemsadmin.e.e 1. V#08PD;0#VUbinUtibemsadmin.e.e

-EMS5(OME-=#in=ti#emsa&min*e2e

Connect to #08 server - 3n the T3+C; #08 Administration console* enter the command >connect?. Ass ming !o have not changed the admin password* login as admin with no password.

Creating a to+i, and se,uring it

,e will create a #08 topic called '=,.'31#7#A-4 to which the 'ile=atewa! will p blish its file completion events. G st to add a little sec rit! to it* we will sec re this topic b! allowing onl! a thoriTed cons mers to s bscribe* effectivel! bloc:ing the anon!mo s cons mers. #nter the following commands into the admin console. 1. create topic '=,.'31#7#A-4 sec re

create topic F6>*F/,E?E!.@ secure


To see the newl! created topic in the console* enter the following command. 1. show topics

s1oA topics
(ote the "K$ sign nder the col mn "8$* it indicates the topic is secured.

Enable E*! aut(ori1ation


The "sec re$ propert! of a #08 topic or ) e e will onl! come to effect if the server a thoriTation is enabled. To enable a thoriTation on #08 server* enter the following command at the admin console. 1. set server a thoriTationYenabled

set ser3er aut1oriBation=ena#0e&


A thoriTation can also be t rned on via the tibemsd.conf file. 1. a thoriTation Y enabled

aut1oriBation = ena#0e&
8erver restart is re) ired if this method is sed.

Creating an E*! user


To access to sec red topics* the G08 cons mer needs to provide credentials when s bscribing. 'or that reason we will create a ser called >fgw ser? with the password >fgw ser?. #nter the following commands into the admin console.

1.

create ser fgw ser >'ile=atewa! 2ser? passwordYfgw ser

create user %gAuser )Fi0e6ateAa' User) passAor&=%gAuser


2se the following command to list the created ser. 1. show ser fgw ser

s1oA user %gAuser

Configure t(e a,,ess ,ontrol list 2a,l3


The cons mer of '=,.'31#7#A-4 topic needs at least the "s bscribe$ privilege in order to s bscribe to the topic. 3f the cons mer intends to become a d rable s bscriber* it also needs to be given the "d rable$ privilege. (ote that in o r scenario* the cons mer is not allowed to p blish to this topic* hence the absence of "p blish$ privilege. #nter the following command into the admin console. 1. grant topic '=,.'31#7#A-4 fgw ser s bscribe* d rable

grant topic F6>*F/,E?E!.@ %gAuser su#scri#e" &ura#0e


To inspect the privileges assigned to fgw ser* se the following commands 1. showacl topic '=,.'31#7#A-4

s1oAac0 topic F6>*F/,E?E!.@

;7 1. showacl ser fgw ser

s1oAac0 user %gAuser

!u--ary
+! now we have config redCcreated the following: A sec red #08 topic called '=,.'31#7#A-4

An #08 ser called fgw ser Access control on fgw ser #08 server a thoriTation Y enabled

Leave a comment
Posted by SRIK on January 2, 2012 in Tibco EMS

Tib,o E*! re,onne,t failed 01JAN


This note is tested with Tibco #08 4.4.1. 3 started a stand alone Tibco #08 daemon with the following command from the director! CtibcoCemsCbin:

*/ti#ems& -con%ig ti#ems&*con%


2nfort natel! 3 got the following error messages for m! stand alone #08 server:

reconnect %ai0e&$ unCnoAn connection %or i&=DE reconnect %ai0e&$ unCnoAn connection %or i&=FD
+efore 3 got this error 3 had done some e.periments with a fa lt tolerant set p sing the same server name in config ration option server as m! stand alone daemon. 8o m! first g es was to rename the #08 server* which did not help. 0! standalone #08 server was also sing the same datastore as m! previo sl! r nning fa lt tolerant pair of #08 servers. 2nfort natel! renaming the #08 datastore did not solve the problem either. ,hat might have ca sed it was that some #08 clients of the standalone server had crashed before 3 got the error. These clients were Tibco -esigner A.A instances r nning + siness,or:s A.4. ;nl! when sh tting down m! machine 3 saw that these clients were correctl! terminated and at restart of the m! machine and the #08 server the problem was solved.
Leave a comment
Posted by SRIK on January 1, 2012 in Tibco EMS

!!4 Configuration in Tib,o E*! !ER ER 25FEB


There is a sample 881 config ration !o sho ld start with in XtibcoPhome%CemsCXversion%CsamplesCconfig called tibemsdssl.conf. 8tart it with >tibemsd -config tibemsdssl.conf?. Ta:e a loo: at the properties.

The #08 8erver is sing the certificate >server.cert.pem? as its identit!* adn it will tr st certificates that were signed b! clientProot.cert.pem. sslPserverPidentit! Y ..CcertsCserver.cert.pem sslPserverP:e! Y ..CcertsCserver.:e!.pem sslPpassword Y SmanS,Ht87Cpa/ LhoT:-lc#PrB<(<7r ] 8erver 3ss er certificate5s6.] 8 pports P#0* -#7 and P<C8]12.] This ma! be a part of P<C812 specified b! sslPserverPidentit! sslPserverPiss er Y ] Tr sted iss ers of client certificates. 8 pports P#0* -#7 and P<C8L. sslPserverPtr sted Y ..CcertsCclientProot.cert.pem 8oF!o can se clientPidentit!.p12 in !o r +, proHect as an 3dentit! 5there is a 7#A-0# in the certs director! e.plaining the relationships6* and se serverProot.cert.pem so !o can tr st the server.cert.pem b! importing it into a Tr sted Certificates folder in !o r +, proHect. There are also SSL properties for FT heartbeats: ftPsslPidentit! Y ftPsslPiss er Y ftPsslPprivateP:e! Y ftPsslPpassword Y ftPsslPtr sted Y ftPsslPverif!Phost Y ftPsslPverif!Phostname Y ftPsslPe.pectedPhostnameY ftPsslPciphers Y
Leave a comment
Posted by SRIK on February 25, 2011 in Tibco EMS

/e-s 2/ra+(i,al Ad-inistration Tool for E*!3 18FEB

=ems v@.2 =ems is a graphical ser interface tilit! for T3+C; #nterprise 0essage 8ervice 5#086. 3t can be sed b! G08 developers as a general p rpose test deb gging tool and b! administrative s pport staff as a management and monitorig tool. =ems provides the following main feat res: ^8erver 0onitoring. 8erver state and main statistics are a tomticall! pdated* warning and error limits ma! be config red. 8erver generated events are also capt red. ^8erver 0anagement. 3ncl ding* general server config ration* G08 destinations* G(-3 factories* sersCgro ps* permissions* bridges* ro tes etc. ^G08 s pport. 0essages ma! be sentCreceived* ) e es ma! be browsed and message contents inspected. 8electors and filters ma! be specified. ^G08 0essage 0onitoring. 0essages ma! be monitored 5snooped6 as the! pass tro gh the server. 7e) est and repl! messages can be correlated to provide service response times. ^G08 0essage 0anagement. #gN p rging messages* cop! messages from a ) e e to another ) e e on a different server. ^Charting. 8erver statistics ma! be charted in real time* data ma! be saved to C8V files for e.port to other tools s ch as #.cel. ^1ogging. 8erver statistics ma! be logged a tomaticall! when warning or error limits are breached. ^8ec rit!. 881 connectivit!* view onl! mode. ^C stomisable displa! and loo: and feel. ^8 pport for 0anaging and 0onitoring T3+C; 8 b8tation 7e) ires: ^Tibco #08 4..* #08 A.* #08 B.. ^G7# 1.A or higher

Leave a comment
Posted by SRIK on February 18, 2011 in Tibco EMS

Tib,o E*! *onitoring


07NOV
3f !o are sing Tibco #08* !o sho ld be aware that there is a decent tool that comes with the Tibco 8-< that allows !o to monitor all activit! that goes on in !o r bro:er. 3n the director! c:UtibcoUemsUbin* !o will find a command-line application called tibemsmonitor.e.e. 3f !o r n this tilit!* !o can see ever! connectCdisconnect* ever! creation and destr ction of a 0essageProd cer and 0essageCons mer* ever! creation of a topic or ) e e. tibemsmonitor -monitor Xtopic% _-server Xserver- rl%` _- ser Xname%` _-password Xpassword%` _-selector Xte.t%` _-short` _-help` _-helpssl` tibemsmonitor -server >tcp:CCemshost:L222Z -monitor >%? tibemsadmin _-server` _- ser` _-password` tibemsadmin.e.e -server >tcp:CCemshost:L222Z - ser admin -password admin12@ tibemsd _-config Xfilename%` _-ftPactive XactiveP rl%` _-ftPheartbeat Xseconds%` _-ftPactivation Xseconds%` _-sslPpassword Xstring%` _-trace Xitems%` _-sslPtrace` _-sslPdeb gPtrace` _-help` tibemsd -config c:UtibcoUcfgmgmtUemsUdataUtibemsd.conf
Leave a comment
Posted by SRIK on No e!ber ", 2010 in Tibco EMS

5ow to (andle ,orru+ted -essage in E*! datastore6 1O!T


"roble# $es%riptio&

,hen a message is corr pted in the #08 database* !o ma! notice the following errors in the #08 log file: 8#V#7# #77;7: #.ception tr!ing to read message from store. #77;7: #.ception tr!ing to create message from store: 3; failed. 8#V#7# #77;7: #.ception tr!ing to create valid messages record* 3nvalid message. 8#V#7# #77;7: Persisted message possibl! corr pt. 8#V#7# #77;7: #.ception tr!ing to create valid messages record* 3nvalid message. ,hen !o r client tries to cons me the message* !o ma! get a >Hava..Hms.G08#.ception: Corr pted incoming data message? e.ception. ,hen a corr pted message is sent to a client and the client application cannot process the corr pted message properl!* the client will bloc: s ccessive messages sent to it. These messages will remain ) e ed on the server and will not be cons med b! the client. "ossible 'easo&s for (e&erati&) !orr*pte+ ,essa)es i& the E,S $atastore 1. A hardware problem with the ph!sical dis:: 0edia error 2. 'orced nmo nt of a ph!sical dis: when the dis: is in se* or a hard dis: in operation having been npl gged. @. 1oc:ing problem* the record in the db file has been modified b! different applicationsCthreads of the application at the same time. 4. The #08 server receives a corr pt message. A. The machine was terminated abr ptl!. 'or e.ample: a r nning s!stem in operation has been npl gged* etc. Sol*tio& ,hen one or more messages are corr pted and a client cannot receive the corr pted messages* !o can do the following to delete the corr pted messages: 1. 3f !o have alread! enabled the >trac:PmessagePids? then !o sho ld tr! to remove the corr pt message as follows. To enable trac:PmessagePids* in #08 main config ration file* set: in tibemsd.conf trac:PmessagePidsYenabled. a6 2se the tibemsadmin command 5available in #08PDomeUbin director!6 to set server consolePtrace Y K08= 5or set logPtrace if that is more appropriate6. b6 2se the tibemsadmin command to set addprop ) e e trace. c6 ,hen the server delivers the corr pted message to the cons mer* the server sho ld print the message 3-.

d6 2se the tibemsadmin command >delete message? with that message 3- to remove the corr pted message. e6 2ndo steps a6 and b6* if needed.
Leave a comment
Posted by SRIK on #ctober $1, 2010 in Tibco EMS

5ow to Configure E*! 7$8 !er)er wit( 9atabase 9atastore6 1O!T


#08 A.. can be config red to se a database to store messages. The following steps have been tested on a ,indows host to config re #08 A.. with a database. 'or other platforms* the steps will be similar. Set*p Steps: 1. 3nstall #08 A.. 2. -ownload and install G-< 1.A or later @. -ownload and install Dibernate from the lin: provided at the #08 A.. download on http: download.tibco.com. 4. -ownload the corresponding database G-+C drivers. The! can be fo nd on the 3nternet. The corresponding Har files for the G-+C need to be added to dbstorePclasspath in #08 main config ration file. 'or e.ample: 16. 0!8[1 3nno-+ 0!8[1 Connector: m!s)l-connector-Hava-A.R.B-bin.Har 26. 0icrosoft 8[1 8erver 0icrosoft G-+C -river for 8[1 8erver: s)lHdbc.Har @6. ;racle Oi and 1Rg

;racle G-+C Thin -river: oHdbc14.Har or oHdbcA.Har 46. 3+0 -+2 8erver M.1 and O.1 -+2 2niversal G-+C -river: db2Hcc.Har and db2HccPlicensePc .Har A. 0odif! the sample #08 main config ration file sed for database: c:UtibcoUemsUA.RUsamplesUconfigUtibemsd-db.conf: 0odif! the variables: dbstorePclasspath* dbstorePdriverPname* dbstorePdriverPdialect* HarPlibrar! to reflect !o r own settings and database. Dere is an e.ample which ses the ;racle 1Rg database: YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY dbstorePclasspath Y c:UtibcoUcomponentsUeclipseUpl ginsUcom.tibco.tpcl.org.hibernateP@.2.A.RR1Uhibe rnate@.HarNc:UtibcoUcomponentsUeclipseUpl ginsUcom.tibco.tpcl.org.com.mchange.c@ pRPR.O.1.RR1Uc@pRR.O.1.HarNc:UtibcoU#08UA.RUbinUantlr-2.L.B.HarNc:UtibcoU#08UA. RUbinUasmattrs.HarNc:UtibcoU#08UA.RUbinUasm.HarNc:UtibcoU#08UA.RUbinUcglib-2.1. @.HarNc:UtibcoU#08UA.RUbinUcommonscollections-2.1.1.HarNc:UtibcoU#08UA.RUbinUco mmons-logging-1.R.4.HarNc:UtibcoU#08UA.RUbinUdom4H1.B.1.HarNc:UtibcoU#08UA.RUbi nUehcache1.2.@.HarNc:UtibcoU#08UA.RUbinUHta.HarNC:UtibcoU#08UA.RUdatabaselibUoH dbc14.HarNC:UtibcoU#08UA.RUbinUoHdbc14.Har dbstorePdriverPname Y oracle.Hdbc.driver.;racle-river dbstorePdriverPdialect Y org.hibernate.dialect.;racle1Rg-ialect HrePlibrar! Y C:UHd:1.A.RPRBUHreUbinUserverUHvm.dll YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY B. Create database sers for #08 sage in the database. The sers sho ld have permissions to create* alter* delete* pdate for table* inde. and se) ence. L. 0odif! c:UtibcoUemsUA.RUsamplesUconfigUstores-db.conf to p t !o r own database store information: #.ample* in stores-db.conf* defines oracle database information:

Ss!s.failsafe t!peYdbstore dbstorePdriverP rlYHdbc:oracle:thin:adminfsCadmin12@aCCosrvP1:1A21Corclperf dbstorePdriverP sernameYadminfs dbstorePdriverPpasswordYadmin12@ M. 0odif! the file ) e es.conf or topics.conf to define where the messages will be stored: #.ample* in the file ) e es.conf: T3+C;.) otes ma.b!tesY1R0+*trace*storeYSs!s.failsafe O. 2se the schema e.port tool to e.port the #08 schema into database: #.ample: Hava -Har c:UtibcoUemsUA.RUbinUtibemsdP til.Har -tibemsdconf c:UtibcoUemsUA.RUsamplesUconfigUtibemsddb.conf -createall -e.port 8ee the T3+C; #nterprise 0essage 8ervice 2ser$s = ide* Chapter A* entitled >7 nning the #08 8erver? for details abo t the schema e.port tool. 1R. 8tart the #08 server sing c:UtibcoUemsUA.RUsamplesUconfigUtibemsd-db.conf
Leave a comment
Posted by SRIK on #ctober $1, 2010 in Tibco EMS

5ow to !e,ure t(e 9atabase Password in E*! 7$8 Configuration file6 1O!T
,hen defining the database stores in #08 A..* !o will need to define the following parameters in stores.conf: dbstorePdriverP rl Y G-+C271 dbstorePdriverP sername Y sername dbstorePdriverPpassword Y password

The database password can be entered as clear te.t for two parameters: dbstorePdriverPpassword and dbstorePdriverP rl. 1. dbstorePdriverPpassword 4o can also se a mangled password for the dbstorePdriverPpassword. That is* !o can se the tibemsadmin tool to mangle a database password and define the mangled password for dbstorePdriverPpassword. 'or e.ample* !o can r n the tibemsadmin command to mangle a clear te.t password: YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY tibemsadmin.e.e -mangle T3+C; #nterprise 0essage 8ervice Administration Tool. Cop!right 2RR@-2RRM b! T3+C; 8oftware 3nc. All rights reserved. Version A.R.R V2L 4C2OC2RRM #nter phrase to mangle: Confirm phrase to mangle: SmanS-7VM441RHf:3<s@=#T2dmccA0Ps YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY 3n stores.conf* !o can define the mangled password for dbstorePdriverPpassword: dbstorePdriverPpasswordYSmanS-7VM441RHf:3<s@=#T2dmccA0Ps 2. dbstorePdriverP rl ,hen defining dbstorePdriverP rl for an ;racle database* the 271 format is entered as following: Hdbc:oracle:thin:Ca:Cbremote database namec 3f !o don$t want to enter the clear te.t database password within the 271* !o can define the ;racle service name 5aliase name6 for the database sing the following s!nta.: dbstorePdriverP rlYHdbc:oracle:thin:a:Cbdbservice namec

This wa! !o don$t need to define db sername and dbpassword in the dbstorePdriverP rl parameter.
Leave a comment
Posted by SRIK on #ctober $1, 2010 in Tibco EMS

5awk rule for -onitoring :ueue 0O!T


4o can se the ems admin AP3 to get the ) e e stats and chec: against the flowcontrol val e to find o t if it e.ceeds MRV. Call the AP3 sing a script from haw: E send mail when it e.ceeds. Please find the below code. CI I Cop!right 2RRL-2R1R 873< 8ol tions Pvt 1td 3nc. I All rights reserved. I 'or more information* please contact s : I I IC import Hava. til.IN import Hava..Hms.TopicN import Hava..Hms.[ e eN import Hava..Hms.-estinationN import com.tibco.tibHms.admin.IN CC CC The tibHms8erverAdministrator class is sed b! the tibHmsPerf0aster class CC to change vario s settings in the #08 server. CC p blic class tibHms8erverAdministrator b TibHmsAdmin_` Padmin Y n llN 8tring ) e e Y n llN 8tring topic Y n llN CII I Creates an admin client on the specified server I and then wal:s an! ro tes to other servers creating I admin clients on the discovered servers as well. I

I aparam server2rl server 271 on which to connect I aparam ser(ame the administrator name I aparam password the administrator password IC p blic tibHms8erverAdministrator5 8tring server2rl* 8tring ser(ame* 8tring password6 b 0ap map Y new Dash0ap56N addAdmin5server2rl* ser(ame* password* map6N Padmin Y new TibHmsAdmin_map.siTe56`N map.val es56.toArra!5Padmin6N c private void addAdmin58tring server2rl* 8tring ser(ame* 8tring password* 0ap map6 b tr! b 8!stem.err.println5>connecting as >K ser(ameK? to >Kserver2rl6N TibHmsAdmin admin Y new TibHmsAdmin5server2rl* ser(ame*password6N 8erver3nfo si Y admin.get3nfo56N CC enable statistics si.set8tatistics#nabled5tr e6N admin. pdate8erver5si6N if 5\map.contains<e!5si.get8erver(ame5666 b map.p t5si.get8erver(ame56* admin6N 7o te3nfo_` ri Y admin.get7o tes56N for 5int i Y RN i X ri.lengthN iKK6 b if 5\map.contains<e!5ri_i`.get(ame566 EE ri_i`.isConnected566 addAdmin5ri_i`.get27156* ser(ame* password* map6N c c else b admin.close56N c c catch 5#.ception e6

b e.print8tac:Trace56N 8!stem.e.it5-16N c c CII I Create a topic on all servers. I I aparam name topic name I aparam failsafe failsafe setting I aparam flowControl flow control setting IC p blic void createTopic58tring name* boolean failsafe* long flowControl6 b tr! b Topic3nfo ti Y new Topic3nfo5name6N ti.set=lobal5Padmin.length % 16N ti.set'ailsafe5failsafe6N ti.set'lowControl0a.+!tes5flowControl6N 8!stem.err.println5>creating topic >Kname6N for 5int i Y RN i X Padmin.lengthN iKK6 b Padmin_i`.destro!Topic5name6N Padmin_i`.createTopic5ti6N c topic Y nameN c catch 5#.ception e6 b e.print8tac:Trace56N 8!stem.e.it5-16N c c CII I Create a ) e e on all servers. I I aparam name ) e e name I aparam server name of ) e e$s home server I aparam failsafe failsafe setting

I aparam flowControl flow control setting I aparam prefetch prefetch setting IC p blic void create[ e e58tring name* 8tring server* boolean failsafe* long flowControl* int prefetch6 b 8tring f ll(ame Y nameN if 5server \Y n ll6 f ll(ame Y name K "a$ K serverN tr! b [ e e3nfo )i Y new [ e e3nfo5f ll(ame6N )i.set=lobal5Padmin.length % 16N )i.set'ailsafe5failsafe6N )i.set'lowControl0a.+!tes5flowControl6N )i.setPrefetch5prefetch6N 8!stem.err.println5>creating ) e e >Kf ll(ame6N for 5int i Y RN i X Padmin.lengthN iKK6 b Padmin_i`.destro![ e e5name6N Padmin_i`.create[ e e5)i6N c ) e e Y nameN c catch 5#.ception e6 b e.print8tac:Trace56N 8!stem.e.it5-16N c c CII I 7et rn the n mber of receivers from all servers I for a partic lar destination. I I aparam dest the destination I aret rn the n mber of receivers for the destination IC p blic int get( mber;f7eceivers5-estination dest6 b int n m7eceivers Y RN

tr! b for 5int i Y RN i X Padmin.lengthN iKK6 b -estination3nfo infoN if 5dest instanceof Topic6 info Y Padmin_i`.getTopic555Topic6dest6.getTopic(ame566N else info Y Padmin_i`.get[ e e555[ e e6dest6.get[ e e(ame566N Cons mer3nfo_` ci Y Padmin_i`.getCons mers8tatistics5n ll* n ll* info6N if 5ci \Y n ll6 n m7eceivers KY ci.lengthN c c catch 5#.ception e6 b e.print8tac:Trace56N 8!stem.e.it5-16N c ret rn n m7eceiversN c CII I Chec: if flow control is enabled for all servers. I I aret rn tr e iff flow control is enabled on all servers IC p blic boolean is'lowControl#nabled56 b boolean flowControl#nabled Y tr eN tr! b for 5int i Y RN i X Padmin.lengthN iKK6 b 8erver3nfo si Y Padmin_i`.get3nfo56N if 5\si.is'lowControl#nabled566 flowControl#nabled Y falseN c c catch 5#.ception e6 b e.print8tac:Trace56N 8!stem.e.it5-16N

c ret rn flowControl#nabledN c CII I 7emove the destination from all servers. IC p blic void clean p58tring controlTopic6 b tr! b for 5int i Y RN i X Padmin.lengthN iKK6 b if 5topic \Y n ll6 b Topic3nfo_` info Y Padmin_i`.getTopics5topic6N for 5int H Y RN H X info.lengthN HKK6 b if 5\controlTopic.e) als5info_H`.get(ame5666 Padmin_i`.destro!Topic5info_H`.get(ame566N c c if 5) e e \Y n ll6 b [ e e3nfo_` info Y Padmin_i`.get[ e es5) e e6N for 5int H Y RN H X info.lengthN HKK6 b Padmin_i`.destro![ e e5info_H`.get(ame566N c c c c catch 5#.ception e6 b e.print8tac:Trace56N 8!stem.e.it5-16N c c c
Leave a comment
Posted by SRIK on #ctober $0, 2010 in Tibco EMS

To add E*! ser)er to TIBCO ad-inistrator; follow t(ese ste+s% 20O!T


Note: To a++ the e#s ser-er. both A+#i&istrator a&+ E,S sho*l+ be *p a&+ r*&&i&)/ 1. 0a:e s re the T7A installalled on the machine where #08 server is r nning. 2. 7 n -omain 2tilit! from T3+C;PD;0#CT7ACXversion that matches to r domain%C+3(C-omain2tilit!.e.e 5,indows6 or .bin 52ni.6 @. 3n windows !o can do ble clic: the domain tilit!* b t in ni. se .CXPATD to T7A +3(%C-omain2tilit! (ote: To enable =23 mode in 2ni.* !o r des:top m st have .windows terminal li:e reflection*c!gwin or .windows etc. P t! does not s pport .windows properl!. 4. Choose #08 administration from the men list. A. Clic: Add #08 server to T3+C; domain and ne.t. B. #nter all the details that is re) ired for #08 5Version* path of tibemsd e.ec table 5.e.e in windows* .bin in ni.6 L. #nter the port n mber* ser name and password M. Test the connection O. 'inish the rest 1R. 8top the #08 and start from T3+C; administrator.

Вам также может понравиться