Win a copy of Head First Android this week in the Android forum!

Milind Mahajan

Ranch Hand
+ Follow
since Oct 23, 2000
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 Milind Mahajan

Hello,

I have a requirement to cache some data (not very large data) in the business layer consisting of EJBs - version prior to 3.1. I am planning to use a Singleton for this. Also, I need to refresh this data every 6 hours and for this I am planning to use the java.util.concurrent.ScheduledExecutorService. This object will be used by stateless session beans. Are there any issues around this design - especially in terms of using the schedular inside the EJB container (though I am using it in a POJO and not in managed beans)? Or any other concurrent issues? Are there any other better approaches?

It'll be helpful to recieve thoughts/ideas/opinions.

Thanks in advance,

-Milind
Thanks Mark for the reply.

Testing the existing web app in the iPad browser seems to be the first step then. It would probably reveal any modifications needed to the app (I think changes might be needed in UI layouts, new windows, JavaScript code etc.).
10 years ago
iOS
Hello,

Need your help on this:

I have a JEE based web application deployed in a servlet container. There is a new requirement to access this application on iPad. From what I gathered, there are two approaches to it:

a. Develop a native iPad application and hook to the application/business logic tier of the existing application - may be using web services.

b. Access the existing web application over the browser of the iPad (Safari?).

If I decide to take the second option (probably because it doesn't need any new development and may need some UI (JSP/HTML/JavaScript) reengineering), how do I then proceed further? What are the typical UI modifications needed?

Also, what are the other typical issues to be thought over for this?

Thanks in advance,

-Milind
10 years ago
iOS
Hello,

I have a web application deployed in Tomcat 4.0. I have added a filter to compress the content served. My question is - is there any way I can measure the size of the server response (content served per URL) so that I can quantify the compression. For example, I disable the compression and the size of the response for a URL is, say, X kilobytes. I enable the compression and I get the size of the same URL is, say, Y kilo bytes. Now by comparing X and Y, I know how much is the compression. I prefer do it on server side since I have tried some browser plug-ins in IE (my application runs on IE only) and they aren't helpful for this purpose.

Thanks in advance,

-Milind
11 years ago
Assuming that by "2 web applications" you mean 2 .war files, you can drop the required ProductService implementations in respective WEB-INF folders - either in lib or classes - of each .war. If that is done, then I think these web applications will be able to use whatever implementation available to them. I think this might work because each .war will use it's own classloader. And if you want to share the interface between these two web applications, you could add META-INF alongwith Manifest file and point to a common location which holds the interface. You can try this and let us know.

-Milind
Comparing the xml and the earlier Javascript code that you posted, I think there might be a problem in the way attributes are being accessed by the JavaScript code. For example, this is how I would access the value of "name" attribute of the "attribute" tag:

instead of

Hope this helps,
-Milind
Is it that you are getting alert dialog box with message 'undefined'? If so, can you post the actual xml text that is being received in the function? May be that would help us understand the issue better.

-Milind
I wish I could add more to the requirement that I stated earlier. But all I got was the technical requirement.

Anyway, thanks both of you for the responses.

-Milind
Thanks Kengkaj.

Yes. It is a technical requirement.

Any comments on the solution I outlined? Or any other?

-Milind
Any chance you are reading the BLOB as array of bytes from the database and making a String out of it before passing it on to the web layer for display?

-Milind
12 years ago
JSP
Thanks for the response.

May be I mixed my technical thoughts with the requirement that I got. This is the requirement -> The customer wants the application to be able to use different versions of the tax calculator based on some configuration/user specific value.

What are your comments on the solution?

-Milind
Hello,

Have a question about a problem and its solution.

There is an application which uses a component (say a tax calculator - taxcalc.jar). The requirement is that the application should be able to use multiple versions of the component based on some runtime value. This means that the multiple versions of taxcalc classes should coexist in the same JVM at the same time and the application could use, for example, classes from version 1.1 for one user and version 1.3 for another user.

I could think one way to do this:

Design the classes in the component to have a version as part of the package name. The application could use the runtime value to create the package name (and fully qualified class name String), use the reflection to instantiate the correct version of the class and then proceed using the instance.

Wish some designers/architects here could review this. Are there any other/better solutions?

Thanks in advance,

-Milind
Thanks.

This is pretty much what I am doing now - similar to my options b and c in the initial post.

-Milind
12 years ago
Thanks again.

Tell your boss its called "re-factoring for security"



I did :-)
12 years ago
Thanks Pat. Agreed.

But what if I have lots of code already written which is passing the parameters in url similar to what I mentioned. While it is true that the code has to be re-written to do the nonce thing you suggested, in the short term, wouldn't url hiding or using 'POST' method (because I think these can possibly be done easily compared to nonce stuff and remove the 'user-visible' part) make misusing the urls atleast slightly more difficult? If so, then we could buy some time and do the right fix in the days/months to some. Any thoughts on this?

Thanks,
-Milind
12 years ago