public class TestMiddleware {
public static void main(String[] args) throws MiddlewareException {
String pass = "2JCGN6kheF";
String user = "student33";
Middleware mware = Middleware.getMiddleware(user, pass);
// client 1
UUID c1 = null;
try {
c1 = mware.startTransaction();
} catch (MiddlewareException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
UUID c2 = null;
try {
c2 = mware.startTransaction();
} catch (MiddlewareException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
mware.executeQuery(c1, null, "do some query");
mware.executeQuery(c2, null, "do some query");
mware.executeQuery(c2, null, "query 2");
mware.executeQuery(c1, null, "query 2");
mware.commitTransaction(c1);
mware.commitTransaction(c2);
//mware.shutdown();
}