Win a copy of React Cookbook: Recipes for Mastering the React Framework this week in the HTML Pages with CSS and JavaScript forum!

Raj Joe

Ranch Hand
+ Follow
since Oct 15, 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 Raj Joe

I have a method which is non static ,this method calls a static method
What is happening is all objects in non static method is passed to satic method as (static object).

Note I am not even sending the any static objects when I am calling a static method (ie non of the variables in method call are static.
16 years ago
I have a problem in concurrency when I save user info into the form bean.

User1 one saves the form info and comes back to the same page with same added info (with "aaa" and "bbb" values for txtfield 1 and textfield 2 respectively)

user2 Does the same as above (with "ccc" and "ddd" values for txtfield 1 and textfield 2 respectively)


Problem : I am seeing the values ccc and ddd in txtfield 1 and textfield 2 of user1 .User1's form instance has user2 info.
16 years ago
I have a screen which using stylesheets and images.
If I keep pressing F5 for 10 times or so,page is totally distorted with styles not applied etc.

What could be the problem.
Hi

I would like to disable the browser back button IE and NE
Can anyone help me on the workarounds to implement the same.

Thanks
I have a TD with width say 30% of the table and I populate data into this TD.If I insert a large string then TD expands giving a horizontal scroll bar.

I would like the data in TD to wrap to next line after occuping the given width.eg AAAAAAAA
AAAAAAAA
Broswer IE 5.5

I am fetching data from DB and displaying in the hrml table.

I have data like "ASP SSS" in my database but when I fetch this data and display in HTML table I just see "ASP SSS".All the remaining spaces are terminated.

Can I have a solution for this problem.

thanks
How Can I monitor the following in Performanmce Testing

1.Monitoring the utilization of all pools in app server. For each pool or container in the queing network we can watch the metrics

2.Server Monitor: CPU utilization, I/O of data server ,webserver and appserver

3.Application call flow and response time profile and

4.Thread state execution profile
16 years ago
How Can I monitor the following in WAS 5.1

1.Monitoring the utilization of all pools. For each pool or container in the queing network we can watch the metrics

2.Server Monitor: CPU utilization, I/O

3.Application call flow and response time profile and

4.Thread state execution profile
16 years ago

Originally posted by Arvind Shukla:
You assumption is right, every JVM will have its own instance of singleton.



Arvind
Can I create a global reference(same static variable or singleton) for all JVMs in the cluster.

Is there any issue with caching remote or local home objects in a singleton as I described earlier.(As they are going to be repaeated in cache of each JVM in cluster)
16 years ago
What happens to singletons in websphere clustered envorinment.I assume that for every JVM in the cluster we will have a singleton.

In the below code what happens to cachedReferences in a websphere clustered environment

public class ServiceLocator
{
private static ServiceLocator serviceLocator;

/**
* The initial context object
*/
private InitialContext initCtx;

/**
* The Map object representing the Cached info
*/
private Map cachedReferences;



/**
* The private Constructor
*/
private ServiceLocator()
{
cachedReferences = new HashMap(10);
try
{
initCtx = new InitialContext();
}
catch (NamingException ne)
{
}
}

/**
*
* Method getInstance to get back static instance of Service Locator
*
* @return Singleton instance of Service Locator
*/
public static ServiceLocator getInstance()
{
if (serviceLocator == null)
{
serviceLocator = new ServiceLocator();
}
return serviceLocator;
}

public EJBLocalHome getLocalHome(String jndiName, Class homeInterfaceClass)

{
EJBLocalHome ejbHome = null;

Object object = cachedReferences.get(jndiName);

if (object == null)
{
try
{
object = initCtx.lookup(jndiName);
cachedReferences.put(jndiName, object);
}
catch (NamingException ne)
{
}
}


ejbHome = (EJBLocalHome ) PortableRemoteObject.narrow (object,homeInterfaceClass);


return ejbHome;
}


}
16 years ago
How does websphere maintain state of statefull session beans in a clustered environment.
[ November 02, 2004: Message edited by: Raj Joe ]
16 years ago
I usually get into dilemma when to use entity beans and when to use simple DAO.
What are various way to manage transactions in J2EE application.

I have two methods in my simple DAO in both i am getting connection from the application connection pool,one method which updates the DB1 and other updates DB2.(I want to manage them as one single transaction.


this is the flow
Client meth1() -calls--> stateless session bean meth1()- calls---->which meth1() and meth2() of DAO.

my questions:

Can i maintain transcation at sateless session bean meth1()?
If yes I am afraid that in my DAO i am gettting fifferent connects inmeth1() and meth2().Will rollback on session bean rollback both meth1 and meth2 of DAO?

Originally posted by Ali Pope:


I am not saying this is bad. Object creating costs are not so high - maybe just as regards the garbage collection (short living objects).
I am not an adept of re-inventing the wheel. Logging - even if it seems simple - may raise problems (concurrency, etc).

./pope



thanks pope.
Concurrency - can you please expand on concurrency issue with respect to logging (log4J)
16 years ago

Originally posted by Ali Pope:
Indeed. This technique is recommended for large hierachies/application. There you will need to log the module and not every particular class. Instead, in a smaller application you can use the simple way:



./pope



Pope,

I am talking about usage of log4j.

1. Firstly What is the advantage of having named loggers for each class?

2. Secondly look at the statements below

logger.error(new Error("","",""));

Is creation of customize classes like new Error()/Debug/Info etc very expensive?how is it different from the below statement?

logger.logError("eror message");
16 years ago