All Examples XML Examples BizTalk Example
Class examples.xml.biztalk.BizConfig
java.lang.Object
|
+----examples.xml.biztalk.BizConfig
- public class BizConfig
- extends Object
The BizConfig class is used to access the config parameters for
the BizTalk server.
- Author:
- Copyright (c) 2000 by BEA Systems, Inc. All Rights Reserved.
-
BIZ_ADMIN
-
-
BIZ_STOP
-
-
ERROR_QUEUE1
-
-
ERROR_QUEUE2
-
-
IN_QUEUE1
-
-
IN_QUEUE2
-
-
JMS_FACTORY
-
-
JNDI_FACTORY
-
-
BizConfig()
- Constructor
-
getBizBeans()
- Returns a Vector of registered EJB names (String objects).
-
getBizBeansForDoc(String)
- Returns list of EJB Class objects for the named document type.
-
getBizHome()
- Returns the home directory for this server
-
getBizServers()
- Returns the names of loaded Biztalk Servers
-
getConfig(String)
- Returns a BizConfig object.
-
getConfigFile()
- Returns name of Biztalk server config file used to configure this BizConfig object.
-
getErrorQ()
- Returns name of JMS error queue name used by this Biztalk server.
-
getInQ()
- Returns name of JMS incoming queue name used by this Biztalk server.
-
getMappings()
- Returns configured mapping between document types and EJBs.
-
getName()
- Returns name of Biztalk server represented in this BizConfig object.
-
getURI()
- Returns URI that this Biztalk server recognizes as its own.
-
getVerbose()
- Returns debug level
-
loadConfig(String)
- The BizConfig loader reads the config file for the named BizServer
and stores the info into this object.
-
printConfig()
- prints the info in BizConfig object to an output stream
-
reloadConfig()
- reloadConfig reconfigures from an already configured Bizserver.
-
setLog(PrintWriter)
- Establish log file to be used by this object.
JNDI_FACTORY
public static final String JNDI_FACTORY
JMS_FACTORY
public static final String JMS_FACTORY
IN_QUEUE1
public static final String IN_QUEUE1
IN_QUEUE2
public static final String IN_QUEUE2
ERROR_QUEUE1
public static final String ERROR_QUEUE1
ERROR_QUEUE2
public static final String ERROR_QUEUE2
BIZ_ADMIN
public static final String BIZ_ADMIN
BIZ_STOP
public static final String BIZ_STOP
BizConfig
public BizConfig()
- Constructor
setLog
public void setLog(PrintWriter ps)
- Establish log file to be used by this object.
- Parameters:
- ps - output class
loadConfig
public boolean loadConfig(String bizName)
- The BizConfig loader reads the config file for the named BizServer
and stores the info into this object. The list of loaded servers is
maintained in the class and accessible via the getBizServers
method.
The home directory used by a Bizserver is the user's current directory.
From there the server is configured from .xml
The queues are "biztalk.jms.name.Incoming" and
"biztalk.jms.name.Error". Note that BizConfig only fully-qualifies the
queue names. Actual setup of queues is the caller's responsibility.
All other config info comes from "home/name.xml which has
the following 'schema':
<?xml version=1.0>
<Bizconfig>
name = "a name"
verbose = "true"|"false"
uri="home address"
<Bean> bean.name</Bean> (0..n)
<Mapping> (0..n)
doc="a doctype"
bean="a bean"
</Mapping>
</Bizconfig>
loadConfig reconfigures from scratch. i.e. a complete XML config
file must be provided. Prior configuration is lost.
- Parameters:
- bizName - name of server to configure.
- Returns:
- true if successful, false if failed.
reloadConfig
public boolean reloadConfig()
- reloadConfig reconfigures from an already configured Bizserver.
- Returns:
- true if successful, false if failed.
getBizHome
public String getBizHome()
- Returns the home directory for this server
- Returns:
- String containing home directory
getBizServers
public Vector getBizServers()
- Returns the names of loaded Biztalk Servers
- Returns:
- Vector containing the names of nstantiated Biztalk Servers.
getConfig
public static BizConfig getConfig(String bizName)
- Returns a BizConfig object.
- Parameters:
- bizName - Name of the Biztalk Server
- Returns:
- BizConfig object representing a particular Biztalk Server.
Returns null if the named server is not loaded.
printConfig
public void printConfig()
- prints the info in BizConfig object to an output stream
getBizBeans
public Vector getBizBeans()
- Returns a Vector of registered EJB names (String objects).
These are the beans that can be mapped to specific Biztalk document types.
- Returns:
- Vector of String objects naming registered EJBs.
Returns null if BizConfig object has not been loaded.
getName
public String getName()
- Returns name of Biztalk server represented in this BizConfig object.
- Returns:
- Name of Biztalk server.
Returns null if BizConfig object has not been loaded.
getVerbose
public boolean getVerbose()
- Returns debug level
- Returns:
- True if debugging.
getConfigFile
public String getConfigFile()
- Returns name of Biztalk server config file used to configure this BizConfig object.
- Returns:
- Name of Biztalk server config file.
Returns null if BizConfig object has not been loaded.
getInQ
public String getInQ()
- Returns name of JMS incoming queue name used by this Biztalk server.
- Returns:
- Name of Biztalk server incoming queue.
Returns null if BizConfig object has not been loaded.
getErrorQ
public String getErrorQ()
- Returns name of JMS error queue name used by this Biztalk server. All
documents received by the Biztalk Server that can not be processed
are placed on this queue. Failures result from invalid document syntax
or internal errors.
- Returns:
- Name of Biztalk server error queue
Returns null if BizConfig object has not been loaded.
getURI
public String getURI()
- Returns URI that this Biztalk server recognizes as its own.
Documents received with To elements that do not match
this URI will be routed to the error queue
- Returns:
- recognized URI.
Returns null if BizConfig object has not been loaded.
getMappings
public Hashtable getMappings()
- Returns configured mapping between document types and EJBs. The
Hashtable returned uses Biztalk document types for the keys. The value
for each key is a Vector of EJB Class objects. The mapping is established
via the Biztalk server configuration file.
- Returns:
- Hashtable representing mapping between doc type and EJBs.
Returns null if BizConfig object has not been loaded.
getBizBeansForDoc
public Vector getBizBeansForDoc(String docType)
- Returns list of EJB Class objects for the named document type.
- Parameters:
- docType - String identifying a Biztalk document type. This
document type is identified in the first element of a Biztalk
document following the \<Body/> element.
- Returns:
- Vector containing EJB Class objects.
Returns null if BizConfig object has not been loaded.
All Examples XML Examples BizTalk Example