Paul Duer

Ranch Hand
+ Follow
since Oct 10, 2002
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 Paul Duer

Hey all,

I know I should know how to do this, but well the drugs...

Anywho, I have a need to cache a small XML file in a servlet to send back as a HTTP response for consuming in a Flex HTTPService object.

The deal here is that the XML will be getting requested probably like 1000s of times a minute, to update the Flex Graph I am building.

The XML will be updated however every 30 seconds. The goal I have in mind is to keep the XML in memory and not read it from disk everytime it's requested. Then I want to be able to update the XML object every 30 seconds inside the servlet.

So what type of object will work best and what scope should it have?
11 years ago
Nah, I don't think you're being difficult.

But, in my situation, this company has gone through so many developers and contractors, and off shore folks, and BAs and business people... That nothing is done the same.

It seems like overkill in a happy work enivorment, where developers stay for years and complete projects and every one works together.

I have been at this company for 4 years now, mostly as a contractor, now as an employee.

So you're right, why would a project database care about what code was used and why would a class need to refer to it's project, if you had good documentation?

But I never will, never as long as I breate on this earth. This company will only improve their process with baby steps, and as quickly as we make progress we'll fall backwards.

But here's the rub, it's five mintues from home and they pay me well! So it's worth it to me to create a rub-goldberg machine to maintain the links! So that I
14 years ago
Awesome thanks for the ideas.

I don't think I'll include change history to the file.

But what I do want to include is a history from our Project Database. We keep this database for projects, each one gets a number. It's great but without that link between a proj # and the classes that it updated, you can't reverse engineer from the class.

So do you all think it's okay to include just a section that references these numbers?
14 years ago
Hi guys,

You probably won't believe this, but my current codebase doesn't have any Class headers that define all of the neccesary information about the class and what project it comes from.

Can you all post some examples of headers you all use?
14 years ago
Yea that would work great too. But, they share the same Enterprise Application, so the code would have to be smart enough to run a method that returns the name of the App Server from Websphere.
14 years ago
Hi guys,

We have a situation where we are Clustering an internal application server on the same box, just 2 copies of the Application Server, for failover purposes.

My question is, how can I programatically access the name of the server that I am seeing when I browse to the site? I have an admin page where I reset singletons, but I can't find a way to figure out if I have reset both servers.
14 years ago
I am running into a situation were if I use the embedding Websphere driver for SQL Server, a problem goes away. Is this a good and speedy driver to use?

We were using the Microsoft driver for SP1. Is this a bad idea to change?
15 years ago
Thanks Bear,

In this case I do not have the luxury of using servlets to control the pages. It sounds strange, but it's an out of the box Websphere Commerce site. So I can't really create new servlets.

I was able to change the code in the bottom section to meet my needs like this:



I would still like to distill it down. I wish I could programmatically go through my properties bundle, but that isn't an option or at least I don't know how to.
15 years ago
JSP
Hiya guys...

I am doing a little content managment piece in JSTL. I need to take 5 of the same type of object and sort them, all in JSTL on a JSP page.

My object has Rank, Title, Date, and Text as the properties. Each object will have a Rank between 1 and 100. I will load the objects in to a container object with setter/getters for each property.

Now I want to sort the objects by rank and then print them out.

Here's what I have so far but it prints nothing:

15 years ago
JSP
Hi guys,

I have 2 text files, each is in the standard Key=Value style. I would like to be able to quickly read those files into a List object of some sort, and then be able to add pairs to the end of the file and maybe if I get more advanced, change values in the pairs.

I think this is real simple thing, I just can't think of what package might make this eaisest.

I also have an XML file to manage, basically adding and editing elements quickly and programmatically.
15 years ago
Hi guys,


I have a question about the Profiler. I want to Profile my DEV server. It's a 5.0.2 WAS install, it's got Agent Controller installed and I changed the access to ALL.

When I do a test connection in my WSAD instance, I get a good conection. But, then when I go to the next screen where I select the instance or server that I wish to profile.

How do I get my DEV application servers onto that screen? When I am local, I start the server locally, I start it in Profile mode and go from there.

Do I need to install something, or switch something on my remote servers? Do I need to make remote servers on my WSAD?
15 years ago
I guess I was more interested in shortening the amount of code.


But I guess make I am making the rookie mistake, just because it takes a couple lines of code, doesn't mean it's slow!

Seems like all those IFs to check if the object is there would be slow.

I have a wrapper object, my XML has a BORROWERS element. I always want to pull the main or co borrower, so I have a convience method that returns the object when you call for it.

Do I need a method that doesn't return it? Like a isXXX method? Or is it just as quick once I have already looked it up in the object.
15 years ago
Hi guys,

I have the following code to pull an object from a list inside a compond object. It's actually a JAXB object, so this object is a child element in my XML document.

My question is this. I have a web application that has like 8 pages. It's constantly pulling this object in each servlet. I have to do the check if the object is there, then pull the object if it's not null.

Is there a better way to do this? How can I elminate those constand IF statements checking to see if the object is there?

15 years ago
Hi guys,

Here's one for you. I have a JAXB dataset that populates through a couple different pages. I am using Struts and none of the fields on the pages are required.

So what can happen is the user can skip a whole page, entring no data. In this case, there are a couple of attributes that are defaulted. Those fill in and make these empty elements.

Is there anyway short of a huge IF statement to check a set of Struts form fields to see if there is any entry into them?
Thanks Dirk!

What I don't understand is this. So I have this static method. It saves a string of data to the filesystem. It creates a FileWriter, then it saves it, then it closes it.

So if it's Static, that means there's only ever 1 copy of this code in memory to serve all requests. In my servlets, I call this method at the end, to save my file that I work on in the servlet.

My question is this, with multiple users calling this method, and different servlets running it possibly at the same time, what's to stop data from mixing? If there's only one version of it running, is it a bottleneck?