| Author | 
		  Message
		 | 
		
		  | JohnRodey | 
		  
		    
			  
				 Posted: Mon Oct 01, 2007 12:27 pm    Post subject: JMS Selectors and SQL syntax | 
				     | 
			   
			 
		   | 
		
		
		    Centurion
 
 Joined: 13 Apr 2005 Posts: 103
  
  | 
		  
		    
			  
				Since JMS selectors are based on SQL92 is there a package/class that you can load a selection string into and use getters/setters to modify?
 
 
For instance say I had a selector of MyRequestorName='Bob' AND MyRequestorID='1234'.  Is there a package out there that will allow me to load that string into the constructor and let me call something to the effect of getFilterFields(), which would return MyRequestorName and MyRequestorID?
 
 
I am basically looking for a sql parser that can tell the difference between fields, conditions(AND,OR,NOT) and values. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fjb_saper | 
		  
		    
			  
				 Posted: Mon Oct 01, 2007 2:09 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 18 Nov 2003 Posts: 20768 Location: LI,NY 
  | 
		  
		    
			  
				A JMS message is not a DB table. 
 
Be careful what you wish for, and grateful about what you are being offered.
 
 
Read more about JMS, Selectors and the performance caveats....
 
 
This seems to be more suited to a broker than a JMS selector...
 
 
Enjoy    _________________ MQ & Broker admin | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jefflowrey | 
		  
		    
			  
				 Posted: Mon Oct 01, 2007 2:10 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Poobah
 
 Joined: 16 Oct 2002 Posts: 19981
  
  | 
		  
		    
			  
				Of course you'd need Message Broker to make this viable as a subscription option.  The built in MQ pub/sub broker won't filter on content and neither will Event Broker. _________________ I am *not* the model of the modern major general. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | JohnRodey | 
		  
		    
			  
				 Posted: Mon Oct 01, 2007 2:26 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Centurion
 
 Joined: 13 Apr 2005 Posts: 103
  
  | 
		  
		    
			  
				The question I'm asking is more of a straight JMS question, not necessarily a WebSphere MQ JMS question.  And I am not writting a query.  But the JMS Spec says that selectors are based off of SQL92 syntax.  So is there a helper class that you knwo of that will return to me only the fields from my sql string.  Kind of like XmlBeans treat an XML string like an object, I want to be able to treat a SQL string like one.
 
 
Any ideas? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jefflowrey | 
		  
		    
			  
				 Posted: Mon Oct 01, 2007 2:36 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Poobah
 
 Joined: 16 Oct 2002 Posts: 19981
  
  | 
		  
		    
			  
				I'm not aware of any general purpose SQL syntax tokenizer.  Or something to marshal/unmarshall SQL into java objects.  It's not clear at all that there's anything nearly as deterministic about SQL<->Java as there is XML<->Java..
 
 
XML tends to describe data.  SQL tends to describe, umm, not data. _________________ I am *not* the model of the modern major general. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fjb_saper | 
		  
		    
			  
				 Posted: Mon Oct 01, 2007 2:41 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 18 Nov 2003 Posts: 20768 Location: LI,NY 
  | 
		  
		    
			  
				And remember that the Message Selector (JMS) only works on the message's properties not on the message content...
 
 
Enjoy    _________________ MQ & Broker admin | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |