Gaurav Jain

Ranch Hand
+ Follow
since Mar 11, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Gaurav Jain

In struts we can have different struts config files seperated according to module.Can the same be achieved in tiles that have tiles def according to modules?If yes then how can this be achieved?
19 years ago
Is there any way by means of putting extra code somewhere or some configuration setting by which this problem can be resolved?
19 years ago
JSP
We have currently some batch jobs running as stored procedures and are located in the database. How good is an idea to convert these stored procedures as scheduler tasks written in java and deployed on the application server? Will the app server be loaded if these scheduled java tasks run 24hrs?
19 years ago
In SQL server if the program is updating a row and at the same time if a program is trying to read that particular row which is being updated then what happens assuming that the transaction level is set to read_committed.
Will there be a lock and the thread try to read that row will wait till the lock is released or will it read the previous data of the row and display it to the user? What happens if the transaction is set to read_uncommitted?

Similarly what happens if 2 threads are trying to update the same row at the same time?
To write SQL's which way of the following is better and why:

1. String query = "part1 of query"
query+ = "remaining query";

2. StringBuffer query.apend("part1 of query").append("remaining query");
19 years ago
What is the bootstrap mechanism in websphere app server and how can it be used to load/initialize resources at application start up so that they are available to various components across the application?
19 years ago
In our architecture the stateless session bean calls the service (POJO) which in turn calls the DAO which does the DB operation.Taking the classic debit/credit example how should the transaction management be controlled if either of the debit or credit operation fails? We are using stored procedure instead of direct SQL's.To clarify further we want to rollbackt the entire process of debit if credit fails and vice versa.
How do i use JAAS to create my auth and auth functioanlity.I have a role model defined according to which users can have access to functionalities/pages according to their roles.
How do i implement this using JAAS.
Any tutorials/pointers will be appreciated.
19 years ago
I want to prevent the user from submitting the page twice either by hitting F5 or browser refresh button or by clicking submit again.
is there a way in javascript which can take care of all the possible scenarios of submitting the page again?
Calling connection.close in the finally block ensures that the connection is released ir still a reference is present to that connection and some additional measures need to be taken to release the connection?

Is it safe to do our own connection pooling or let the WAS connection pool handle it?
19 years ago
I am using WSAD5.1.2. I have to create a DSN yo connect to MySQL.I am able to connect using a direct JDBC connection by supplying the userid and password in the url.However when i try accessing it through a DSN i get a java.net.connection refused error.I have mentioned the userid and password in the security tab under JAAS and have selected both container and componenet managed authentication.
I am connecting to the database from my DAO.My ejb calls the service class which is a POJO and my POJO calls the DAO.I am creating the connection in the DAO.Where should i specify my resource reference (in the ejbjar.xml?) in order to create a logical mapping for my database since my ejb is not interacting with the database directly instead my DAO is doing it.
Any help and pointers will be highly appreciated.
19 years ago
I am using WSAD5.1.2. I have to create a DSN yo connect to MySQL.I am able to connect using a direct JDBC connection by supplying the userid and password in the url.However when i try accessing it through a DSN i get a java.net.connection refused error.I have mentioned the userid and password in the security tab under JAAS and have selected both container and componenet managed authentication.
I am connecting to the database from my DAO.My ejb calls the service class which is a POJO and my POJO calls the DAO.I am creating the connection in the DAO.Where should i specify my resource reference (in the ejbjar.xml?) in order to create a logical mapping for my database since my ejb is not interacting with the database directly instead my DAO is doing it.
Any help and pointers will be highly appreciated.
What happens in the case of a WAS cluster?
19 years ago
Are there 2 seperate jvm's in WAS..to explain further if i am deploying my ear file in WAS then will the call to ejb be local or remote? Are their seperate web and ejb container and do they run on seperate jvm's?
19 years ago
Is it a good practise to cache the object which is created using a factory?
For example i create a Customer DAO using the DAO factory then after creating it i store it in a hashmap in the factory and then when a different request comes instead of creating the CustomerDAO again i serve the same from the hashmap.