Manish Sridharan

Ranch Hand
+ Follow
since Jul 19, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Manish Sridharan

Hi Walter,

Question for you : Is this one hour limit is because target system provides window for one hour for accepting the converted data
or is this because of source system which allows picking of data for only one hour.
or you want to do whole of the thing in one hour window ?


If first is the case, you can split the work in two parts
part 1 : create multiple threads to read data (use some logic to split data between threads) and once conversion is done, keep the converted data in DB or some filesystem

part 2 : when the target system one hour window is available then start sending converted data to target system. You can send the data to target system in batches or again by splitting converted data between multiple http threads or the combination of both.
I assume target system is able to cope with multiple http requests.

If second is the case, you can split the work in two parts
part 1 : pick all data from source system using multiple threads. Ofcourse you need split data between the threads. However, this time do not do the data conversion at this time. Just read and dump it in some db table or files.
part 2 : From the dump table, you can read the data using the threads, convert it and then send it target system.


If third is the case, you can still use the first solution, difference will be number of threads will be high.

What kind of webservice you are using? is it xml based or json based ? json based services are bit faster.

is this webservice is for sending the data to target system or reading the data from Source system ? 1.5 seconds is kind of slow in IMHO.

how much data webservice can support in one call ?


This method is defined on the PropertyPlaceholderConfigurer. For a more detailed example, you should check my BFF - Google. He will give you more details on this.
10 years ago
Hi Mike,

If you are using spring 4.0, you can use this annotation or if you are using spring 3.0+, you can use either mention the configuration in config file like below or call the setLocations method in your class directly. In the latter case, you will not require to use the PropertySource annotation.
Hope this helps.

Thanks,
Manish
10 years ago
Hi Azuki,

I can see there are couple of problems with the current code that you have posted.
1. You need before in the Admin class.
2. Cook class is defined as Thread but start() method is not invoked. Do you really need this class as Thread ?
3. In my opinion, Timer class is not required. Function defined in the Timer class should be part of Savage and Cook Class . You just need to invoke in eat and cook function.

Hope this helps.

Cheers
Hi Eric,

I suspect this error is coming from line 23. out object might be getting closed inside formatpdf function. Alternatively, try commenting out line 26 and 27.

Thanks
12 years ago
Hi Saurabh,

I suspect one of your config file is getting loaded. Have you mentioned both of the config files under "contextConfigLocation" parameter in web.xml. Alternatively, you can use spring import tag in your main spring config file to include other config files. Hope this helps.

Thanks,
12 years ago
Hi Alen,

I just ran your piece of code and everything ran fine except some minor errors ( Config has mentioned package structure for classes but actual class doesn't have the package information).
Apart from this minor error, Application ran fine. As you have correctly mentioned, there might be some issues with aopalliance jars. I have listed down my version of jars, perhaps this might be of some help.
Spring Jars version 3.1
aspectjrt.jar : Manifest file suggests version is 1.6
aopalliance-1.0.jar
asm-all-4.0_RC1.jar
aspectj-1.6.12.jar
aspectjtools.jar : Manifest file suggests version is 1.6.12
aspectjweaver.jar : Manifest file suggests version is 1.6.12
cglib-2.2.2.jar
org.aspectj.matcher.jar : Manifest file suggests version is 1.6.12


Thanks

12 years ago
I had came across scenario in one of our project where I considered the database centric approach with some Ajax help.
Solution :
1. Create a DB table to store user's lasttime stamp for both of the application in two separate rows.
2. Create a business logic java class to decide action based on your scenarios.
3. Delete the db table information when user logged off or session expires for parent app.

The db centric information is pretty good for maintainence and debugging point of view. The REST based approach might give you the similar solution but it would be bit difficult to design test cases around it and also cumbersome approach for debugging point of view.

Thanks
12 years ago
Quite agree with Tim, you should use Java API to do the zip/unzip function and perhaps configure that as a bean in spring.
12 years ago
Have you added ContextLoaderListener in your web.xml ?

Thanks
12 years ago
Its bit difficult to tell from the code where it is failing. However, I did notice you are catching exception at every place which means application is eating up the exception. If I had been your place, I would change the code to throw the exception at every place instead of catching it. it would definitely give some pointers in terms of stack trace if it is failing anywhere.
You can also try running application in debug mode to see why it is not picking up the requested values.

Thanks
12 years ago
one easy way to decide on xml vs property file is : if you have key=value pairing in your business file , go for property file and if it has nested structure i.e parent-child relationship structure ( eg. web.xml ) then you should go for xml file and use DOM APIs to parse it.
12 years ago
Can you please run the select query in db first and see if it is working fine.
12 years ago
Hi,
One easy way that I could think of, is to define a bean and provide the path of xml file in the constructor so that it can read and store business rules in some hashmap then either you can pass on this bean ref to all the beans where you need business rule.

Thanks,
12 years ago
Hi All,

I need an advice on spring controllers. Which spring controller and view resolver class is more suitable for large web applications where lot of data needs to be passed between client and the server ?

I do understand its a bit vague question as type of controller is depends more on particular use case. I actually want to know which ones are most commonly used in commercial web applications.

Thanks,
12 years ago