[JBoss Messaging] - Re: Multiple clients and message types - selectors?
by cpslo1999
Sure (and thanks so much for your help!).
I have what amounts to a store-and-forward system (let's call it the SAF for this discussion). It feeds multiple client systems. The SAF receives a number of files from different, external systems, which it stores and makes available via HTTP. The clients are each interested in some subset of these files (the subsets can and will overlap).
I am trying to design a communications mechanism that will allow the SAF to send asynchronous notifications to the clients when interesting files arrive. In most cases this will be done as the files arrive (perfect for a topic with client-side selectors), however, I also need to build in the ability to target one particular client from the SAF and re-play the notifications. Say I add a new client system, I need to be able to tell the SAF to send notifications to that new client for files that were received before the client was added (back-filling). Also, if a processing algorithm changes on one of the clients, I may need to send notifications for files that the client had processed once before (re-sending).
It is really this notion of targeting a single client that has me befuddled. Adding a new queue for each client administratively seems like a tight coupling and a fair amount of manual configuration overhead. Using a pure topic, I can't figure out how to provide this secondary feature of targeted playback.
Did that clarify the situation enough?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4231961#4231961
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4231961
16 years, 11 months
[Beginners Corner] - Re: Multiple schema access
by PeterJ
There is no such capability build into EJB, nor is there an option in JBoss AS to support this. I would be interested to hear what your use case is (that is, why you think you need a separate database per user).
I can think of two ways to implement this.
a) Using JDBC: write your own JDBC layer (you will probably have to implement only the Driver interface, but perhaps also the Connection interface) that sits between JBoss AS and the real JDBC driver. When a connection is made, have your code look up the user for that connection and use a database call (such as 'use somedb' in MySQL) to switch the database. [There have been other posts in the forums where people wanted the connection to use the user's account name as the database login id, and if I recall correctly someone posted that the Oracle JDBC driver had some kind of option to enable this. You could search for those posts, they might give you some other clues as to what is possible.]
b) Use one database for everyone and add a userId field to each of the tables. Then change all of the queries to add "and userId=xxx" to the where clause. This way each user should see only his or her data.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4231944#4231944
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4231944
16 years, 11 months