Hi,
I am creating OJB connections dynamically based on user input:
m_connDesc = new JdbcConnectionDescriptor();
// set the user's conn. parameters, and then...
MetadataManager.getInstance().connectionRepository().addDescriptor(m_con
nDesc);
PersistenceBroker broker =
PersistenceBrokerFactory.createPersistenceBroker(m_connDesc.getPBKey());
However, when the user changes the parameters for this connection (e.g.
port, driver, cache timeout), I'd like to clean up all OJB's knowledge
about the connection and then create a new one.
So far, the only thing that's had any (marginal) effect is the
following:
((ConnectionManagerImpl)broker.serviceConnectionManager()).getUnderlying
ConnectionFactory().releaseAllResources();
MetadataManager.getInstance().connectionRepository().removeDescriptor(m_
connDesc);
... but even that isn't enough. There has to be a better way.
Thanks.