Oleg Tim

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

Recent posts by Oleg Tim

Hi, I am experimenting with generics and running into a problem where I cannot set a List<? extends Object1>
I have the following:

My IDE is complaining that:

Name clash: The method setItems(List<OrderItemImp>) of type OrderImp has the same erasure as setItems(List<? extends OrderItem>) of type Order but does not override it

So I am guessing its not possible to set a list in that way? Any ideas on how implement this solution?

Thanks, Fedor
12 years ago
I am using struts 2.0.14 and would like to use Dojo but without Ajax template. So I need to add dojoType="" to <s:textfield ..... anyone knows how I can do that? dojoType is not declared in DTD so it errors out, any way to add this parameter to the tag? Thanks, Fedor
13 years ago
I wanted to know if with struts 2 you can submit a key from <s:select and have it converted to an object, for example:

I have a state select box populated with:

List<State> stateList;
... stateList populated........

State is a class with:
int id;
String name;

Action has:

State state;
State getState() { return state; }
void setState(State state) { this.state = state; }

when I submit to Action
<s:select name="state" list='stateList' listValue="name" listKey="id" />

My state is NULL. I quess here state is submitted here as a String and not being converted to State object using a key lookup. Any way to select from list of States and receive a State without doing what we have to do with Struts 1, looking up the value to match to Object? Thanks a lot, hope it makes sense
13 years ago

I am working with an existing application and trying to find a best way to implement new changes. In this particular situation I have a class that I cannot change, similar to (to keep things simple):

public Class Category {
private String name;
private Category parentCategory;
private Set childCategories = new HashSet();

This class is mapped to a single table that stores parents and children. Now I am adding a new table to the database, lets call it category_property and mapping a class to it CategoryProperty, one-to-one to Category.

Now I need to query all categories with its properties from the database and display it on one page kind of like:

category 1 - property
--child of category 1 - property
--child of category 1 - property
category 2 - property

I obviously want to limit amount of calls to the database. What are my options?:

1. I cannot modify Category class to include the relationship to CategoryProperty and force eager fetch.

2. Doing a joint call and return array of pairs of Category and CategoryPorperties would require me to sort parents and children for display. Is this the way to go?

3. ??? Would the best option be declaring another mapping, like CategoryWithProperty extends Category and declaring all mappings again in CategoryWithProperty.hbm.xml and one-to-one relationship?

I am sure you have more ideas Thanks.!
Are you looking for a full time position only, or willing to work on project by project basis? Please email me more information. Thanks.
14 years ago
Hi, this is a weird problem and I cannot figure out why it is doing it. Running Tomcat 5.5.9 on Windows 2003 server. There are 200 sites deployed on the server, each having its own virtual host and one deployer application deployed under localhost.

What I see happening is on Tomcat startup every virtual host accesses web.xml of the localhost application as well as its own. How can it be?

My localhost application defined in server.xml like so:

<Engine defaultHost="localhost" name="Catalina">
<Host autoDeploy="true" appBase="E:\Webspace\" name="localhost">


Application has its context defined in ROOT.xml within


<Context docBase="deployerEngine" path="">
<ResourceLink name="jdbc/conn" global="jdbcConn"/>

All websites are described in server.xml:

<Host autoDeploy="false" name="site1.com" appBase="E:\Webspace\">

Every site has its ROOT.xml defined in Tomcat\conf\Catalina\site1.com\

<Context docBase="site1/ROOT" path="">
<ResourceLink name="jdbc/conn" global="jdbcConn"/>

There is nothing in META-INF for any of the application, and every application has its on web.xml file.

I am lost, every time I restart Tomcat every application that has a virtual host seem to load the localhost application as well. However for sites without a virtual host, that doesnt happen. Once Tomcat started all applications work fine, the only downside is that it seem to use triple the memory compared to same 200 sites running on another server without localhost application (deployer). Any ideas? Thank you.
15 years ago

I am looking to adopt a good project management tool with version control system for a large development project. I came across Trac, it works with Subversion for version controll. Wanted to get your feedback, any experience using it, maybe alternatives.

Currently I have CVSNT running on windows2003 box and project management part is done through Sugar which is a CRM app I am sure you heard about and since its not designed to deal with project development specifically, its a pain

So, Trac with Subversion looks pretty good right now, what do you think

Thanks a lot,
Hi guys, any recommendations as to where to post a profile/search for freelance work. I haven't looked for new projects for about 3 years now, so I am sure a lot of things changed. I know there is guru.com, how is it nowadays? Elance of course huge but mostly for offshore work. I live in California so obviously cannot take a $20/hour project any ideas greatly appreciated, thank you.
16 years ago
Well actually it would be

JSP File - > Action#1(ActionForm#1) -> Action#2(ActionForm#2)

I have been trying to figure this out for days with not much luck
I have a jsp file with one form in it that has a bunch of values. All those values are handled by 2 ActionForms. I am trying to submit this form and by redirecting from Action 1 to action 2 have those values populate ActionForm 1 and ActionForm 2. Unfortunately only first ActionForm being populated. If I first post to Action#1 than redirect to Action#2 than ActionForm#1 being populated. If I post to Action#2 than redirect to Action#1 than only ActionForm#2 being populated.

Any ideas? I am really stuck!

16 years ago
Actually I watch the memory grow as tomcat is starting up, the memory is growing as applications being loaded, so its not an issue with garbage collection
17 years ago
I got a problem with Tomcat using a huge amount of memory on startup. Of course I realize that it all depends on how large are the applications. However, I have lets say two identical machines with Tomcat 5.5 installed.
One Tomcat has 100 virtual hosts running the same application and takes up 400MB of ram after it finished loading, second Tomcat has 300 identical applications but deployed under localhost and it uses only 200MB of ram after loading. Can somebody explain me what is the case here? Does it mean that virtual hosts load all libraries in shared directory for every host into memory but all application running under localhost, simply load them once? I am a bit lost, I need to figure something out to cut down on memory use, any ideas? All users are running same application, application specific classes are in its own application WEB-INF/classes and all libraries needed to run the application, like struts and hibernate and so on are in tomcat/shared. Thank you.
17 years ago
You can also try URL rewriting with Apache
17 years ago
Hi I am currently using Tomcat 5.0.x on a server where we offer virtual hosting. I am looking for a better alternative. Number one problem is that setting up new domain names (virtual hosts) is a major pain since Tomcat does not have dynamic virtual hosts and every time new host is added to server.xml there is a need to restart tomcat. I know for example Resin offers this support, any other suggestions? Thank you.

17 years ago
Perfect! Thank you. The website is hard to get into though, but I got in finally. This book is a must have for eclipse.

Carlos, the eclipsekickstart.com, something you came out with on your own or publisher offers you the space, cause maybe you should consider free mirrors of the website since its getting hit so hard. I dont think you would have problems getting those

However, I did check multiple other sites, on other servers, that also run Tomcat, and they workd fine. So still puzzled why ME ?
17 years ago