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 josephottinger
Date Tue, 16 Mar 2010 14:20:09 GMT
Dear Wiki user,

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

The "ExamplesPage" page has been changed by josephottinger.
The comment on this change is: Adding spring config example.
http://wiki.apache.org/jackrabbit/ExamplesPage?action=diff&rev1=33&rev2=34

--------------------------------------------------

  }
  }}}
  
+ == Spring Configuration ==
+ 
+ You can create a Repository reference in Spring in multiple ways, but here's one that uses
the RepositoryImpl class:
+ 
+     <bean id="repository" class="org.apache.jackrabbit.core.RepositoryImpl">
+         <constructor-arg index="0" ref="config" />
+         </bean>
+     <bean id="config" class="org.apache.jackrabbit.core.config.RepositoryConfig" factory-method="create">
       
+         <constructor-arg index="0" value="./repository.xml"/>
+         <constructor-arg index="1" value="." />
+     </bean>
+ 
+ This will create a repository in the current directory, using ./repository.xml as the configuration
file. This isn't as complete as se-jcr will be (hopefully) but this does work with Spring
3.0 and JackRabbit 2.0.
+ 
  == See also ==
  
   * [[EncodingAndEscaping]]

Mime
View raw message