Sorry that I always reply to myself :)
I found the link in the bug tracker:
http://sourceforge.net/tracker/index.php?func=detail&aid=537564&group_id
=22866&atid=376685

It was already fixed in 2.4.4 but the fix was not carried over to 3.0.x
I guess.

Sebastian

> -----Original Message-----
> From: Sebastian Hauer 
> Sent: Monday, November 18, 2002 6:15 PM
> To: [EMAIL PROTECTED]
> Subject: [JBoss-user] Empty String message selector is invalid
> 
> 
> 
> Hi,
> 
> I am doing some JMS testing on JBoss and I just discovered 
> that the empty String specified as a message selector is 
> invalid in the JBoss JMS implementation.
> 
> Example:
> 
>       TopicSubscriber subscriber = 
> session.createDurableSubscriber(topic, "mySubscription", "", false);
> 
> From the Sun JavaDocs of Interface TopicSession:
> 
> public TopicSubscriber createDurableSubscriber(Topic topic,
>                                                java.lang.String name,
>                                                
> java.lang.String messageSelector,
>                                                boolean noLocal)
>                                         throws JMSException
> Parameters:
> messageSelector - only messages with properties matching the 
> message selector expression are delivered. A value of null or 
> an empty string indicates that there is no message selector 
> for the message consumer.
> 
> 
> So I think it is valid to provide null or the empty String as 
> a message selector. Therefore I guess this must be a bug in 
> the JMS implementation. I am running JBoss 3.0.4.
> 
> This is the exception I am getting:
> 
> --------------------------------------------------------------
> ----------
> ---------
> javax.jms.InvalidSelectorException: The selector is invalid.
>         at org.jboss.mq.selectors.Selector.<init>(Selector.java:76)
>         at org.jboss.mq.Subscription.getSelector(Subscription.java:58)
>         at
> org.jboss.mq.SpyTopicSubscriber.<init>(SpyTopicSubscriber.java:50)
>         at 
> org.jboss.mq.SpyTopicSession.createDurableSubscriber(SpyTopicSession.
> java:128)
>         at 
> com.sknt.picasso.monitor.JMSTopicMonitor.startDurableSubscriber(JMSTo
> picMonitor.java:231)
>         at java.lang.reflect.Method.invoke(Native Method)
>         at 
> org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
> nDispatcher.java:284)
>         at
> org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
>         at
> org.jboss.jmx.adaptor.control.Server.invokeOpByName(Server.java:227)
>         at
> org.jboss.jmx.adaptor.control.Server.invokeOp(Server.java:196)
>         at 
> org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.invokeOp(HtmlAdaptorSer
> vlet.java:183)
>         at 
> org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdap
> torServlet.java:78)
>         at 
> org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doPost(HtmlAdaptorServl
> et.java:60)
>         at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>         at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at 
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:366
> )
>         at 
> org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati
> onHandler.java:293)
>         at 
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:5
> 81)
>         at org.mortbay.http.HttpContext.handle(HttpContext.java:1687)
>         at 
> org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplication
> Context.java:544)
>         at org.mortbay.http.HttpContext.handle(HttpContext.java:1637)
>         at org.mortbay.http.HttpServer.service(HttpServer.java:875)
>         at org.jboss.jetty.Jetty.service(Jetty.java:543)
>         at
> org.mortbay.http.HttpConnection.service(HttpConnection.java:806)
>         at
> org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:956)
>         at
> org.mortbay.http.HttpConnection.handle(HttpConnection.java:823)
>         at
> org.mortbay.http.SocketListener.handleConnection(SocketListener.java:
> 203)
>         at
> org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:290)
>         at
> org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:743)
>         at java.lang.Thread.run(Thread.java:484)
> getTargetException():
> javax.jms.InvalidSelectorException: The selector is invalid.
>         at org.jboss.mq.selectors.Selector.<init>(Selector.java:76)
>         at org.jboss.mq.Subscription.getSelector(Subscription.java:58)
>         at
> org.jboss.mq.SpyTopicSubscriber.<init>(SpyTopicSubscriber.java:50)
>         at 
> org.jboss.mq.SpyTopicSession.createDurableSubscriber(SpyTopicSession.
> java:128)
> --------------------------------------------------------------
> ----------
> --------
> 
> Regards,
> 
> Sebastian
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by: To learn the basics of securing 
> your web site with SSL, click here to get a FREE TRIAL of a Thawte 
> Server Certificate: http://www.gothawte.com/rd524.html
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED] 
> https://lists.sourceforge.net/lists/listinfo/j> boss-user
> 


-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing
your web site with SSL, click here to get a FREE TRIAL of a Thawte
Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to