Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!

visu Nekk

Ranch Hand
+ Follow
since Sep 06, 2005
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 visu Nekk

Which technology(Struts or Spring) is the best to integrate with Hibernate and why?
Hi,

I am a newbie to hibernate and am struck with the on-to-many usage. Consider this scenario: I have two tables department and employee and the relation between them is one-to-many.

Department table:
department_id int primary key
department_name not null varchar(100)

Employee table:
employee_id int primary key
employee_name not nul varchar(100)
department_id int foreign key references department(department_id)

The data in the Department table is pre-defined as there will be fixed number of departments in any organization.
Now, I need to create new employee and assign them to a department. For this purpose, I created a jsp page with a text box for name and a drop down list pre-populated with departments. To insert the record, it was pretty straightforward. Using request.getParameter(), I retrieved the values of name and department and assigned them to the Employee object. Using the session.save(), I am able to save the object without using the one-to-many relationship and I suppose it has to be done that way only.

From the examples I found on the web for one-to-many relationship, the parent object is saved first and then the child object.

Now my question is : Should we use one-to-many relationship only when we need to store objects in both the tables?

Regards,
Viswanath
Hi,

I have an asp application running on Windows with the address www.abc.com. I have a java application running on Oracle Application Server on Linux. I want the requests to this application to be www.abc.com/xyz. How to achieve this scenario? If it is the case of Tomcat, we have ISAPI redirector. Can we use the same concept here as Tomcat is embedded in the application server.

Regards,
Visu Nekk
13 years ago
Hi,

In Java, if we encounter any null values, it gets inserted into the database as null. But the Oracle database null type is NULL. Can we insert database specific null while inserting itself from Java.

Regards,
Visu Nekk
13 years ago
Hi,

I am using IBM Tivoli Directory Server 6.1. I have written a listener to register with the server so that when an entry is added to the directory, I should receive a notification. But what's happening at the server side is, the listener gets registered, sends a response, and immediately gets unregistered without any initiation. I am unable to figure out why it is getting unregistered. Could anyone please guide me out?

Thanks,
Visu
14 years ago
Thanks Paul,

The database encoding is utf8. Do we need to add set the encoding in the code also? Is PreparedStatement an option to handle this kind of stuff or is it mandatory?

Visu
Hi,

When I query a web service, I get values which are sometimes in clear text and sometimes text+chinese characters. I assign the value to a String and when I try to insert it into Oracle database with classes12.jar, I get an "Invalid Character" exception. What could be the problem?

Thanks,
Visu
Hi,

My requirement is such that, when an entry is added to the LDAP tree in Tivoli Directory Server, I should receive a notification along with the added entry. Could anyone guide me on to achieve this along with samples?

Thanks in advance,
Visu
14 years ago
Thanks Ulf,

we are using ibm tivoli directory server, and it has a post-operation plugin:

SLAPI_PLUGIN_POST_ADD_FN
A function to call after the Directory Server executes an LDAP add operation.

But can you just brief it up, how exactly are we supposed to use this plugin to call our java program. For e.g., an entry has been added. Now i want the entry to be sent to the java program.

Thanks in advance,
Visu
14 years ago
Can we call a Java program upon an ldap trigger? If so, how can we do it? My requirement is such that when we add an entry to the ldap server, a trigger should be fired which calls a Java program.

Thanks in advance,
Visu
[ July 17, 2008: Message edited by: Ulf Dittmer ]
14 years ago
When I query a web service, I get a value which is assigned to a string. Sometimes i get special characters within that value like that of chinese, malay etc. The value will be a mixture of these language characters, in addition to the english characters. When I try to insert it into the database, it's throwing an "Invalid Character" exception. We are using oracle 10g and the jar file is classes12.jar. utf is enabled on the database. I suppose the problem is with jdbc. Please guide me out on how to solve this issue.

Thanks in advance,
Visu
Thanks Nitesh and Paul, Is RMI the only way to add intelligence or is there any other way? I am running my TimerTask in JBoss server. Please guide me in brief on adding intelligence to it.
14 years ago
What happens if a TimerTask object is deployed in a clustered environment? Does it schedule a new task on each node?
14 years ago
We have a scenario, where we need to query a web service for data at regular intervals. We have four processes doing different jobs which query the web service. For this purpose, we went on to implement this scenario using TimerTask. Apart from this, do we have any other feasible solution. The problem with our implementation was, for every 3 minutes, a new thread will be spawned for each of the four processes. Because of that, if the current thread doesn't finish processing the retrieved data and storing them into the database, a huge amount of memory is being utilized. Please let me know if anyone has a better feasible solution for this purpose.
Hi Ulf,

I am unable to figure it out. The insert statement is a batch update that worked fine on test database. Please help me, what could have been the problem.

Thanks,
Visu Nekk