[Design of Messaging on JBoss (Messaging/JBoss)] - Re: Wild card Subscriptions
by timfox
"ataylor" wrote : The pattern for wildcard subscriptions will be as follows. * will match against a single word and # will match against 0 or more words delimited by a .. so A.*.C will match A.B.C and A.E.D but not A.B.E.D, and A.B.# will match A.B.C.D or A.B ansd so forth, this is how amqp 0.9 specifies it.
|
| A simple JMS client using Wild Card Subscriptions will look like the following:
|
|
| | Topic wildCardTopic = session.createTopic("topic.*");
| | MessageConsumer messageConsumer = session.createConsumer(wildCardTopic);
| |
|
We should also allow a jms client to just create a JBossTopic instance directly specifying the wildcard.
Also how is this used via the core api?
Currently in PostOfficeImpl the bindings ad addresses are held in Maps and Lists, these will be replaced by an Address/Bindingsmanager that will do the following.
One small issue is the management service doesn't support names with *'s in. To be honest i'm not sure whether we would add wild card addresses etc to the management servie, would they need to be accessible by the a management console?
When an address is added say A.B the address manager will take care of also adding any wildcard addresses that match , say A.* and A.#. The opposite will apply when addresses are removed.
When a Binding is added that uses a wild card pattern the address manager will also add bindings with the same underlying queue to any addresses that match the wild card, so if a binding with address A.* and queue name subscriber1 was added then as binding with address A.B and the same queue would also be added.
Doing it this way means that all the work is done during the creation of the bindings and the route method of post office will be just as performant since a single look up will still only be involved.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4176430#4176430
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4176430
17 years, 6 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Wild card Subscriptions
by ataylor
The pattern for wildcard subscriptions will be as follows. * will match against a single word and # will match against 0 or more words delimited by a .. so A.*.C will match A.B.C and A.E.D but not A.B.E.D, and A.B.# will match A.B.C.D or A.B ansd so forth, this is how amqp 0.9 specifies it.
A simple JMS client using Wild Card Subscriptions will look like the following:
| Topic wildCardTopic = session.createTopic("topic.*");
| MessageConsumer messageConsumer = session.createConsumer(wildCardTopic);
|
Currently in PostOfficeImpl the bindings ad addresses are held in Maps and Lists, these will be replaced by an Address/Bindingsmanager that will do the following.
One small issue is the management service doesn't support names with *'s in. To be honest i'm not sure whether we would add wild card addresses etc to the management servie, would they need to be accessible by the a management console?
When an address is added say A.B the address manager will take care of also adding any wildcard addresses that match , say A.* and A.#. The opposite will apply when addresses are removed.
When a Binding is added that uses a wild card pattern the address manager will also add bindings with the same underlying queue to any addresses that match the wild card, so if a binding with address A.* and queue name subscriber1 was added then as binding with address A.B and the same queue would also be added.
Doing it this way means that all the work is done during the creation of the bindings and the route method of post office will be just as performant since a single look up will still only be involved.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4176426#4176426
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4176426
17 years, 6 months
[Design of EJB 3.0] - Re: EJBTHREE-1454 Encapsulate Container infomation in TO/VO
by jaikiran
"ALRubinger" wrote :
| * There are some formatting-only changes in Core SessionSpecContainer. If possible can we exclude these? :)
|
|
Actually, there are quite a lot of formatting changes (which i will revert), but there are API related changes too. Example:
| Index: core/src/main/java/org/jboss/ejb3/session/SessionSpecContainer.java
| ===================================================================
| --- core/src/main/java/org/jboss/ejb3/session/SessionSpecContainer.java (revision 78500)
| +++ core/src/main/java/org/jboss/ejb3/session/SessionSpecContainer.java (working copy)
|
| @Override
| protected void registerWithAopDispatcher()
| {
| - String registrationName = this.getObjectName().getCanonicalName();
| + String registrationName = this.getDispatcherRegistrationName();
|
// Bind all appropriate references/factories to Global JNDI for Client access, if a JNDI Registrar is present
| if (registrar != null)
| {
| - String guid = Ejb3Registry.guid(this);
| - registrar.bindEjb(this.getInitialContext(), this.getMetaData(), this.getClassloader(), this.getObjectName()
| - .getCanonicalName(), guid, this.getAdvisor());
| + registrar.bindEjb(this);
|
|
@@ -726,7 +709,7 @@
| JndiSessionRegistrarBase jndiRegistrar = this.getJndiRegistrar();
| if (jndiRegistrar != null)
| {
| - jndiRegistrar.unbindEjb(this.getInitialContext(), this.getMetaData());
| + jndiRegistrar.unbindEjb(this);
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4176401#4176401
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4176401
17 years, 6 months
[Design of EJB 3.0] - Re: EJBTHREE-1454 Encapsulate Container infomation in TO/VO
by jaikiran
"ALRubinger" wrote : * The patch has a series of errors in the Proxy SessionContainerTestCase, references to container.getName(). How were we handling this in InvokableContext - is "getName" valid, or should these references be using "getGuid" or "getDispatcherRegistrationName"?
|
Andrew,
Are you sure the patch got applied correctly? On my local setup, the SessionContainerTestCase does not have reference to getName. Instead it has been replaced with getDispatcherRegistrationName. All the unit tests pass in my workspace. I rechecked the attached patch and here's an extract:
| Index: proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/unit/SessionContainerTestCase.java
| ===================================================================
| --- proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/unit/SessionContainerTestCase.java (revision 78500)
| +++ proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/unit/SessionContainerTestCase.java (working copy)
| @@ -111,16 +111,16 @@
|
| if (sessionContainer != null)
| {
| - logger.info("Unbinding: " + sessionContainer.getName());
| + logger.info("Unbinding: " + sessionContainer.getDispatcherRegistrationName());
| try
| {
| - Ejb3RegistrarLocator.locateRegistrar().unbind(sessionContainer.getName());
| + Ejb3RegistrarLocator.locateRegistrar().unbind(sessionContainer.getDispatcherRegistrationName());
| }
| catch (NotBoundException nbe)
| {
| // we are ok with this exception, which indicates that the test case had
| // already unbound the ejb related bindings.
| - logger.debug(sessionContainer.getName() + " was already unbound");
| + logger.debug(sessionContainer.getDispatcherRegistrationName() + " was already unbound");
|
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4176398#4176398
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4176398
17 years, 6 months