forked from banq/jdonframework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add Disruptor(http://code.google.com/p/disruptor/) to DomainEvents, s…
…upports Producer-Consumer mode of Domain Events.
- Loading branch information
Showing
58 changed files
with
1,476 additions
and
641 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,35 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="lib" path="examples/remote_javafx/ext/hessian-3.1.6.jar"/> | ||
<classpathentry kind="lib" path="examples/remote_javafx/lib_client/javafxrt.jar"/> | ||
<classpathentry kind="lib" path="examples/remote_javafx/web/hello.jar"/> | ||
<classpathentry kind="lib" path="j2eelib/hibernate/hibernate-annotations.jar"/> | ||
<classpathentry kind="lib" path="j2eelib/hibernate/hibernate3.jar"/> | ||
<classpathentry kind="lib" path="j2eelib/jboss-j2ee.jar"/> | ||
<classpathentry kind="lib" path="j2eelib/jbosssx.jar"/> | ||
<classpathentry kind="lib" path="j2eelib/jsp-api.jar"/> | ||
<classpathentry kind="lib" path="j2eelib/servlet-api.jar"/> | ||
<classpathentry kind="lib" path="lib/cglib.jar"/> | ||
<classpathentry kind="lib" path="lib/commons-pool-1.5.1.jar"/> | ||
<classpathentry kind="lib" path="lib/ehcache-1.6.2.jar"/> | ||
<classpathentry kind="lib" path="lib/hessian-3.1.6.jar"/> | ||
<classpathentry kind="lib" path="lib/jakarta-regexp-1.1.jar"/> | ||
<classpathentry kind="lib" path="lib/jdom.jar"/> | ||
<classpathentry kind="lib" path="lib/junit.jar"/> | ||
<classpathentry kind="lib" path="lib/log4j.jar"/> | ||
<classpathentry kind="lib" path="strutslib/commons-beanutils.jar"/> | ||
<classpathentry kind="lib" path="strutslib/commons-collections.jar"/> | ||
<classpathentry kind="lib" path="strutslib/commons-digester.jar"/> | ||
<classpathentry kind="lib" path="strutslib/commons-fileupload.jar"/> | ||
<classpathentry kind="lib" path="strutslib/commons-logging.jar"/> | ||
<classpathentry kind="lib" path="strutslib/commons-pool-1.4.jar"/> | ||
<classpathentry kind="lib" path="strutslib/commons-validator.jar"/> | ||
<classpathentry kind="lib" path="strutslib/jakarta-oro.jar"/> | ||
<classpathentry kind="lib" path="strutslib/struts.jar"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | ||
<classpathentry kind="lib" path="lib/picocontainer-1.1.jar"/> | ||
<classpathentry kind="lib" path="lib/scannotation-1.0.2.jar" sourcepath="F:/opensource/scanannotation/scannotation/src/main"/> | ||
<classpathentry kind="output" path="classes"/> | ||
</classpath> | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="lib" path="examples/remote_javafx/ext/hessian-3.1.6.jar"/> | ||
<classpathentry kind="lib" path="examples/remote_javafx/lib_client/javafxrt.jar"/> | ||
<classpathentry kind="lib" path="examples/remote_javafx/web/hello.jar"/> | ||
<classpathentry kind="lib" path="j2eelib/hibernate/hibernate-annotations.jar"/> | ||
<classpathentry kind="lib" path="j2eelib/hibernate/hibernate3.jar"/> | ||
<classpathentry kind="lib" path="j2eelib/jboss-j2ee.jar"/> | ||
<classpathentry kind="lib" path="j2eelib/jbosssx.jar"/> | ||
<classpathentry kind="lib" path="j2eelib/jsp-api.jar"/> | ||
<classpathentry kind="lib" path="j2eelib/servlet-api.jar"/> | ||
<classpathentry kind="lib" path="lib/cglib.jar"/> | ||
<classpathentry kind="lib" path="lib/commons-pool-1.5.1.jar"/> | ||
<classpathentry kind="lib" path="lib/ehcache-1.6.2.jar"/> | ||
<classpathentry kind="lib" path="lib/hessian-3.1.6.jar"/> | ||
<classpathentry kind="lib" path="lib/jakarta-regexp-1.1.jar"/> | ||
<classpathentry kind="lib" path="lib/jdom.jar"/> | ||
<classpathentry kind="lib" path="lib/junit.jar"/> | ||
<classpathentry kind="lib" path="lib/log4j.jar"/> | ||
<classpathentry kind="lib" path="strutslib/commons-beanutils.jar"/> | ||
<classpathentry kind="lib" path="strutslib/commons-collections.jar"/> | ||
<classpathentry kind="lib" path="strutslib/commons-digester.jar"/> | ||
<classpathentry kind="lib" path="strutslib/commons-fileupload.jar"/> | ||
<classpathentry kind="lib" path="strutslib/commons-logging.jar"/> | ||
<classpathentry kind="lib" path="strutslib/commons-pool-1.4.jar"/> | ||
<classpathentry kind="lib" path="strutslib/commons-validator.jar"/> | ||
<classpathentry kind="lib" path="strutslib/jakarta-oro.jar"/> | ||
<classpathentry kind="lib" path="strutslib/struts.jar"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | ||
<classpathentry kind="lib" path="lib/picocontainer-1.1.jar"/> | ||
<classpathentry kind="lib" path="lib/scannotation-1.0.2.jar" sourcepath="F:/opensource/scanannotation/scannotation/src/main"/> | ||
<classpathentry kind="lib" path="lib/disruptor-2.0.2.jar" sourcepath="/disruptor"/> | ||
<classpathentry kind="output" path="classes"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Testsuite: com.jdon.container.ContainerDirectorTest | ||
Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 3.5 sec | ||
Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 3.091 sec | ||
|
||
Testcase: testStartup took 3.495 sec | ||
Testcase: testStartup took 3.085 sec |
4 changes: 2 additions & 2 deletions
4
report/TEST-com.jdon.container.config.ContainerComponentsXmlLoaderTest.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Testsuite: com.jdon.container.config.ContainerComponentsXmlLoaderTest | ||
Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.123 sec | ||
Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.124 sec | ||
|
||
Testcase: testLoad took 0.119 sec | ||
Testcase: testLoad took 0.118 sec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
/* | ||
* Copyright 2003-2009 the original author or authors. | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
package com.jdon.annotation; | ||
|
||
import static java.lang.annotation.ElementType.TYPE; | ||
import static java.lang.annotation.RetentionPolicy.RUNTIME; | ||
|
||
import java.lang.annotation.Documented; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* Consumer of the producer annotated with @send(topic) of the method; | ||
* | ||
* * Topic/queue(1:N or 1:1): | ||
* | ||
* if a class annotated with @Consumer(XX); it must implements | ||
* com.jdon.domain.message.DomainEventHandler | ||
* | ||
* @Send(topicName) ==> @Consumer(topicName); | ||
* | ||
* if there are many consumers, execution order will be | ||
* alphabetical list by Name of @Consumer class. | ||
* | ||
* Domain Model producer /Consumer: | ||
* | ||
* 1. annotate the producer class with @Model and @Introduce("message") | ||
*@Model | ||
*@Introduce("message") | ||
*public class DomainEvent {} | ||
* | ||
* | ||
* 2. annotate the method with @Send("mytopic") of the producer class; | ||
* * @Send("mytopic") | ||
* public DomainMessage myMethod() { | ||
* DomainMessage em = new DomainMessage(this.name); | ||
* return em; | ||
* } | ||
* | ||
* 3. the "mytopic" value in @Send("mytopic") is equals to the "mytopic" value | ||
* in @Consumer("mytopic"); | ||
* | ||
* 4. annotate the consumer class with @Consumer("mytopic"); | ||
* | ||
* 5. the consumer class must implements | ||
* com.jdon.domain.message.DomainEventHandler | ||
* | ||
* @Consumer("mychannel") | ||
*public class MyDomainEventHandler implements DomainEventHandler {} | ||
* | ||
* | ||
* | ||
* @author banq | ||
* @see @Send | ||
*/ | ||
@Target(TYPE) | ||
@Retention(RUNTIME) | ||
@Documented | ||
public @interface Consumer { | ||
/** | ||
* topic name | ||
* | ||
* @Send(topicName) ==> @Consumer(topicName); | ||
* | ||
* @return topic name | ||
*/ | ||
String value(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.