Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
In EMS 8.1 we have to provide the ems url as well while create factories
create factory myFactory generic URL=tcp://server1:7344
http://www.free-online-exams.com/Pages/Exams/DumpsQA.aspx?d=TIBCO&c=TB0-
123_V2&q=10
You need to start the ems server track messages by message_ids or correlation IDs
tcp://localhost:7222> show messages
MessageID = ID:E4EMS-SERVER.1B20530EF2B018:4
MessageID = ID:E4EMS-SERVER.1B20530EF2B019:5
tcp://localhost:7222> show message ID:E4EMS-SERVER.1B20530EF2B019:5
TextMessage={Header={ JMSDestination={QUEUE:'sample'}
JMSDeliveryMode={PERSISTENT} JMSPriority={4} JMSMessageID={ID:E4EMS-
SERVER.1B20530EF2B019:5} JMSCorrelationID={hi}(message content)
If a queue is created as exclusive its message can be read by only one consumer. Consider a situation where in we have
more than one consumer for an exclusive queue. Only one of them would listen the messages and rest will be on standby.
Once the active listener goes down one of the standby consumers will start picking up the request.
Below steps needs to be done to allow EMS using database for store: -
Character Encoding
By default, ISO 8859-1(Latin-1) or UTF-8(by default) if string is used as type
of message. For performance improvement, you can use Latin-1 as your encoding as
it uses single byte to store characters whereas UTF-8 uses 2 bytes to store it.
Message compression confirms that message will consume less space in EMS server
and will result in faster processing. The compression is done only for body
however header and properties will never get compressed. Compression is useful in
message storing as the server storage will come in play.
Selector uses only Message header and properties to define the key but not the
body.
Examples: - In the EndPoint Configuration panel, specify the selector in the Message Selector field. For
example, type (Branch='Boston' OR Branch='East Coast' OR Branch='ALL') AND ((SalesUpper>=62
AND SalesLower<=62) OR Sales volume='ALL').
Repeat step a and step b to specify a JMS selector for another Subscription Service. For example, type (Branch='New
York' OR Branch='East Coast' OR Branch='ALL') AND ((SalesUpper>=90 AND SalesLower<=90) OR
SalesVolume='ALL') in the Message Selector field for Subscription Service named mysub2.
A message selector is a string that lets a client program specify a set of messages, based on the
values of message headers and properties. A selector matches a message if, after substituting
header and property values from the message into the selector string, the string evaluates to true.
Consumers can request that the server deliver only those messages that match a selector.
The syntax of selectors is based on a subset of the SQL92 conditional expression syntax.
Identifiers
Identifiers can refer to the values of message headers and properties, but not to the message body.
Identifiers are case-sensitive.
Basic Syntax :An identifier is a sequence of letters and digits, of any length, that begins with a letter.
As in Java, the set of letters includes _ (underscore) and $ (dollar).
Certain names are exceptions, which cannot be used as identifiers. In particular, NULL, TRUE,
FALSE, NOT, AND, O R, BETWEEN, LIKE, I N, I S, and ESCAPE are defined to have special
meaning in message selector syntax. Identifiers refer either to message header names or property
names. The type of an identifier in a message selector corresponds to the type of the header or
property value. If an identifier refers to a header or property that does not exist in a message, its
value is NULL.
Literals
String Literal A string literal is enclosed in single quotes. To represent a single quote within a literal,
use two single quotes; for example, literals. String literals use the Unicode character encoding.
String literals are case sensitive. An exact numeric literal is a numeric value without a decimal point,
such as 5 7, -957, and +62; numbers in the range of long are supported.
An approximate numeric literal is a numeric value with a decimal point (such as 7 ., -95.7, and +6.2),
or a numeric value in scientific notation (such as 7E3 and -57.9E2); numbers in the range of double
are supported. Approximate literals use the floating-point literal syntax of the Java programming
language.
Expressions
Every selector is a conditional expression. A selector that evaluates to true matches the message; a
selector that evaluates to false or unknown does not match. Arithmetic expressions are composed of
numeric literals, identifiers (that evaluate to numeric literals), arithmetic operations, and smaller
arithmetic expressions.
Conditional expressions are composed of comparison operations, logical operations, and smaller
conditional expressions.Order of evaluation is left-to-right, within precedence levels. Parentheses
override this order.
Operators
Operator names are case-insensitive. Logical operators in precedence order: NOT, AND, O R.
Comparison operators: =, >, > =, <, < =, < > (not equal).
These operators can compare only values of comparable types. (Exact numeric values and
approximate numerical values are comparable types.) Attempting to compare incomparable types
yields false. If either value in a comparison evaluates to NULL, then the result is unknown (in SQL 3-
valued logic). Comparison of string values is restricted to = and < >. Two strings are equal if and only
if they contain the same sequence of characters.Comparison of boolean values is restricted to = and
<>
Destination properties:
1. Channel: - used only in Topics, used to determine the multicast channel over
which the message will be broadcasted.
Example: - foll.bar channel=mycast
2. Exclusive: - only with queues when set messages can be retrieved by one and
only one consumer. Other consumers will be in standby mood. Once the primary
consumer is down the server picks up one of the standby consumer and starts
sending messages. Queue should not be global queue.
3. Expiration: - both queue and topic specifies how long
(msec,sec,min,hour,day) messages will be stored in server. When messages are
expired it either gets destroyed or stored in $set_undelivered queue if
JMS_TIBCO_PRESERVE_UNDELIVERED property is set to true.
4. Export: - it allows to export the messages of a topic to external systems
defined in the transport.conf ex:- export=RV1,RV2
5. flowControl: - it specifies the maximum size the destination can store for a
producer for pending messages. Once the maximum size is reached the server
asks the producer to slow down the message sending rate. Useful when message
producer is producing quick messages than consumers accepting it.
flowControl never discards any messages or sends error back to producer like
OverflowPolicy. The size can be specified in KB, MB, GB the default size is
256KB flowControl=1000KB
6. global: - used to set the destination global for routing
7. Import: - allows message to be imported to ems server from External systems
if specified in transport.conf
8. Maxbytes: - specifies the maximum bytes for a destination. If reached
messages will be discarded and error will be send to producer.
9. Maxmsgs: -specifies the maximum msgs destination can hold waiting. Once
exceeded an error will be sent to message producer and message will be
discarded
NOTE: - both maxmsgs and maxbytes limit can be seen storing more messages
depending on pipeline concept of ems
10. maxRedelivery: - specifies the number of attempts ems server should
make to redeliver the message. Numbers for 2 to 255 can be specified. If
used set prefetch property to none. Ex: - maxRedelivery=count
Can be used when consumer not using auto acknowledgement mode as if confirm
activity is missing with JMS queue receiver. If maxredelivery is not set,
then the message would be redelivered infinite times to the queue mostly
256/s resulting in wiered behavior of services. MAXDELIVERYCOUNT specifies
the number of time EMS server has redelivered the message in the queue.
However, on other hand when you use wait for JMS activity
it doesnt matter what acknowledgment mode you have used and messages will
not be stored once fetched from wait for JMS activity.
12. prefetch: - (consumer fetches the messages from EMS server prior to be
sending a ready to accept the messages) specifies the number of messages
consumers should process once there are large number of pending items in the
destination.
Background: - delivering messages from server destination to consumer
requires 2 phase fetch and accept:
fetch is 2 steps process between consumer and server
consumer initiates the fetch phase by signaling the server that its ready
to take messages
the server responds by transferring one or more messages
accept phase client code takes a message from consumer
The receive call embraces both phases.
Automatic Fetch Enabled: - used when prefetch is set to a positive integer
value. Can be useful in performance improvement as a consumer does not have
to wait for the messages.
Automatic Fetch disabled: - set prefetch=none. Automatic fetch cannot be
disabled with for Global queues or topics.
Inheritance: - prefetch property can be inherited from parents based on
below scenarios
a) when all parents are set to prefetch NONE then child will hold same NONE
value of prefetch
b) when all parents have integer, value set for prefetch the most upper
value is set for child
c) when none of the parent have, the value set for prefetch the child will
have the default value of 5.
13. Secure: - when enabled instructs the server to check the permission of
user whenever they perform any action on destinations. The authorization
property of server should be enabling to use this property. And secure is
independent of SSL property and is related to EMS server.
14. Sender_name: - if enabled the message will contain the sender name.
The sender name is being captured by EMS server while producer connects to
EMS server and the same is used to pass as sender_name. Note: - in some
business case scenario the client may not want to expose the username to
consumers but ems has the property enabled for the destination. To resolve
this situation the EMS server operator must provide the producer with both
destinations where the property is set and not set. Hence the producer can
use the destination he wants.
15. Store: - it determines where messages sent to this destination would
be stored in file or database. Before using setprop and addprop to change
store property you need to stop the message flow.
16. trace: - specifies the tracing should be enabled for this destination.
Example trace = [body]
create user rishi rishiT
tcp://localhost:7222> set password rishi tanu
Password of user 'rishi' has been modified
revoke queue test.queue rishi receive
removeprop queue test maxmsgs command is used to remove the properties from
a destination.
Step 1: - create two ems servers (copy bin file twice in same machine or
have)
Step 2: - Update the properties in tibemsd.conf
A) Server=test with a valid servername
b) ft_active=tcp://localhost:7222(other EMS server url)
Note make sure the EMS server names are same otherwise you would see below
error while restarting the primary server.
2015-01-15 12:22:05.011 WARNING: Unable to initialize fault tolerant connect
Remote server returned 'the primary EMS server name is EMS-SERVER while the
Standby EMS server name is E4EMS-SERVER. The names must be the same'
NOTE: - you must have the same connection factories and user name password
in both EMS servers to create a fault tolerance system
Step 3: - restart the ems server once above settings are done
Step 4: - make sure after restarting the ems server you check below messages
in the window
2015-01-15 13:07:57.660 Accepting connections on tcp://PNEITSH54304D:7222.
2015-01-15 13:07:57.660 Server is in standby mode for
'tcp://pneitsh54406d:7222'
Step 6: - send 2-3 messages in Primary EMS server then shut it down before
the receiver receives them. Check the secondary ems server your queue will
be automatically created and it will have those 2-3 messages pending. Once
you connect the receiver it will pick up the messages from secondary server.
Routes: - Routes are used when same messages need to be sent across
different EMS servers.
All topics participating in routes must be defined global.
Zone: - a zone is set of routes. Zone restricts the behavior of routes.
There are 2 types of routes 1. One hop (1hop) and 2. Multiple hop(mhop)
1hop:- messages will be sent to only immediate routes
Mhop: - messages will be sent to all connected routes having receivers
Pallete Refrences:HTTP
HTTP Connection: - There can be only one HTTP receiver or wait for HTTP
message on single port. However, there can be multiple SOAP Event Source
listening on the same HTTP port. Soap Event Source and HTTP receiver can
share the same HTTP connection (HTTP Port). The HTTP server will take care
of distributing the messages properly.
There are two types of servers for HTTP
1. Tomcat: - Used when no of request is too high to maintain the throughput
and in request response paradigm for synchronous messages.
2. HTTPComponent: - when handling thousands of requests is important in
resource efficient way rather than throughput
Configuration TAB
Name,Description,Host(machine host name for
HTTP),Port,SSL(Checkbox),ServerType(Tomcat or HTTPComponent)
Configure SSL Button: -
Requires Client Authentication: - When checked client must produce the
digital certs before making the connection to the server.
Trusted Certificate Folder: - used when requires client authentication
checkbox is checked.
Identity, Strong cipher suits only.
Advanced Tab
Enable DNS lookup: - enables DNS lookup for a client so IP address is
resolved to a DNS name.
Max Post Size: - set when server type is Tomcat. Specifies maximum size of
the POST that the container form URL parameter parsing can handle. Default
value is 2MB. 0 disables the limit.
maxSavePostSize: - when Tomcat is selected. Used to specify the maximum data
can be buffered before login or cert authentication is done. Default size is
4k and -1 disables the limit.
URI Encoding: - used to set the specific encoding mechanism.
accept Count: - specifies the maximum number of connection can be accepted
for HTTP while its in use. Default value is 100.
compressableMimeType: -specifies the list of MIMEType for which HTTP
compression can be used. Text/html, text/xml, text/plain
compression: - specifies whether the output of HTTP connection should be
compressed. Values can be ON or OFF.
connectionTimeout: -specifies the time for which connection has to wait to
be successful. Default is 60000 msec i.e. 60 sec.
Custom Properties of HTTP
1. bw.plugin.http.server.minProcessors:- minimum number of thread available
for incoming HTTP requests. Default is 10
2. bw.plugin.http.server.maxProcessors:- maximum number of threads for
incoming HTTP messages. Default is 75
3. bw.plugin.http.server.maxSpareProcessors:- max number of unused thread
processing that can exist until the thread pool stopping the unnecessary
threads. Default is 50
4. bw.plugin.http.server.acceptCount:- max queue size for incoming requests.
If the queue is full new incoming requests are refused with an error.
Default value is 100.
5. bw.plugin.http.server.allowIPAdresses :- a comma separated IP addresses
to allow the connection from remote clients.
6. bw.plugin.http.server.restrictIPAddresses:- a comma-separated list of
regular expression to restrict the connection. If a IP addresses is
listed in both allow and restrictIPAddress field, then restrict overrides
the allow IP addresses.
7. bw.plugin.http.server.serverType: - can be Tomcat or HTTPComponent.
Default is Tomcat.
8. Bw.plugin.http.server.httpComponents.workerThread: - max number of web
server threads available to handle HTTP requests for HTTP Component
server type. Default is 50.
if you set the flow limit for a HTTP receiver process starter, the maxProcessors
is set to <flowLimitValue> -1 and minProcessors is set to <maxProcessorValue>/2.
If I store domain data in file storage the hawk agents take the data from
administrator UI and can support both file and database using RV as
transport. Hence little slow processing.
If I store domain data in database, the hawk agents take the data directly
from database rather than going to admin. This certainly improves the
performance and increases the login and deployment time of TIBCO admin.
If storing application data in database, then admin domain data must also be
stored in database but reverse is not true.
TIBCO Domain Utility
There are 2 parts of TIBCO admin 1. TIBCO admin ui:- used to manage users and
application and 2. TIBCO admin server: - used to manage resources
Consider these settings for a process with a starter activity, say a JMS
receiver:
Flow limit =100
Max jobs =25
There are 200 messages on the receiving queue before the process starts.
Once the process starts then what could be the statistics?
1)
Jobs in memory: 25
Jobs paged to disk: 100
Messages waiting on the queue: 75
or
2)
Jobs in memory: 25
Jobs paged to disk: 75
Messages waiting on the queue: 100
Thread Count is the number of BW worker threads, each of which is entitled to run
a job that is scheduled for execution, i.e. in the run-queue. Just because you
have the thread does not mean it runs as that depends on the OS scheduling which
also depends on the number of available hardware threads (cores plus hyper-
threading) and on the state of the process (it could be blocked on IO for
example). So strictly speaking even the BW worker threads only run virtually
concurrently - how many run physical concurrently is a matter of HW and
statements?
Max Jobs is number of jobs that can be in-memory and that are also entitled to
run. So, they may not run physical' at the same time as not all of them can have
a BW worker thread in your example but they run logical concurrently as BW has
its own scheduling which will result in jobs having to give up the BW worker
thread when they reach an asynchronous activity or they executed to many steps in
sequence. In that it is not much different than the OS scheduling of threads on
the processors.
For the JMS receiver, also the acknowledgment mode comes into play. For CLIENT
ACK the number of session determines how many jobs can be created concurrently
(defined from start to confirm activity which most times is at the end anyway).
This mean you do not have to set maxJobs or flowLimit. Now let's say you use
EXPLICIT ACK then the maxJobs and flowLimit are again important as only way to
define concurrency and thus memory footprint and other resource consumption. In
this case flowLimit=100 will suspend the BW process starter once 100 jobs are
created but not yet terminated. It will resume the job creation only once
1/2(=50) jobs run to their end. The maxJobs of 25 does result in 75 of those 100
jobs to be paged to disk - which is not a good idea (page out and page in cost)
unless you have large jobs and they are so long running that they all must be
started. That is for activationLimit equals false.
With Activation Limit equals, true BW would have stopped to create jobs once it
reached maxJobs = 25 and thus only 25 would be in memory at any time and the
higher flowLimit would be meaningless
Note also that you may not need the SOAP envelope inside the firewall if there are no WS policies to communicate.
For example, you could switch to context based routing (message routing based on the content of the message)
inside the firewall.
Checkpoint activity: - used to save the state of a bw process. All the activities upto the checkpoint can be
recovered. The recovery is done by Engine Commands activity. It polls GetRecoverableProcesses and another
engine command RestartRecoverableProcess would restart the failed process from its checkpoint.On checkpoint
containing processes failure jobid.xjob is created on the system where code is deployed on location
C:\TIBCO\tra\domain\mydomain\application\checkpnt\working\checkpnt-Process_Archive\jdb\checkpnt-
Process_Archive\jobid.xjob. To troubleshoot if checkpoint is not created please check the
bw.engine.enableJobRecovery=true property in the application tra file as by default it is set to false. One can also
give the user specified checkpoint recovery path by setting Datamanager.Directory=<> property in application TRA.
By default, the checkpoint information is saved in a file but you can also store it in database. The option is available
at par level on advanced tab of your application. If you are using any JDBC connection in your bw project that same
connection can also be used for storing checkpoint data.
We use checkpoint in scenarios where duplicity of records is expected and we dont want previous activities before
checkpoint to get executed more than once. If we have a scenario where we can have executed the activities before
checkpoint we should prefer to use acknowledgement modes in ems to redeliver the messages.
You can set below properties for logging in detail level for TIBCO admin.
Trace.Startup=true
Trace.Task.*=true
Trace.JC.*=true
Trace.Engine=true
Trace.Debug.*=true
in the deployed tra file and then restart the application and run it.
Then check detailed log file located in the <install-path>\TIBCO\tra\domain\application\logs folder.
Please keep in mind that all manual settings will be cleared after redeploy. To keep it permanent, set it in the bwengine.tra
file in <install-path>\TIBCO\bw\<version>\bin folder.
-p C:\local.properties
An example of the same is show below in filepoller which is polling file name having .txt extension sequentially. It also
processes that other extensions files but once all the .txt files are processed.
A bw project can have multiple ear in one project and multiple par in one EAR.
We can modify GVs at designer and in while deploying in admin ui. We can also modify the GV directly in
<<app>>.tra. Syntex -TIBCO.clientVar.<variablePathAndName> <value>.
After changing the GV in tra we will only have to restart the application. This is a workaround to avoid
redeployment and debug the issue.
Each time you run a domain utility in same machine it will increment the port number by 10. We can have
multiple domains in one machine.
TIBCO EMA(Enterprise Management Adviser) :- resource availability issues, handling resources exception can be
minimized.
EAR contains local project resources, library builder resources and alias library resources.
designer.ear.watermark.size=16 is the default size specified in designer.tra file for EAR. If the size is exceeded,
then a warning msg is shown. We can customize this value though.
Shared archieve contains all the resources automatically which are used by process definations. E.g.
schemas,JMS connection,JDBC connection etc.
BWengines can be configured fault tolerance as peers (master) and secondary relationship. Once the peer engine
fails the
Wait,Notify, Receive Notification(starter) :- Notify activity sends a notification message to eighter a wait or Receive
Notification activities having the same key. If no activity containing the Notify activity key is active the message along with
data to be send by notify activity is stored in the server until one activity comes active to access the messages. We can
define a timeout value though in notify and wait activity to control the storing the notification data.
3. Reliable-delivery: - producer just sends the messages without receiving any notification about messages
received or failed by consumer.
Service Activity: -
Service implements one or more interfaces over one or more transports. Service provides an abstraction so that you can
provide more generic SOA. It also allows you to decouple a service from its underlying transport and implementation.
Context resource: - it allows defining the schema for any operation. A service can contain multiple operation each
containing separate context resources for them. You can use getcontext and setcontext activities to get and set the
context values inside a process.
Observation 1: - while creating the service using JMS connection, use JNDI checkbox must be selected always or else
designer throws error
2. While we create multiple part table in messages of wsdl it designer doesnt allow creating 2 typed part tables
elements or one type part table element with element. We can have multiple part table elements in messages
with element type of single one with typed.
3. We can have multiple document parts if we select the default style (Document style) method as RPC
4. Note: - If we configure service activity with soap over JMS and select delivery mode as client explicit then all
the messages sent to the service will be acknowledged automatically at the end of service implementation
method regardless of client explicit acknowledgement mode.
Difference between wait for jms message and get Jms message activity
1. Wait for JMS message activity starts browsing EMS server the moment bw engine starts whereas getJMSMessage
activity browse once the process instance is instantiated
2. getJMS message activity retrieves one message at a time from EMS server (if messages selector is not defined) but
wait for JMS activity retrieves more than one message (depending on prefetch value) from ems server.
3. Wait for jms message contains an extra tab for message event
4. getJMS message activity allows to perform a receive operation on the queue opposed to wait for jms which invokes
delivered operation
Message. This can be one of the following:
Simple A message with no body portion.
Bytes A stream of bytes.
Map A set of name/value pairs. The names
are strings, and the values are simple data
types (Java primitives), an array of bytes (use
the Binary datatype when mapping this data),
or a string. Each item can be accessed
Sequentially or by its name.
Object A serializable Java object.
Object Ref An object reference to a Java
object.
Stream A stream of Java primitives, strings,
or arrays of bytes. Each value must be read
Sequentially.
Text The message is a java.lang.String.
XML Text The message is XML text.
Field Global
Var? Description
Adapters:-
Adapters are used for enabling the communication within different areas in an organization which directly could not
communicate with each other and there are some coding efforts needed to enable the communication between them.
While configuring ADB adapters we need 2 major tables. 1 from where subscription should start (source table) and one
where the publication should happen (target table).
The target table contains all the columns present in the source table and in addition to it contains few extra columns
contains adapters subscription information example: -
ADB_L_DELIVERY_STATUS: - contains values N once the records from source table is put in target table (publishing
table)
ADB_OPCODE: - contains the values if the publication has failed
Ex:-
3. Make sure the configuration has the above value and EndpointType as SOAP. You can optionally edit the name
and endpoint URL.
4. drag a process defination and on partners tab select the partner link configuration(Partner link configuration will
only available here If installed properly)
Ex:-
5. Drag a service activity and configure it with another abstract wsdl. On implementation process of an operation
select the process definition defined in step 4. You will notice that invoke partner tab already is containing required
partner information.
Run your service(step 5) with just invoking the operation and partner will get invoked.
1. cluster aware: - the application knows the cluster is running on the machine
2. Cluster unaware: - the application doesnt know that cluster is running on same machine. The cluster software
takes care of failover scenarios in this case. All TIBCO applications fall under cluster unaware applications.
TIBCO application run seamlessly on cluster environments but does not use any cluster features.
When TIBCO applications are installed under cluster, high availability is best characterized as warm-standby. There are 3
major categories for high availability: -
1. Hot-standby: - applications on the backup server come up with very minimal down time or even approach zero
downtime. Using hot-standby two processors use hardware checkpoints to verify synchronization after each CPU
instruction.
3. Cold-standby: - applications on the backup server takes a little more time then warm-standby mode. Backup
server application needs to be manually started since they dont have a way of knowing the failures.
Group: - combination of resources that are managed as a unit of failover. Groups are also known as resource groups,
cluster packages or cluster groups.
Active/passive: - applications exist in 2 or more servers but only one of them is serving the client and others waiting on
standby.
Rolling upgrade: - it means on the cluster nodes software would be upgraded one by one thus one of the node is always
processing client requests.
Shared storage: - refers to an external SCSI or fiber cable. Used in multi node cluster env. Although nodes used shared
storage but only one node access the external storage at a given point of time.
Please make sure that if you are referring any jar file in designer please make sure that BW JRE and jar files java version
are same. Otherwise class and methods will not be available when you browse the jar from bw designer.
Variables in BW:-
Global variables: - used to set the constant values in the project values cannot be changed at runtime. Used mainly for
connection parameters and values this would remain same during project execution. There are 2 checkboxes available
while creating GVs. Service and deployment. If deployment is checked then the GV would be available to change in
admin ui after deployment otherwise GV will not be visible. Same is with Service checkbox if checked the GV will be
visible at service level in admin ui otherwise not.
Process Variable: - its a user defined variable and scope is within the process only. The value is modified by assign
activity. The value will be available to all activities within the process.
Job Shared Variable :- the scope is with each job, Get Shared Variable and Set Shared Variable activities are used to
get and set the values for JSV. Consider a situation where we have a process A calling a process B. If process B is being
called inside process A and is not spawned then the updated value of JSV would be reflected in the process A. The value
will not be reflected if B is spawned.
Shared Variable.- the scope is across the project and process even across the engine. While creating shared variable
we can configure it to support multiple engine. All the processes within the project can modify the value of shared variable
and each one accessing it would get the updated value of shared variable. Get Shared Variable and Set Shared Variable
activities are used to get and set the values for SV.
Read more: Difference Between RPC and Document | Difference Between | RPC vs Document
http://www.differencebetween.net/technology/protocols-formats/difference-between-rpc-and-
document/#ixzz3WVoVnbqh
Name Chaining
The process of name chaining involves comparing the value of the subject field in one certificate to the issuer
field in the subsequent certificate. In this case, the SSL-enabled server would present an ordered list of
certificates (i.e. leaf certificate > intermediate certificate > root certificate). In cases where the certificates
received are not in order, BW would internally rearrange the order such that the 0th certificate will be the leaf
certificate, the 1st certificate will be the intermediate signer, and will traverse the certificate hierarchy all the
way up to a trust anchor (the self-signed, root CA certificate). The comparison between the subject and
issuer fields is made between adjacent certificates in order to make sure there is no broken link until a self-
signed root certificate is reached.
Key Chaining
Key chaining involves checking that the key certified in each certificate verifies the digital signature on the
subsequent certificate. This check establishes a cryptographic trust from the relying partys CA certificate (i.e.
the trust anchor) to the public key contained in the server certificate. In our sample certificate chain, the key
chaining would resemble the following:
Duplicate Certificates
A misconfigured SSL-enabled server could possibly send duplicate certificates in the certificate chain. If the
path includes two certificates that have matching issuer names and identical serial numbers, then the certificates
would be considered duplicates. This check ensures that a duplicate certificate does not adversely alter the
outcome of proper path validation, e.g. when checking the "pathlen" (path length) constraint.
Syntax Check
The certificate syntax has been defined in the X.509 profile. It includes a set of base certificate fields and
extensions that allows additional information to be transmitted. Each certificate extension has its own syntax. A
standard set of extensions is specified in the X.509 and PKIX profiles. The syntax of all base certificate fields as
well as all known extensions must be checked to ensure that it conforms to the standards. If unknown
extensions are present, their syntax need not be checked.
Integrity Check
It is necessary to verify the integrity of each certificate, as it is possible for the certificate content to be altered
and replayed back to the receiving party. This check involves verifying the digital signature on the certificate. If
the signature on any certificate in the path fails to verify, then the certificate must be corrupted and therefore
should not be trusted.
Criticality Check
All certificate extensions have an indication as to whether their processing is critical to the acceptance of a
given certificate. The criticality flag provides a backward/forward compatibility mechanism which enables CAs
to state what should happen when a relying party that does not yet support the new extension encounters it. If an
extension is flagged critical but the path validation process of the relying party does not support the extension,
then the certificate cannot be used. Unknown, non-critical extensions can safely be ignored and other processing
continued. This process prevents relying parties from trusting a certificate under conditions for which its issuer
did not intend. Often the policy under which a certificate was issued will free its issuer from liability, if the
certificate is not used per the issuers specific policy, including the processing of all critical extensions in the
certificate. For instance, if the Basic Constraints extension is marked critical, then the relying party should be
aware that this certificate can have other subordinate certificates which it has signed. Moreover, if the pathlen
attribute is present, then it should indicate the number of chain levels that can be present under that CA
certificate.
WSDL: - We can create wsdl message and port types in different wsdl activities and use them together in soap
event source activities. You need to select the wsdl defining the operation while configuring soap even source
activity and in advance tab you will notice that Embed Interface and Embed Types check boxes in General
Tab will be automatically checked. If you try to uncheck the checkbox you will notice that concrete wsdl does
not contain the input and output elements and will just contain the schema import. In schema import scenario,
we will have manually import the schemas to have the input and output elements.
Two-way SSL authentication is also referred to as client or mutual authentication because the application acting as an
SSL client presents its certificate to the SSL server after the SSL server authenticates itself to the SSL client.
1-Way SSL
In such mode, the SSL-client application is not verified by the SSL-server application. Only the server is
verified.
3 Heavy Lightweight
EMS vs RV
1. RV is used for faster messaging where EMS is used for reliable messaging
2. RV does not support persistent messaging
3. RV supports bus architecture whereas EMS supports hub and spoke
4. RV is developed by TIBCO but EMS is developed in c language
What is REST?
Representational State Transfer (REST) is a platform-and-language-independent architectural style used in
building services for distributed systems and networked applications. REST ignores the details of component
implementation the key features of REST architectural style is:
Client-server architecture: Provides a separation of implementation details between clients and servers.
Stateless communication: During a client-server communication, the server does not store any
session information, making the client-server communication stateless. Every request is complete in
itself and must include all the information required to complete the request.
Cacheability: Provides an option to the client to cache response data and reuse it later for equivalent
requests; thus, partially eliminating some client-server interactions. This results in improved
scalability and performance.
What is a Resource?
REST APIs operate on resources that are defined within a REST interface file such as a Swagger
specification. A resource is a representation of a thing (a noun) on which the REST APIs (verbs) operate.
Some examples of a resource are a user, a book, or a pet. The REST operations, POST, GET, PUT, and
DELETE operate on a resource. Individual instances of a resource are identified by a unique identifier
within the resource such as an ID or name.
"include" Component - This component brings all declarations and definitions of an external schema
document into the current schema. The external schema document must have the same target
namespace as the current schema. "include" components are usually used to build a new schema by
extending existing schema documents.
"import" Component - This component offers the same functions as the "include" component except that
the included schema document has a different target namespace. "import" components are usually used
to build a new schema by borrowing element declarations from existing schema documents from other
namespaces.
Use xsd:include brings all declarations and definitions of an external schema document into the current
schema.
Use xsd:import to bring in an XSD from a different namespace and used to build a new schema by
extending existing schema documents.
The difference between the include element and the import element is that the import element allows
references to schema components from schema documents with different target namespaces and the
include element adds the schema components from other schema documents that have the same target
namespace (or no specified target namespace) to the containing schema. In short, the import element
allows you to use schema components from any schema; the include element allows you to add all the
components of an included schema to the containing schema.
he fundamental difference between include and import is that you must
use import to refer to declarations or definitions that are in a
*different* target namespace and you must use include to refer to
declarations or definitions that are (or will be) in the *same* target
namespace.
You are absolutely right to use xs:import in your schema because the
target namespace of your schema is
http://www.cisco.com/elearning/xsd/ciscomd_v001 but the target
namespace of the schema that you're importing is
http://www.imsglobal.org/xsd/imsmd_rootv1p2p2.
XML Schema Sequence Element
The sequence element specifies that the child elements must appear in a sequence. Each
child element can occur from 0 to any number of times.
https://TIBCO4all.com/2016/01/20/how-to-configure-TIBCO-ems-fault-tolerance-and-load-balancing/
EndpointURL:- its the url in the server service is hosted and can be accessed by third party
soap action: - which program needs to be invoked while calling a webservice
Generate Error: - is primarily used for user defined errors
Catch: - can be used for exceptions
We can use tib:render-xml function instead of Render XML activity if we are not modifying XML structure.
We can't set encoding with the function, whereas with activity we can.
By default, Render XML activity do the XML validation, not Schema validation.
Hence we can't catch all the exceptions from Adapter in BW using Error path.
So we need to use either "catch" or "Write to Log" to know the error in BW.
If we have config file and duplicate queue/topic names are present in that conf file, so can we start this EMS
server with that conf file ?
Yes, when starting EMS Server, if the duplicate queue/topic names are present in respecitve conf files, while
starting up, EMS Server displays the duplicate names and the server will get start.
If the duplicate entries are present in bridges.conf then what will happen while starting up the EMS server ?
duplicate entries are present in bridges.conf then it displays the line number where it got the duplicate entry
and server will not get start.
How To Handle / Parse / Split Large XML Files ?
We understood that we cannot fit a 10GB file into only 1GB of memory or 4GB of memory i.e. RAM size.
Even for the 77Mb file it might not be enough depending on your implementation.
Memory issue is a common problem for applications that need to handle large XML files.
Meaning, it loads the whole XML file into memory. This is not really design for working with huge XML.
For reading a large XML file you will need to use a different XML parser that does not load the whole XML (like
stax or sax or other ?). For this you need to use "java code".
Design steps:
Step1 : Get the stax jar file and java code from open source links stax xml parser.
Step2: Do the necessary steps for copy the jar file in TIBCO library folders.
Step3: Design one subprocess with java Code and configure the parameters as required for Jar file.
Step4: Design the Main Process File Pollar, callprocess and Parse XML.
Step5: Select the subprocess (which we designed in Step2) in main process call process.
Solution example posted in this blog with title BW solution for Large XML Files.
Best practise would be to use is File adapter, if we need to process a large file of size around 25MB.
The TIBCO file adapter parses the file and send it over to TIBCO BW Engine. Whenever the filesize is
larger than 25MB the TIBCO BW process hangs or give java.lang.OutOfMemoryError.
2) If the file is delimiter separated type (fixed format or comma separated), then we can use "Parse
Data" palette to read the file in subsets. check the option "Manually specify start record". we can make a
loop for this palette, where we can pass the 'startRecord' value as 100, 200, 300 in each loop. So, that
each loop reads the file with specific 100 lines. Then we can process these 100 lines within loop.
3) we may need to increase Heap Size as well in run time, we can see the setting in TIBCO
administrator while deploying the project.
For threads (max jobs) go to process archive.par->advanced below we can see TIBCO BW Process
Configuration there we can set the max jobs for this read file process to 8.
Event Timeout in Message Event Tab specifies the amount of time (in milliseconds) a message waits if it is
received before this activity is executed.
If the event timeout expires, an error is logged and the event is discarded.
If no value is specified in this field, the message waits indefinitely.
If we specify a shorter timeout, then we can meet the requirement given in the question.
SSL Tracing Information - Enable
For troubleshooting any problem related to SSL configuration in BW, it helps to enable the following
tracing properties:
Trace.Task.*=true (client-side SSL tracing information is made available)
Trace.Startup=true
Trace.JC.*=true
Trace.Engine=true
Trace.Debug.*=true
bw.plugin.http.server.debug: true (server-side SSL tracing information is made available)
We can specify the tracing properties in a custom properties file anywhere on your file system (e.g. in
C:\test\props.cfg) then reference the file in your C:\TIBCO\designer\5.3\bin\designer.tra file using the
property
java.property.testEngine.User.Args p c:/test/props.cfg
After updating your designer.tra file, we must restart Designer in order for the updates to take effect.
When starting an Adapter Service from the TIBCO Designer Adapter Tester, you might encounter this error:
Failed to load shared library, library name: adb55.dll.
Fix this error with the following steps:
1. Open C:\WINDOWS\system32.
2. Open the TIBCO RV home directory (it might be C:\TIBCO\tibrv\8.1\bin).
3. Copy the libeay32.dll and the ssleay32.dll from the TIBCO RV home directory to the system32 directory.
4. Say yes if you are prompted to replace the files.
Restart your TIBCO Designer and try again.
The subscription service uses two logical layers when processing a message. The first layer decodes
data from the message and the second layer provides the database transaction. If an exception
occurs in the first layer, the adapter logs the message to the opaque exception table. In the second
layer, if any DML command fails at any level, the adapter rolls back this transaction and starts another
transaction, inserting into exception tables. If the insert into exception table transaction fails, the
adapter then logs the message to the opaque exception table.
In other means, ff some error occurred when the sub service insert/update/delete data in target table,
the error information will be inserted in the exception table. The exception table contained the
columns of the target table. But sometimes, error occurred on insert data into exception table. For
example, insert some character value into some number fields, this error will be inserted into opaque
table. The opaque table doesnt contain the columns of the target table.
what's JNDI ?
The Java Naming and Directory Interface (JNDI) is an API for directory service that allows clients to discover and lookup
data and objects via a name. Like all Java APIs that interface with host systems, JNDI is independent of the underlying
implementation. Additionally, it specifies a service provider interface (SPI) that allows directory service
implementations to be plugged into the framework. The implementations may make use of a server, a flat file, or a
database; the choice is up to the vendor.
JNDI is also used as an abstraction of underlying implementation. JNDI urls would not be changed even if
the ems server url has changed.
EMS uses JNDI to provide lookup for administered objects like connection factories, queues, topics
clientID=client-id[connect_attempt_count|connect_attempt_delay| connect_attempt_timeout|
reconnect_attempt_count| reconnect_attempt_delay|reconnect_attempt_timeout = value] [ssl-prop =
value]*
The ThreadCount property defines the amount of threads (java threads) which execute all you process.
So, with the default value of 8 threads you can run 8 job simultaneously.
The StepCount on the other hand defines the amount of activities executed before a thread can context
switch into another job.
Sample scenario:
After the first job completes the forth activity, the thread is freed and can be assigned to another paused
job. So the first job will be paused and the third job starts to execute.
When the second job reaches the forth activity, this thread will be freed and is available for re-
assignement. So the second jobs pauses and the first resumes.
After the third job reaches its forth activity, the thread is freed again and resumes job number one (and
completes this one). Afterwards Job number 3 get completed.
All of this is a theoretical scenario. What you usually need is to set the amount of concurrent jobs (so
ThreadCount). The StepCount is close to irrelevant, because the engine will take care of the pooling and
mapping of physical threads to virtual BW jobs.
Where as ActiveMatrix MQ plugins enables developers to directly interact with MQ destinations and there
is no additional deployment of adapter service required.
TIBCO BW 5.x and BW 6.x are different product branches. TIBCO BW 6.x is a successor of tibco bw
express which was directed atsmaller companies, while BW5.x was (and still is) directed at enterprises.
Basically they're different products with similar names.
As a note, I can point out that last time I've checked official support end dates for both products, BW 5.x
had later end dates than BW 6.x. I suppose BW 5.x has a bigger customer base.
With BW 6.x REST palette is standard and not a separate plugin you need to purchase. IDE for
development is based on Eclipse and deployment is possible directly from BW studio and plugins are
available to integrate with Maven etc.. so basically, CI/CD is possible. As IDE is eclipse based
Design/Debug/Java etc... perspectives are possible.
ProjLib Vs GVs
You have to create one properties file for GV's whose reference you have to give in one file named same
as your project name is created for your project, whenever you run first time any process in your project.
usrargs = -p D/://property//ProjectName.prop
Now , In property file you have to mention all GV value you want to change in runtime like this :
tibco.clientVar.TestProject/Connection/JMS/Username=user1
tibco.clientVar.TestProject/Connection/DB/Timeout=60
So, mention how many variables you want to change in runtime into this property file.
1. In your project, add an AliasLibrary task from the General palette. Add the jar file to the AliasLibrary
containing the Class you want to access.
2. Within a BusinessWorks process activity, drag a "Java Method" task onto the canvas. Use the
configuration tab to specify the AliasLibrary and then use the finder to locate the Class and method
you wish to invoke. The "Advanced" tab gives you some options for managing the java instance
lifecycle associated with this method call.
Optionally, if you want to instantiate a global java instance which is shared among multiple
jobs/processes, then use the "Java Global Instance" task from the Java palette. In the configuration tab,
point to the AliasLibrary and use the finder to locate the Class and static method you want to execute. The
"Java Method" task can be used to invoke a method on this global instance.
The "Java Global Instance" may also be necessary if you don't have a default constructor on your java
class.
Looks like from our testing that there are settings on both the server and the client that enable this feature.
On the client side, the SetReconnAttemptCount, Delay, Timeout govern the attempts the client tries to
reconnect once its aware of a server failover / connection failover.
In our testing, we used a single server environment, listed the server twice in the connection string (using
the trick you outlined above) and when that server was taken offline, we received a client notification of
the failover process taking affect (we enabled Tibems.SetExceptionOnFTSwitch(true)) and when the
server was brought back online, our client seemlessly reconnected without missing a beat. We didn't need
to code anything, the internal reconnect logic worked its magic.
On the server side, fault tolerance needs to be enabled and I believe server-client and client-server
heartbeats need to be enabled (though this has not yet been verified).
JDBC:
The JDBC transaction allows multiple JDBC activities that access the same
database connection to participate in a transaction. Only JDBC activities that use
the same JDBC Connection participate in this transaction type, but other activities
can be part of the transaction group. If the transaction commits, all JDBC activities
using the same JDBC connection in the transaction group commit. If the
transaction rolls back, all JDBC activities using the same JDBC connection in the
transaction group roll back.
The transaction group commits automatically if all activities in the group
complete and a non-error transition is taken out of the transaction group. If any
errors occur while processing the activities in the group, even errors in non-JDBC
activities, the transaction is rolled back and an error is returned (you should have
an error transition out of the group to handle this situation).
Individual JDBC activities can override the default transaction behavior and
commit separately.
JTA:
The Java Transaction API (JTA) UserTransaction type allows JDBC, JMS,
ActiveEnterprise Adapter (using JMS transports), and EJB activities to participate
in transactions. JTA specifies standard Java interfaces between a transaction
manager and the parties involved in a distributed transaction system: the
resource manager, the application server, and the application. Sun Microsystems
developed and maintains the API.
For activities that use the JMS transport, request/reply operations cannot
participate in a JTA transaction.
Not all application servers permit JMS and JDBC operations to participate in the
JTA transaction. Refer to your application server documentation for more
information about supported operations. If the application server does not permit
an operation, TIBCO ActiveMatrix BusinessWorks still allows you to configure
the operations in the transaction. However, no exception is raised and the
operations that are not supported by the application server are performed
independent of the transaction.
If the transaction commits, all eligible activities in the transaction group commit.
If the transaction rolls back, all eligible activities in the transaction group roll
back. The transaction group commits automatically if all activities in the group
complete and a non-error transition is taken out of the transaction group. If any
errors occur while processing the activities in the group, even errors in activities
that do not participate in the transaction, the transaction is rolled back and an
error is returned. You should create an error transition out of the group to handle
this situation.
XA:
In addition to the components above, the performance of the BusinessWorks engine is also affected by external factors
such as
rate of incoming messages,
network latency,
performance of external applications with whom BW processes communicate, and
other OS processes that may be running on the system
UnDeploy Command
Delete Command
The deployment configuration file and EAR file are created in the c:\temp folder. The application
is embedded in root/folder1/, which is relative to the Application Management root in the TIBCO
Administrator GUI.
We can export all applications EARs in an administration domain using the appManage
-batchExport option.
Example,
AppManage -batchExport -user <user name> -pw <password> -domain <domain name> -dir
c:\temp\test