jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Jackrabbit Wiki] Update of "ExamplesPage" by ThomasMueller
Date Tue, 13 Jun 2006 15:07:04 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jackrabbit Wiki" for change notification.

The following page has been changed by ThomasMueller:
http://wiki.apache.org/jackrabbit/ExamplesPage

The comment on the change is:
Added sample code for Standalone RMI Server / Client

------------------------------------------------------------------------------
  ((org.apache.jackrabbit.core.RepositoryImpl) session.getRepository()).shutdown();
  }}}
  
+ === Simple Standalone RMI Server / Client ===
+ 
+ Server:
+ {{{
+ Repository repository = new TransientRepository();
+ ServerAdapterFactory factory = new ServerAdapterFactory();
+ RemoteRepository remote = factory.getRemoteRepository(repository);
+ Registry reg = LocateRegistry.createRegistry(1100);
+ reg.rebind("jackrabbit", remote);
+ }}}
+ 
+ Client:
+ {{{
+ ClientRepositoryFactory factory = new ClientRepositoryFactory();
+ Repository repository = factory.getRepository("rmi://localhost:1100/jackrabbit");
+ }}}
+ 

Mime
View raw message