Session.java Addition

Version 3.1 by David Avendasora on 2008/03/06 09:48
Warning: For security reasons, the document is displayed in restricted mode as it is not the current version. There may be differences and errors due to this.

These additions are based on a more advanced Stateless RMI concept by Florijan Stamenkovic.


public EOFetchSpecification clientSideRequestGetFetchSpecification(String fetchSpecification, String entity) {
return getFetchSpecification(fetchSpecification, entity);
}

public EOFetchSpecification getFetchSpecification(String fetchSpecification, String entity){
try{
return EOFetchSpecification.fetchSpecificationNamed(fetchSpecification, entity);
}catch(Exception ex){
NSLog.out.appendln(ex);
return null;
}
}

Unknown macro: color. Click on this message for details.

 Due to security concerns you cannot call FetchSpecifications from the client-side that use a Raw SQL Expression without implementing the delegate method distributionContextShouldFetchObjectsWithFetchSpecification which this code does NOT do.

If you try to, you will get the following exception in the server log:

Unknown macro: color. Click on this message for details.

and this code will return null to the client instead of the expected FetchSpecification.