This week's book giveaway is in the Spring forum.
We're giving away four copies of Spring Boot in Practice and have Somnath Musib on-line!
See this thread for details.
Win a copy of Spring Boot in Practice this week in the Spring forum!

TirupathiRao Pattapuraju

Greenhorn
+ Follow
since Dec 09, 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 TirupathiRao Pattapuraju

Hi Friends,

I came to know all this is because of the virtual host i configured in server.xml.So i removed additional one and then it came to two threads.but still 2 threads are there.

here is what i did for the host in server.xml



If i remove the context only 1 thread is running but i need that context for specififying the docbase.


Pleae help me to sort this out.


Thanks and Regards
TirupathiRao.P
10 years ago
Hi All,

I am facing a strange issue where my applications are getting deployed mutliple times.

I deployed a webapplication which comprises a listener for quartz scheduler(web-inf.xml listener). and when i started the tomcat i see 3 times that same application is getting deployed and hence the scheduler is running 3 threads which is casuing chaos.

Please help me in this regards.

Thanks and Regards
TirupathiRao.P

***************************************
2011-10-12 12:42:24 Commons Daemon procrun stdout initialized0 0 11 * * ?
[INFO] Job execution threads will use class loader of thread: main
[INFO] Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
[INFO] Quartz Scheduler v.1.8.5 created.
[INFO] RAMJobStore initialized.
[INFO] Scheduler meta-data: Quartz Scheduler (v1.8.5) 'DefaultQuartzScheduler' with instanceId 'NON_CLUSTERED'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.
Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.

[INFO] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
[INFO] Quartz scheduler version: 1.8.5
[INFO] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
[INFO] Clustering has been disabled
[INFO] Deploying module: addressing-1.5.4 - file:/C:/Program Files (x86)/Apache Software Foundation/Tomcat 6.0/webapps/TEST_APP/WEB-INF/modules/addressing-1.5.4.mar
[INFO] Deploying module: metadataExchange-1.5.4 - file:/C:/Program Files (x86)/Apache Software Foundation/Tomcat 6.0/webapps/TEST_APP/WEB-INF/modules/mex-1.5.4.mar
[INFO] Deploying module: mtompolicy-1.5.4 - file:/C:/Program Files (x86)/Apache Software Foundation/Tomcat 6.0/webapps/TEST_APP/WEB-INF/modules/mtompolicy-1.5.4.mar
[INFO] Deploying module: ping-1.5.4 - file:/C:/Program Files (x86)/Apache Software Foundation/Tomcat 6.0/webapps/TEST_APP/WEB-INF/modules/ping-1.5.4.mar
[INFO] Deploying module: script-1.5.4 - file:/C:/Program Files (x86)/Apache Software Foundation/Tomcat 6.0/webapps/TEST_APP/WEB-INF/modules/scripting-1.5.4.mar
[INFO] Deploying module: soapmonitor-1.5.4 - file:/C:/Program Files (x86)/Apache Software Foundation/Tomcat 6.0/webapps/TEST_APP/WEB-INF/modules/soapmonitor-1.5.4.mar
[INFO] Deploying Web service: version.aar - file:/C:/Program Files (x86)/Apache Software Foundation/Tomcat 6.0/webapps/TEST_APP/WEB-INF/services/version.aar
[WARN] No transportReceiver for org.apache.axis2.transport.http.AxisServletListener found. An instance for HTTP will be configured automatically. Please update your axis2.xml file!


0 0 11 * * ?
[INFO] Job execution threads will use class loader of thread: main
[INFO] Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
[INFO] Quartz Scheduler v.1.8.5 created.
[INFO] RAMJobStore initialized.
[INFO] Scheduler meta-data: Quartz Scheduler (v1.8.5) 'DefaultQuartzScheduler' with instanceId 'NON_CLUSTERED'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.
Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.

[INFO] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
[INFO] Quartz scheduler version: 1.8.5
[INFO] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
[INFO] Clustering has been disabled
[INFO] Deploying module: addressing-1.5.4 - file:/C:/Program Files (x86)/Apache Software Foundation/Tomcat 6.0/webapps/TEST_APP/WEB-INF/modules/addressing-1.5.4.mar
[INFO] Deploying module: metadataExchange-1.5.4 - file:/C:/Program Files (x86)/Apache Software Foundation/Tomcat 6.0/webapps/TEST_APP/WEB-INF/modules/mex-1.5.4.mar
[INFO] Deploying module: mtompolicy-1.5.4 - file:/C:/Program Files (x86)/Apache Software Foundation/Tomcat 6.0/webapps/TEST_APP/WEB-INF/modules/mtompolicy-1.5.4.mar
[INFO] Deploying module: ping-1.5.4 - file:/C:/Program Files (x86)/Apache Software Foundation/Tomcat 6.0/webapps/TEST_APP/WEB-INF/modules/ping-1.5.4.mar
[INFO] Deploying module: script-1.5.4 - file:/C:/Program Files (x86)/Apache Software Foundation/Tomcat 6.0/webapps/TEST_APP/WEB-INF/modules/scripting-1.5.4.mar
[INFO] Deploying module: soapmonitor-1.5.4 - file:/C:/Program Files (x86)/Apache Software Foundation/Tomcat 6.0/webapps/TEST_APP/WEB-INF/modules/soapmonitor-1.5.4.mar
[INFO] Deploying Web service: version.aar - file:/C:/Program Files (x86)/Apache Software Foundation/Tomcat 6.0/webapps/TEST_APP/WEB-INF/services/version.aar
[WARN] No transportReceiver for org.apache.axis2.transport.http.AxisServletListener found. An instance for HTTP will be configured automatically. Please update your axis2.xml file!


