| biswas |
Tue Jun 30 07:13:37 BST 2009 |
| |
Hi,
I am new to Primrose - have not installed and tried it yet. I was trying to read documentation and find out the capabilities of Primrose and could not find answers to my questions. We have an application built using J2SE 1.6. It is a telecom application and has to handle quite a bit of load - about 6000 messages/sec. The application is heavily multi-threaded. While processing a message, the application may need to hit a database in certain cases.
As of now we are using our own home-grown database connection pooling library. However, since there are many options available on the net today, we are thinking of using one off-the-shelf and get rid of one maintenance headache.
1. Our application needs to transmit an SNMP trap when a database server becomes unreachable (server process crash, computer crash, LAN outage, ...). And emit another trap when it becomes reachable again. I am sure Primrose would not do that. But is there any callback or any API that we can use to implement this?
2. The worker threads may need to talk to more than one databases. I don't want to allocate multiple connections (one to each database) to every worker thread. Instead, I would want to use a connection pool, but then each thread has to be able to acquire a connection and release the connection back to the pool so that the process does not continuously keeps creating new connections. Does Primrose support that? How is that done?
3. Each worker thread has to work with a set of statement objects. A statement object is tied to a connection. Therefore, when the thread acquires a connection from the pool, it should be able to acquire the previously created statements too - rather than creating statement objects from the same set of SQL strings every time. Does Primrose have API for this?
4. If a database remains unreachable for a long time (configurable), connections should be created to an alternate database and the application should proceed. However, when the primary database is reachable again, the application needs to switch back to that. Does Primrose support this? Any special API for this?
Thanks in advance for help and regards,
-- S. Biswas
|
| |