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.

Variable Index

 o BIZ_ADMIN
 o BIZ_STOP
 o ERROR_QUEUE1
 o ERROR_QUEUE2
 o IN_QUEUE1
 o IN_QUEUE2
 o JMS_FACTORY
 o JNDI_FACTORY

Constructor Index

 o BizConfig()
Constructor

Method Index

 o getBizBeans()
Returns a Vector of registered EJB names (String objects).
 o getBizBeansForDoc(String)
Returns list of EJB Class objects for the named document type.
 o getBizHome()
Returns the home directory for this server
 o getBizServers()
Returns the names of loaded Biztalk Servers
 o getConfig(String)
Returns a BizConfig object.
 o getConfigFile()
Returns name of Biztalk server config file used to configure this BizConfig object.
 o getErrorQ()
Returns name of JMS error queue name used by this Biztalk server.
 o getInQ()
Returns name of JMS incoming queue name used by this Biztalk server.
 o getMappings()
Returns configured mapping between document types and EJBs.
 o getName()
Returns name of Biztalk server represented in this BizConfig object.
 o getURI()
Returns URI that this Biztalk server recognizes as its own.
 o getVerbose()
Returns debug level
 o loadConfig(String)
The BizConfig loader reads the config file for the named BizServer and stores the info into this object.
 o printConfig()
prints the info in BizConfig object to an output stream
 o reloadConfig()
reloadConfig reconfigures from an already configured Bizserver.
 o setLog(PrintWriter)
Establish log file to be used by this object.

Variables

 o JNDI_FACTORY

 public static final String JNDI_FACTORY

 o JMS_FACTORY

 public static final String JMS_FACTORY

 o IN_QUEUE1

 public static final String IN_QUEUE1

 o IN_QUEUE2

 public static final String IN_QUEUE2

 o ERROR_QUEUE1

 public static final String ERROR_QUEUE1

 o ERROR_QUEUE2

 public static final String ERROR_QUEUE2

 o BIZ_ADMIN

 public static final String BIZ_ADMIN

 o BIZ_STOP

 public static final String BIZ_STOP

Constructors

 o BizConfig

 public BizConfig()

Constructor

Methods

 o setLog

 public void setLog(PrintWriter ps)

Establish log file to be used by this object.

Parameters:
ps - output class
 o 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.
 o reloadConfig

 public boolean reloadConfig()

reloadConfig reconfigures from an already configured Bizserver.

Returns:
true if successful, false if failed.
 o getBizHome

 public String getBizHome()

Returns the home directory for this server

Returns:
String containing home directory
 o getBizServers

 public Vector getBizServers()

Returns the names of loaded Biztalk Servers

Returns:
Vector containing the names of nstantiated Biztalk Servers.
 o 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.
 o printConfig

 public void printConfig()

prints the info in BizConfig object to an output stream

 o 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.
 o 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.
 o getVerbose

 public boolean getVerbose()

Returns debug level

Returns:
True if debugging.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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