Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Sql Server 2k5 and JMS??

Author  Topic 

m_weltm
Starting Member

8 Posts

Posted - 2007-06-13 : 11:15:55
I am looking to send a message to a JMS Topic from a trigger on a table in a 2k5 DB. Is there any way to achieve this?

Kristen
Test

22859 Posts

Posted - 2007-06-13 : 13:08:47
What's a "JMS Topic" ?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-06-13 : 13:20:46
It's a Tibco thing.

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-06-13 : 13:24:39
I'm none the wiser!!
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-06-13 : 13:28:47
Me either and we're using it here!

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

m_weltm
Starting Member

8 Posts

Posted - 2007-06-13 : 18:11:29
http://en.wikipedia.org/wiki/Java_Message_Service
Go to Top of Page

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2007-06-13 : 18:51:10
well, I don't know about other JMS implementation, just tibco. anyway, this is typically how it works:

1. create insert/update triggers on tables that contain the data you wish to publish to JMS. These triggers insert changes to special 'publishing' tables (step 2)
2. create individual 'publishing' tables for each table you are going to publish. these tables match the columns of the original table plus they have a status column. This table stores inserts, updates and deletes that occur at the original table.
3. have a JMS process check the publishing tables for rows with status 'N'. grab that data and then change the status to 'C'. 'N' is new, 'C' is complete.

The JMS process that check the publishing tables usually runs every 10 seconds or so. There is no direct way from SQL server to publish to the JMS bus. THis roundabout way is all there is.

On the java side of things you will need to use an appropriate SQL Server JDBC driver. Microsoft has one or you can use open source JTDS. Or if you are using a commercial JMS solution it probably ships with the appropriate jdbc driver.


-ec
Go to Top of Page

graz
Chief SQLTeam Crack Dealer

4149 Posts

Posted - 2007-06-13 : 18:54:39
Tara,

So you're supporting TIBCO too? We've got a client using and I've been fighting with it the last few weeks. It seems to love the deadlocks.

-Bill

===============================================
Creating tomorrow's legacy systems today.
One crisis at a time.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-06-13 : 19:05:21
They tried to get us to be the Tibco admins since our titles have admin in them, but they eventually listened to us telling them it isn't a SQL database.

So anyway, we use Tibco here, however I don't support or use it. I did go to training though for it. I can't remember anything from it!

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2007-06-13 : 19:08:02
quote:
Originally posted by tkizer

They tried to get us to be the Tibco admins since our titles have admin in them, but they eventually listened to us telling them it isn't a SQL database.

So anyway, we use Tibco here, however I don't support or use it. I did go to training though for it. I can't remember anything from it!





Tibco is pretty cool. it is like a really fancy DTS. :)

also, JMS doesn't just mean tibco. Tibco is just a really, really expensive commercial implementation that uses the JMS bus.



-ec
Go to Top of Page

m_weltm
Starting Member

8 Posts

Posted - 2007-06-14 : 15:23:14
I found a solution, thanks for your trouble. If your interested, I'm writing a user-defined function in C# which sends a message to my JMS Topic. More info: http://www.codeproject.com/showcase/JMSCSharp.asp
Go to Top of Page

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2007-06-14 : 15:42:03
quote:
Originally posted by m_weltm

I found a solution, thanks for your trouble. If your interested, I'm writing a user-defined function in C# which sends a message to my JMS Topic. More info: http://www.codeproject.com/showcase/JMSCSharp.asp




nice, thanks for linking the article.


-ec
Go to Top of Page

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2007-06-14 : 15:51:21
also, keep in mind that not all .NET assemblies are supported in the SQL Server hosted CLR.

Here is the KB article on this http://support.microsoft.com/kb/922672/en-us

Keep us informed on your progress and think about making this into an article here if you are successful in creating a SQL2K5 -> JMS function.



-ec
Go to Top of Page
   

- Advertisement -