Hi All,
I am using JackRabbit with Jboss server. Now I would
like to save the Inputstream to the Repository.
I am getting RemoteRepository by using the following
code.
Hashtable<String, String> env = new Hashtable<String,
String>();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.jackrabbit.core.jndi.provider.DummyInitialContextFactory");
env.put(Context.PROVIDER_URL, "localhost:1099");
env.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
InitialContext ctx;
RemoteSession session = null;
try {
ctx = new InitialContext(env);
RemoteRepository repository = (RemoteRepository) ctx
.lookup("jnp://localhost:1099/jcrServer");
session = repository.login();
System.out.println("Logged in successfully");
} catch (NamingException e) {
e.printStackTrace();
} catch (RemoteException e) {
e.printStackTrace();
} catch (RepositoryException e) {
e.printStackTrace();
}
Now the problem is I am not able to save the input
stream to the RemoteNode.
The RemoteNode has the method setProperty(String
name,Value value);
Here I am not able to instantiate the Value object,as of
my knowledge we can get the Value object from ValueFactory but I am not
able to get the ValueFactory from RemoteRepository.
Please help me to solve this.
Thanks in Advance for your help.
Anil K.