- projectResource = session.syncRequest( Queries.resource( projectURI ) );
- } catch (ResourceNotFoundException nfe) {
- // Project was not found
- if (workspacePolicy == RecoveryPolicy.ThrowError)
- throw new PlatformException("Project Resource "+projectURI+" is not found in the database.");
- // Create empty project with no features
- try {
- Transaction.startTransaction(session, true);
+ projectResource = session.syncRequest(new PossibleResource(projectURI));
+ if (projectResource == null) {
+ // Project was not found
+ if (workspacePolicy == RecoveryPolicy.ThrowError)
+ throw new PlatformException("Project Resource "+projectURI+" is not found in the database.");
+ // Create empty project with no features