public class ManagedConnectionFactoryImpl extends Object implements ManagedConnectionFactory, ResourceAdapterAssociation, RepositoryManagement
ManagedConnection
(the physical connection).
It also is a factory for ConnectionFactory
s.
Constructor and Description |
---|
ManagedConnectionFactoryImpl() |
ManagedConnectionFactoryImpl(RepositoryDescriptor repositoryDescriptor) |
Modifier and Type | Method and Description |
---|---|
void |
activateServer()
Activates the VCS server used for remote connections.
|
int |
clearCaches()
Clears all the caches.
|
Object |
createConnectionFactory() |
Object |
createConnectionFactory(ConnectionManager connectionManager) |
ManagedConnection |
createManagedConnection(Subject subject,
ConnectionRequestInfo connectionRequestInfo) |
void |
deactivateServer()
Deactivates the VCS server used for remote connections.
|
int |
getActiveSessionsCount()
Gets the number of active sessions.
|
BinaryGarbageCollector |
getBinaryGarbageCollector()
Gets the binary GC for this repository.
|
Collection<MapperClientInfo> |
getClientInfos()
Get info about current VCS server clients
|
PrintWriter |
getLogWriter() |
String |
getName()
Gets the repository name.
|
String |
getProperty() |
ResourceAdapter |
getResourceAdapter() |
String |
getServerURL()
Which is the remote location ?
TODO this info would be better served by a provisioning service.
|
String |
getXaDataSource() |
boolean |
isServerActivated()
Is the server available remotely ?
|
void |
markReferencedBinaries(BinaryGarbageCollector gc)
Marks the binaries actually in use with the GC so that they won't be
deleted.
|
ManagedConnection |
matchManagedConnections(Set set,
Subject subject,
ConnectionRequestInfo cri)
Returns a matched connection from the candidate set of connections.
|
static Map<String,String> |
parseProperties(String expr)
Parses a string of the form:
key1=val1;key2=val2;... and
collects the key/value pairs. |
void |
processClusterInvalidationsNext()
Makes sure that the next transaction will process cluster invalidations.
|
void |
setLogWriter(PrintWriter out) |
void |
setName(String name) |
void |
setProperty(String property)
Properties are specified in the format key=val1[;key2=val2;...]
|
void |
setResourceAdapter(ResourceAdapter resourceAdapter)
Called by the application server exactly once to associate this
ManagedConnectionFactory with a ResourceAdapter.
|
void |
setXaDataSource(String xaDataSourceName) |
void |
shutdown() |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals, hashCode
public ManagedConnectionFactoryImpl()
public ManagedConnectionFactoryImpl(RepositoryDescriptor repositoryDescriptor)
public void setName(String name)
public String getName()
RepositoryManagement
getName
in interface RepositoryManagement
public void setXaDataSource(String xaDataSourceName)
public String getXaDataSource()
public void setProperty(String property)
If a value has to contain a semicolon, it can be escaped by doubling it.
property
- parseProperties(String)
public String getProperty()
public void setResourceAdapter(ResourceAdapter resourceAdapter) throws ResourceException
setResourceAdapter
in interface ResourceAdapterAssociation
ResourceException
public ResourceAdapter getResourceAdapter()
getResourceAdapter
in interface ResourceAdapterAssociation
public void setLogWriter(PrintWriter out)
setLogWriter
in interface ManagedConnectionFactory
public PrintWriter getLogWriter()
getLogWriter
in interface ManagedConnectionFactory
public Object createConnectionFactory() throws ResourceException
createConnectionFactory
in interface ManagedConnectionFactory
ResourceException
public Object createConnectionFactory(ConnectionManager connectionManager) throws ResourceException
createConnectionFactory
in interface ManagedConnectionFactory
ResourceException
public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo connectionRequestInfo) throws ResourceException
createManagedConnection
in interface ManagedConnectionFactory
ResourceException
public ManagedConnection matchManagedConnections(Set set, Subject subject, ConnectionRequestInfo cri) throws ResourceException
Called by the application server when it's looking for an appropriate connection to server from a pool.
matchManagedConnections
in interface ManagedConnectionFactory
ResourceException
public int getActiveSessionsCount()
RepositoryManagement
getActiveSessionsCount
in interface RepositoryManagement
public int clearCaches()
RepositoryManagement
clearCaches
in interface RepositoryManagement
public void processClusterInvalidationsNext()
RepositoryManagement
processClusterInvalidationsNext
in interface RepositoryManagement
public BinaryGarbageCollector getBinaryGarbageCollector()
RepositoryManagement
getBinaryGarbageCollector
in interface RepositoryManagement
public void markReferencedBinaries(BinaryGarbageCollector gc)
RepositoryManagement
The passed GC may or may not be the one returned by
RepositoryManagement.getBinaryGarbageCollector()
in case it's been determined that
another repository's GC is pointing to the same binary data.
markReferencedBinaries
in interface RepositoryManagement
gc
- the binary garbage collector to use for this repository's
binariespublic void shutdown()
public static Map<String,String> parseProperties(String expr)
key1=val1;key2=val2;...
and
collects the key/value pairs.
A ';' character may end the expression. If a value has to contain a ';', it can be escaped by doubling it.
Examples of valid expressions: key1=val1
,
key1=val1;
, key1=val1;key2=val2
,
key1=a=b;;c=d;key2=val2
.
Syntax errors are reported using the logger and will stop the parsing but already collected properties will be available. The ';' or '=' characters cannot be escaped in keys.
expr
- the expression to parsepublic void activateServer()
RepositoryManagement
activateServer
in interface RepositoryManagement
public void deactivateServer()
RepositoryManagement
deactivateServer
in interface RepositoryManagement
public Collection<MapperClientInfo> getClientInfos()
RepositoryManagement
getClientInfos
in interface RepositoryManagement
public boolean isServerActivated()
RepositoryManagement
isServerActivated
in interface RepositoryManagement
public String getServerURL()
RepositoryManagement
getServerURL
in interface RepositoryManagement
Copyright © 2011 Nuxeo SA. All Rights Reserved.