Gayatri Ganesh

Ranch Hand
+ Follow
since Dec 23, 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 Gayatri Ganesh


I am new to tapestry and come from a struts background.

I have a page which has a couple of textfields.
when these textfields are displayed the 1st time, i retrieve the values for these from the database using 2 parameters (as a part of the where clause) passed to this page from the previous page .
these are editable textfields. so if the user changes these values and clicks the save button, this page should save this data back to the database.
But it cannot do so because it has lost the 2 parameters which were intially passed to this page.

How do i get about this problem ?


I need to save or update an object to the database.
I use the seeion.saveOrUpdate(myobj) method but it always updates the object even the 1st time when the object is created. And hence the object is never stored to the db.

The hbm file is as follows :

<class name="MyClass" table="Mytable" lazy="true" dynamic-update="true" dynamic-insert="true">
<meta attribute="extends">MySuperClass</meta>
<cache usage=nonstrict-read-write"/>
<composite-id class="MyPK" name=Id">
<key-many-to-one column="mycolumn1" name="myColumn1" class="MyColumn1"/>
<key-many-to-one column="mycolumn2" name="myColumn2" class="MyColumn2"/>

can anyone please tell me what is wrong ?


I have a bean definition as follows in my spring-context.xml file:

<bean id="myService"
singleton="true" lazy-init="true" autowire="constructor"
dependency-check="default" >


public class MyServiceImpl extends BaseService implements MyService {

private AnotherService as;

public MyServiceImpl (SessionFactory sf, AnotherService as){
super(sf); = as;

'myService' bean is autowired by constructor.
what i understand by autowire='constructor' is :
create this bean instance using the constructor and arguments to the constructor are defined as other beans the spring-context.xml.
so i would have to write
in the bean definition

but how does the above code work without the <onstructor-arg>

Hi Everyone,

Domian objects are the objects in the middle tier of the application which model the application.
Till now I have been having properties on the domain objects and corresponding mutators.

Today I was reading a book which has a domain object with along with he properties and its mutators have methods which actually contain the business logic.

I am wondering is this a good practise to put the business logic in domain objects ?


[Edited to add code tags - Paul Sturrock]
[ September 20, 2006: Message edited by: Paul Sturrock ]

I downloaded apache-tomcat-4.1.34 and unzipped the file into
C:\tomcat\ so this is the directory structure i have

i want to create myapplication.xml.

the documents tell me to go under C:\tomcat\apache-tomcat-4.1.34\conf\catalina\localhost
and create myapp.xml file.

but there is no catalina folder under C:\tomcat\apache-tomcat-4.1.34\conf
so i created catalina\localhost and put myapp.xml file there.

when i try to hit http://localhost:8080/myapp, I get a file not found 404 error.
can anyone please point out what i did wrong.

11 years ago
thanks Satou for the reply.
So do you mean if

<bean id="person" class="com.try.Person">
<property name="name"/>

And I have defined Person bean as below :
public class Person {
private String name;

public void setName(String s) {
name = s;

Then say in my Manager class I Should say :

if i did not call the above setter method i would get an exception ?

Hi Everyone,

I am reading the Spring documentation at on page 37, there is a topic on checking dependencies.

What I don't understand is how by default the Spring IoC Container's default is to NOT check for dependencies.
Because I have an applicationContext.xml with no dependency-check defined (so it should have the default value = no dependency-check), but whenever i deploy a bean without the depending bean i get an error when i start/restart tomcat. For example, I have 2 beans, say 'beanA' and 'beanB' like below

<bean id="beanA" ref="beanB"/>

<bean id="beanB" >

if i did not define 'beanB' and only have the 1st line : <bean id="beanA" ref="beanB"/> then
on Tomcat startup it complains. then how are we saying that Spring IoC Container has no dependency-check by default.
Can anyone please explain this ?


In EJB 3.0 i do not understand the difference between the create() method vs the persist().
When should we use the create() and when should the persist() method be used ?


Hibernate has methods for finding - find() and loading load().
In my opinion, correct me if i am wrong, both do the same task.
Find that record and then return it.
I am unclear when we should use the find() method versus the load() method.

Thanks Mark and Dave.
11 years ago