Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
ConnectionFactory.java
Package: blacktie-2.0.0.M3-src.zip [view]
Upload User: xfwatch
Upload Date: 2020-12-14
Package Size: 872k
Code Size: 1k
Category:
MiddleWare
Development Platform:
Java
- package org.jboss.blacktie.jatmibroker.xatmi;
- import java.util.Properties;
- import org.jboss.blacktie.jatmibroker.core.conf.AtmiBrokerClientXML;
- /**
- * This is a factory that will create connections to remote Blacktie services.
- *
- * @see Connection
- * @see ConnectionException
- */
- public class ConnectionFactory {
- /**
- * The properties inside the connection factory.
- */
- private Properties properties = null;
- /**
- * Get the default connection factory
- *
- * @return The connection factory
- * @throws ConnectionException
- */
- public static synchronized ConnectionFactory getConnectionFactory()
- throws ConnectionException {
- return new ConnectionFactory();
- }
- /**
- * Create the connection factory
- *
- * @throws ConnectionException
- * In case the configuration could not be loaded
- */
- private ConnectionFactory() throws ConnectionException {
- try {
- AtmiBrokerClientXML xml = new AtmiBrokerClientXML();
- properties = xml.getProperties();
- } catch (Exception e) {
- throw new ConnectionException(-1, "Could not load properties", e);
- }
- }
- private ConnectionFactory(Properties prop) {
- properties = prop;
- }
- /**
- * Get the connection.
- *
- * @return The connection
- * @throws ConnectionException
- */
- public Connection getConnection() throws ConnectionException {
- return new Connection(properties);
- }
- }