v Gupta

Greenhorn
+ Follow
since May 26, 2004
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 v Gupta

Why do you have to keep the objects in memory?

The objects can be loaded from the database on need basis. An ORM tool like Hibernate can be used, it will also help in filtering the data as per the need.
11 years ago
There is only one difference, in case of Session beans you get remote object by calling create method but in the case of Entity means we call finder() methods or create() when new data needs to be inserted into the database.
Mandatory transaction required means, the method for which this attribute has been defined must be called from a transaction and that transaction should have been started from EJB, not from Servlet or JSP
I think if we define a transaction timeout value for a bean that will override the default timeout value of JTA, moreover in conf.xml the value for timeout is 60.
Hi,

I am using entity beans (CMP)in weblogic 6.1 and i specified transaction timeout value in the deployment descriptor as 1000, still my transaction fails after 300 or sometimes after 302 seconds.

Can anyone give a solution to this problem.

Thanks
VGupta
Hi,

Yes you are right, incase of CMP DAO pattern is not used but think of a scenario in which you are required to do some validations or you have to check data of some other table then only you have to persist the values, here you can call a DAO from a business method of CMP and if want to do some calculations with other values of a table, that can be done.

Cheers
Hi,

First of all you should not return a result as it is a connected result set.
After executing the query, you should populate the data into a value object and close the result set, statement and the connection as every connection object has a timeout associated with it.

If you don't want stale data, you should go for Serializable isolation level.
After getting the connection object change the isolation level and then go for fetching data. This can be done in Session bean also but one thing you should also understand, it will decrease the performance.

Serializable should be used if data integrity is on high priority then perfromance.

Cheers
Hi,

You are right, incase of Stateless beans we can specify how many bean instances we want at startup, but in case of Entity beans it's been taken care by container.
All the finder methods are executed in the pooled state of the bean and still it depends upon container whether to load all the data after executing finder method(active loading) or delay it(lazy loading) till any business method is called.

We can only specify the maximum bean pool size taking performance into consideration.


Cheers