Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

Jyoti Sharma

Greenhorn
+ Follow
since Apr 23, 2010
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jyoti Sharma

ramprasad madathil wrote:Put this whole stuff - receiving msg from the queue, procedure call and posting to a topic in a transaction? If any one fails, everything is rolled back.

ram.



Thanks!

In below two approaches which one is better?

(1) To create CLIENT_ACKNOWLEDGE session as :
connection.createSession(false, javax.jms.Session.CLIENT_ACKNOWLEDGE)
Here I will acknowledge message only after the successful completion of transactions(stored procedures)

(2) To use transacted session i.e., connection.createSession(true, -1). In this approach because of some exception in transaction (stored procedure) the message is rolled back and Redelivered. They are rolled back again and again and continue until I kill the program. Can I limit the number of redelivery of jms messages from queue?
I am working on a multithreaded JMS receiver and publisher code (stand alone multithreaded java application). MOM is MQSonic.
XML message is received from a Queue, stored procedures(takes 70 sec to execute) are called and response is send to Topic within 90 sec.
I need to handle a condition when broker is down or application is on scheduled shutdown. i.e. a condition in which messages are received from Queue and are being processed in java, in the mean time both Queue and Topic will be down. Then to handle those messages which are not on queue and not send to topic but are in java memory, I have following options:

(1) To create CLIENT_ACKNOWLEDGE session as :
connection.createSession(false, javax.jms.Session.CLIENT_ACKNOWLEDGE)
Here I will acknowledge message only after the successful completion of transactions(stored procedures)

(2) To use transacted session i.e., connection.createSession(true, -1). In this approach because of some exception in transaction (stored procedure) the message is rolled back and Redelivered. They are rolled back again and again and continue until I kill the program. Can I limit the number of redelivery of jms messages from queue?

Also in above two approached which one is better?
I am working on a multithreaded JMS receiver and publisher code. XML message is received from a Queue, stored procedures(takes 70 sec to execute) are called and response is send to Topic within 90 sec. I need to handle a condition when broker is down. i.e. a condition in which messages are received from Queue and are being processed in java, in the mean time both Queue and Topic will be down. Then how to handle those messages which are not on queue and not send to topic but are in java memory? Different options available:

1.To use CLIENT_ACKNOWLEDGE
2.To separate publisher code from receiver code.
3.To have error utility which will take messages from log and process them and send to Topic(least preferred)

Please suggest me the right option

Thanks,
Jyoti
Hi,

I am working to develop a JMS application(stand alone multithreaded java application) which can receive 100 messages at a time , they need to be processed and database procedures need to be called for inserting/updating data. Procedures are very heavy as validations are also performed in them. Each procedure is taking about 30 to 50 seconds of time to execute and they are capable to run concurrently.
My concern is to execute 100 procedures for all 100 messages and also send reply within time limit of 90 seconds by jms application.
No application server to be used(requirement) and database is Teradata (RDBMS)

I am using connection pool and thread pool in java code and testing code with 90 connections.
Question is :

(1) What should be the limit on number of connections with database at a time?
(2) How many threads at a time are recommended?

Thanks,
Jyoti
11 years ago
Thanks! for quick response.
I forgot to mention that my database is Teradata (RDBMS)
11 years ago
Hi,

I need to watch a table i.e., whenever there is insert in a table my java code will do some actions. For this I am planning to use while(true) loop. In this infinite loop I will select data from table. If there is some new insert in table, I will perform my functions and will continue to do this whenever there is a new insert in table.

My code will run forever and there will be scheduled shutdown in a week and will be restarted in 5 - 10 minutes.

Is it a right approach to use while(true) ?
Any other way to listen database table ?

Note: database is Teradata (RDBMS) and not Oracle
Thanks,
Jyoti
Hi,

I need to watch a table i.e., whenever there is insert in a table my java code will do some actions. For this I am planning to use while(true) loop. In this infinite loop I will select data from table. If there is some new insert in table, I will perform my functions and will continue to do this whenever there is a new insert in table.

My code will run forever and there will be scheduled shutdown in a week and will be restarted in 5 - 10 minutes.

Is it a right approach to use while(true) ?
Any other way to listen database table ?

Thanks,
Jyoti
11 years ago
Hi,

I am working on a JMS code(publisher/subscriber) which is not using MDB or application server.
Requirement is my code will stop only once in a week for 5 mins.
I need to close my log file daily and archive it to some folder without stoping the subscriber code.
Any help

Thanks,
Jyoti
I am working to develop a jms application which is receiving 400 messages at a time , they need to pe processed and procedures need to be called for inserting/updating data. procedures are very heavy as validations are also performed in them. each procedure is taking about 10 seconds of time to execute.
My concern is to execute 400 procedures for all 400 messages and also send reply within time limit of 90 seconds by jms application.
No application server to be used(requirement)

Right now my application is able to handle 40 messages in 90 seconds.Ineed to improve it's performance by 10 times

Any help ?