01: /**********************************************************************
02: Copyright (c) 2003 Erik Bengtson and others. All rights reserved.
03: Licensed under the Apache License, Version 2.0 (the "License");
04: you may not use this file except in compliance with the License.
05: You may obtain a copy of the License at
06:
07: http://www.apache.org/licenses/LICENSE-2.0
08:
09: Unless required by applicable law or agreed to in writing, software
10: distributed under the License is distributed on an "AS IS" BASIS,
11: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12: See the License for the specific language governing permissions and
13: limitations under the License.
14:
15: Contributors:
16: 2006 Andy Jefferson - changed to be generic connection provider
17: ...
18: **********************************************************************/package org.jpox.store.poid;
19:
20: import org.jpox.ManagedConnection;
21:
22: /**
23: * Connection provider for a PoidGenerator that requires connections to their
24: * datastore.
25: *
26: * @version $Revision: 1.2 $
27: */
28: public interface PoidConnectionProvider {
29: /**
30: * Provides a Connection for a PoidGenerator. The returned connection should
31: * be cast to the appropriate type for the datastore.
32: * @return The connection
33: */
34: ManagedConnection retrieveConnection();
35:
36: /**
37: * Releases the Connection. Inform to the provider that connection is no
38: * longer in use
39: */
40: void releaseConnection();
41: }
|