Seam Cron Concurrency
by Dave Oxley
Hi Pete,
I have raised and am trying to implement SEAMCRON-33 which adds concurrency control to Seam Cron. The API's I was thinking of implement are:
@AsyncRestriction(group = "test_group")
public boolean canRun(StatusIndexes indexes) {
HasLessThan max = new HasLessThan(MAX_CONCURRENT);
max = indexes.iterateRunningProcesses(max);
indexes.iterateWaitingToRunProcesses(max);
return max.hasLess();
}
StatusIndexes will be an interface providing various methods to interrogate the state of other jobs in the queue and true or false should be returned to run or not run another.
And reference the group with a new attribute on the Asynchronous annotation:
@Asynchronous(group = "test_group")
public void doWork() {
....
}
or a scheduled annotation:
public void every40Seconds(@Observes @Every(group = "test_group", nth = 40, value = Interval.SECOND) Trigger t) {
....
}
I have a few questions:
1. Are you ok with the API changes? Do you have a better/different idea for the API changes?
2. @AsynRestriction is a new feature for asynchronous or scheduling methods. Therefore it doesn't really make sense to be a new spi. But then if I implement it in the QueuJ scheduling and asynchronous as a new feature it will just be an unimplemented feature for the Quartz provider. How would you want this handled? Just document that it only works for the QueuJ provider?
3. We will need to scan all classes on the classpath for methods marked with the @AsynRestriction annotation at startup. Is there a utility to do this or some example code?
Cheers,
Dave.
12 years, 10 months
Re: [seam-dev] Stuck with bug in Weld + Jdk6_u26
by Antoine Sabot-Durand
Yes I switched to weld 1.1.1 with JBoss AS7. There is no documentation to upgrade Weld in JBoss AS 6 and 6.1/6.0.1 isn't visible anywhere (if it shows up one day). This bug is triggered when dealing with Instances<>.select() method. If the fixes are only "upgrade to JBoss 7" or "downgrade your jvm", I guess lot of people will be upset soon.
Antoine SABOT-DURAND
Le 5 juil. 2011 à 09:23, Ian Michell a écrit :
> I found that using weld 1.1.1 seems to fix the problem for me, as I happen to use seam-faces and seam-interational.
>
> Downgrading a JVM is not really a good option as so many suggest!
>
> On 4 July 2011 13:36, Antoine Sabot-Durand <antoine(a)sabot-durand.net> wrote:
> I can't because I use Lion :-). More over I need a solution because this Weld bug will stay for coming JDK update. I'll try to follow JBoss 7 path... In fact this bug is a big issue for everyone since all the platform are impacted : no CDI on JBoss 6 if you have jdk 1.6_u25 or more...
>
> regards,
>
> Antoine SABOT-DURAND
>
>
>
> Le 4 juil. 2011 à 13:59, John D. Ament a écrit :
>
>> What about downgrading the JVM?
>>
>> On Mon, Jul 4, 2011 at 1:01 AM, Jason Porter <lightguard.jp(a)gmail.com> wrote:
>> Probably can update weld in AS6, to use AS7 until the bug is fixed, just add joda-time manually.
>>
>> Sent from my iPhone
>>
>> On Jul 3, 2011, at 22:57, Antoine Sabot-Durand <antoine(a)sabot-durand.net> wrote:
>>
>> > Hi Team,
>> >
>> > The last apple java update bring jdk to 1.6.0_26 version and triggers this bug in my webapp (JBoss 6) : https://issues.jboss.org/browse/WELD-897
>> >
>> > I tried to switch to JBoss 7 CR1 but got some exception with seam international and joda time missing. Removing Seam-Faces which pull Seam-International let the app deploy without exception, but all the backing beans calls seem to be dead (the page displays but all EL is ignored).
>> >
>> > So is there were a way to update weld in JBoss 6 or something I'm missing with JBoss 7 ?
>> >
>> > Thks,
>> >
>> > Antoine
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > _______________________________________________
>> > seam-dev mailing list
>> > seam-dev(a)lists.jboss.org
>> > https://lists.jboss.org/mailman/listinfo/seam-dev
>>
>> _______________________________________________
>> seam-dev mailing list
>> seam-dev(a)lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/seam-dev
>>
>
>
> _______________________________________________
> seam-dev mailing list
> seam-dev(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/seam-dev
>
>
12 years, 10 months