On Oct 30, 2008, at 7:43 PM, Alex Grönholm wrote:
I think we could do with a less complicated solution. As it stands, I have to reflectively scan the bean class for methods and then call DeploymentInfo.getMethodSchedule() on each to see if the method has any schedules on it. CoreDeploymentInfo has a map of method -> ScheduleExpression, but there is no way to retrieve that. I will also need the persistent and info properties, so why don't you just give me a map of method -> ScheduleInfo[] and let me worry about building ScheduleExpressions and TimerConfigs? This is somewhat blocking my development so it'd be appreciated if you could do that in the near future.
You definitely shouldn't need to do any annotation scanning. We don't have any code that does annotation scanning in the runtime stack, so if there is some we'll need to find another way of doing it.
Anyway, I wrapped up ScheduleExpression and TimerConfig into an object, ScheduleData, and assocted a list of those to a method via a new MethodSchedule object. Then I adjusted DeploymentInfo to return a list of MethodSchedule objects. So no need to pass in a method as before. I had modeled the code after the interceptor binding code where passing in a method is more convenient than getting all the bindings for all the methods, but here that obviously doesn't make sense. At least it's more obvious once you've pointed it out to me :)
We should be good to go on the metadata aggregation side. -David
