Page History
...
Table of Contents | ||||||
---|---|---|---|---|---|---|
|
Configuring Event Listeners
Event Listeners can be created by overriding the the EventListener interface:
Code Block |
---|
<?xml version="1.0" encoding="UTF-8"?>
<beans>
<bean id="dspace" class="org.dspace.utils.DSpace"/>
<bean id="dspace.eventService"
factory-bean="dspace"
factory-method="getEventService"/>
<bean class="org.my.EventListener">
<property name="eventService" >
<ref bean="dspace.eventService"/>
</property>
</bean>
</beans>
|
Architectural Overview
DSpace Kernel
...
In DS2 a session is like an HttpSession (and generally is actually one) so this service is here to allow developers to find information about the current session and to access information in it. The session identifies the current user (if authenticated) so it also serves as a way to track user sessions. Since we use HttpSession directly it is easy to mirror sessions across multiple servers in order to allow for no-interruption failover for users when servers go offline.
Examples
Configuring Event Listeners
Event Listeners can be created by overriding the the EventListener interface:
Code Block |
---|
<?xml version="1.0" encoding="UTF-8"?> <beans> <bean id="dspace" class="org.dspace.utils.DSpace"/> <bean id="dspace.eventService" factory-bean="dspace" factory-method="getEventService"/> <bean class="org.my.EventListener"> <property name="eventService" > <ref bean="dspace.eventService"/> </property> </bean> </beans> |