If you anticipate that you will be needing to do the calculation multiple times you might set up a job. For example if you were displaying lists of accounts due to expire in a week and this was a common transaction. In that case you might want to have a look at the Quartz scheduler.
The Spring Framework has good integration with the Quartz scheduler. Here is an example of a scheduling configuration that expires classified ad postings every hour from an open source project I am working on:
<!-- Scheduled Jobs -->
<bean id="expiryJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="postingDAO" />
<property name="targetMethod" value="expirePostings" />
</bean>
<bean id="cronTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail" ref="expiryJob" />
<!-- run every hour -->
<property name="cronExpression" value="0 0 * * * ?" />
</bean>
<!--
<bean id="extraTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail" ref="expiryJob" />
<property name="cronExpression" value="0 * * * * ?" />
</bean>
-->
<!-- A list of Triggers to be scheduled and executed by Quartz -->
<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref bean="cronTrigger"/>
<!-- <ref bean="extraTrigger"/> -->
</list>
</property>
</bean>