Well, there's already separate classes for jackrabbit and jeceira... they both have a RepositoryFactoryBean, and when jeceira is able to handle transactions, I'm assuming it will get a LocalTransactionManager as well. The code I'm suggesting would be very simple, and could be added to JcrUtils.java
This way, if the implementation doesn't support workspace creation in a manner that is accessible at runtime, this method will do the right thing. Concrete subclasses that have implementation-specific utilities can also do the right thing and create the workspace. In the case of Jackrabbit, for that to work, the implementation specific subclass would need to have a JcrSessionFactory (set to the default workspace) wired into it.
public void createWorkspace( String name )
throw new InvalidDataAccessApiUsageException(
"JCR does not specify a mechanism for creating workspaces. You must "
+ "use an implementation specific subclass." );
I do agree though, that it may be more work than is needed to make things work for the common case.