0 0 11 * * ?
[INFO] Job execution threads will use class loader of thread: main
[INFO] Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
[INFO] Quartz Scheduler v.1.8.5 created.
[INFO] RAMJobStore initialized.
[INFO] Scheduler meta-data: Quartz Scheduler (v1.8.5) 'DefaultQuartzScheduler' with instanceId 'NON_CLUSTERED'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.
Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.

[INFO] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
[INFO] Quartz scheduler version: 1.8.5
[INFO] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
[INFO] Clustering has been disabled
[INFO] Deploying module: addressing-1.5.4 - file:/C:/Program Files (x86)/Apache Software Foundation/Tomcat 6.0/webapps/TEST_APP/WEB-INF/modules/addressing-1.5.4.mar
[INFO] Deploying module: metadataExchange-1.5.4 - file:/C:/Program Files (x86)/Apache Software Foundation/Tomcat 6.0/webapps/TEST_APP/WEB-INF/modules/mex-1.5.4.mar
[INFO] Deploying module: mtompolicy-1.5.4 - file:/C:/Program Files (x86)/Apache Software Foundation/Tomcat 6.0/webapps/TEST_APP/WEB-INF/modules/mtompolicy-1.5.4.mar
[INFO] Deploying module: ping-1.5.4 - file:/C:/Program Files (x86)/Apache Software Foundation/Tomcat 6.0/webapps/TEST_APP/WEB-INF/modules/ping-1.5.4.mar
[INFO] Deploying module: script-1.5.4 - file:/C:/Program Files (x86)/Apache Software Foundation/Tomcat 6.0/webapps/TEST_APP/WEB-INF/modules/scripting-1.5.4.mar
[INFO] Deploying module: soapmonitor-1.5.4 - file:/C:/Program Files (x86)/Apache Software Foundation/Tomcat 6.0/webapps/TEST_APP/WEB-INF/modules/soapmonitor-1.5.4.mar
[INFO] Deploying Web service: version.aar - file:/C:/Program Files (x86)/Apache Software Foundation/Tomcat 6.0/webapps/TEST_APP/WEB-INF/services/version.aar
[WARN] No transportReceiver for org.apache.axis2.transport.http.AxisServletListener found. An instance for HTTP will be configured automatically. Please update your axis2.xml file!


********************************************
10 years ago

Naren Chivukula wrote:Okay, if you really want to go with that approach knowing downs, it's up to you. I'd rather call sequentially in a for loop as it would not make any difference because you are calling the same web service.

So, what problems are you facing in implementing that? Isn't that straightforward to implement? All you have to do is to create threads and invoke web service.




Thank you very much Naren..As you suggested i will stick to my legacy sequential for loop.

But i just want to give a try with threads to check whether it will be any value addition in terms of over all process time.


Thanks and Regards
Tirupathi Rao.P
11 years ago

Naren Chivukula wrote:Hi TirupathiRao,
Thread are usually applied to perform parallel activities of slightly different in behaviour. For example, on a browser user can scroll and at the same time load an applet or call two different web services at the same time and consolidate their responses. If you are planning to use threads for this particular purpose, you'll end up waiting for other threads to complete and join all the threads and eventually construct different thread out comes into a single response. Did you check if you could do all the records in one go? I suspect you would get memory related problems and more likely if your design/coding is not well done.



Actullay i have to live with the limiataion posed by the Siebel CRMOD(fetch 100 at time).So i want to reduce the time its is taking to fetch the whole records.that is why i am planning to go with threads.
I want to implement the following logic

class have a boolean like isAnyRecLeft=true; and a vector accList.

create 10 threads at one shot and wait.

if any thread fetches records less than <100

exit the process. if not so create 10 more threads.

like this can i adopt this process .if so can you guide me to deploy this plan.


thanks and regrds
Tirupathi Rao.P
11 years ago

Naren Chivukula wrote:Hi TirupathiRao,
I don't think that's a good design practice. You'll end up writing extra code to deal with threading mechanism, assembling response and fault handling. What issues do you have in getting all the 100 records in one go?Unless you show all the records in a web page or to process at a time, you can look up for smaller chunks like 20 at a time.



First Of All thank you Naren ...

Here is the abstract of the limitaion i am facing..Actullay i am consuming the web service provided by the Siebel CRMOD to fetch the Accounts(Thousands of Records) lying there in their server.The limiations is a call can give 100 records at time only so i will loop thru the logic to fetch 100 by 100 by providing start point as 0,100,200.... and add them to a list for later use and will do this loop until the response contain records<100.

Say if there are 5000 records i have to loop for 50 times which is a time consuming process.so i am checking that can i take threads help to achieve this.Can you guide on the same.

Thanks and regards
Tirupathi Rao.P
11 years ago
Hi,

I have a class with vector.i have a web service which can only fetch 20 records at a time provided the start point and endpoint from a storage of 100 records. so i want to call a thread for 5 times as (sp=0,ep=20)(sp=21,ep=40)... like so and want to fill those values in the vector how can i achieve the same.

Thanks and regards

tirupathi rao.P
11 years ago
Hi all,


WE can use session attributes to prepoulate HTML Text as follows(Say accName is a session attribute)




how to set the value if the accName is a request paramter in lieu of session attribute.



Thanks and Regards
Tirupathi Rao.P
11 years ago