jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hervé Agnoux <herve.agn...@diaam-informatique.com>
Subject I set a TransientRepository, I get a RepositoryImpl ?
Date Sun, 05 Jun 2011 19:19:31 GMT
Hi,

If I do that :

package com.hum;

import java.io.File;
import javax.jcr.Session;
import org.apache.jackrabbit.core.TransientRepository;

/**
 *
 * @author herve
 */
public class Repo
{
  public static void main(String[] args) throws Exception
  {
    TransientRepository trans = new TransientRepository(
     new File("/some/sort/of/path"));
    Session session = trans.login();
    TransientRepository transgetted = 
     (TransientRepository) session.getRepository();
  }
}


I get :

Exception in thread "main" java.lang.ClassCastException: 
org.apache.jackrabbit.core.RepositoryImpl cannot be cast to 
org.apache.jackrabbit.core.TransientRepository
	at com.hum.Repo.main(Repo.java:20)

Is it a bug or a feature ??

* with jackrabbit 2.1.2.


Mime
View raw message