Skip to content

Commit

Permalink
JBTM-1990 added more documentation to describe a possible FatalError …
Browse files Browse the repository at this point in the history
…if the store cannot be contacted
  • Loading branch information
tomjenkinson committed Oct 21, 2013
1 parent 51c4cdc commit c2dd9c5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
Expand Up @@ -37,6 +37,8 @@

import javax.naming.NamingException;

import com.arjuna.ats.arjuna.exceptions.FatalError;

/**
* Do not return a connection which participates within the
* transaction 2-phase commit protocol! All connections will have
Expand All @@ -53,13 +55,15 @@ public interface JDBCAccess
* connections is used, this method may be called up to maxpoolsize
* times. It <EM>must<EM> not return the same connection each time.
* @throws NamingException
* @throws {@link FatalError} In case the configured store cannot be connected to
*/

public Connection getConnection () throws SQLException;

/**
* This method can be used to pass additional information to the
* implementation.
* @throws {@link FatalError} In case the configured store cannot be connected to
*/

public void initialise (StringTokenizer stringTokenizer);
Expand Down
Expand Up @@ -42,6 +42,7 @@

import com.arjuna.ats.arjuna.common.ObjectStoreEnvironmentBean;
import com.arjuna.ats.arjuna.common.Uid;
import com.arjuna.ats.arjuna.exceptions.FatalError;
import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
import com.arjuna.ats.arjuna.logging.tsLogger;
import com.arjuna.ats.arjuna.objectstore.StateStatus;
Expand Down Expand Up @@ -624,6 +625,7 @@ public boolean write_state(Uid objUid, String typeName,
* Set up the store for use.
*
* @throws NamingException
* @throws {@link FatalError} In case the configured store cannot be connected to
*/
public void initialise(final JDBCAccess jdbcAccess, String tableName,
ObjectStoreEnvironmentBean jdbcStoreEnvironmentBean)
Expand Down
Expand Up @@ -38,6 +38,7 @@

import com.arjuna.ats.arjuna.common.ObjectStoreEnvironmentBean;
import com.arjuna.ats.arjuna.common.Uid;
import com.arjuna.ats.arjuna.exceptions.FatalError;
import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
import com.arjuna.ats.arjuna.logging.tsLogger;
import com.arjuna.ats.arjuna.objectstore.ObjectStoreAPI;
Expand Down Expand Up @@ -192,6 +193,13 @@ public synchronized void unpackFrom(InputBuffer buff) throws IOException {
this.tableName = buff.unpackString();
}

/**
* Create a new JDBCStore
*
* @param jdbcStoreEnvironmentBean The environment bean containing the configuration
* @throws ObjectStoreException In case the store environment bean was not correctly configured
* @throws {@link FatalError} In case the configured store cannot be connected to
*/
public JDBCStore(ObjectStoreEnvironmentBean jdbcStoreEnvironmentBean)
throws ObjectStoreException {
this.jdbcStoreEnvironmentBean = jdbcStoreEnvironmentBean;
Expand Down

0 comments on commit c2dd9c5

Please sign in to comment.