Differences between revisions 2 and 3
Revision 2 as of 2004-08-09 15:15:12
Size: 1372
Editor: pcp1270
Comment:
Revision 3 as of 2009-09-20 23:46:26
Size: 1372
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

Id Generator

bean id: IdGenerator

Description

The IdGenerator is used by Jetspeed 2 to generate unique id's were they are required. You can define any number of IdGenerators, however, only one can have the id of IdGenerator, which is the one that Jetspeed 2 will use for generating unique id's when requested. However, you can easily chane this by finding all of the other bean definitions within jetspeed-spring.xml that reference IdGenerator and change them to a custom id generator you have defined OR you can simply change the existing IdGenerator bean to use your own, custom IdGenerator implementation.

Default Configuration

The default implemetation of the IdGenerator uses a simple, sequential alogrithm for generating unique ids. The configuration requires a starting value and optionally a unqiue prefix and suffix.

<bean id="IdGenerator" 
  class="org.apache.jetspeed.idgenerator.JetspeedIdGenerator" init-method="start" destroy-method="stop" >
  <!-- ID Start value -->
  <constructor-arg index="0"><value>65536</value></constructor-arg>
  <!-- ID Prefix -->
  <constructor-arg index="1"><value>P-</value></constructor-arg>
  <!-- ID Suffix -->
  <constructor-arg index="2"><value></value></constructor-arg>
</bean>   

Jetspeed2/PluggableEngineComponents/CoreEngineComponents/IdGenerator (last edited 2009-09-20 23:46:26 by localhost)