Nick Faiz

Greenhorn
+ Follow
since Oct 12, 2002
Merit badge: grant badges
For More
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 Nick Faiz

Hi,
I'm asking this problem in relation to using JMX remotely to check on the condition of a RuntimeMBean? Is there a way in which I can avoid having to supply a username and password combination during the communication. I appreciate that the piece of code must be authorised to use the JMX service, can this be achieved another way other than including an encoded or encrypted username and password in a properties file?
MBeanHome localHome = (MBeanHome) Helper.getMBeanHome("username", "password", "t3://someappserver:7001", "someserverorother");
This question can also be extended to storing usernames and password for authentication via JNDI.
Thanks,
Nick Faiz
[ April 29, 2004: Message edited by: Nick Faiz ]
19 years ago
Thanks for your replies, Matthew and Dave.
Nick
Where is ejbCreate() defined, if not in, for example, the SessionBean interface?
Thanks,
Nick
Also, consider making it static, as it's likely that the information within it will serve for all objects that will want to call on it.
Things may become more difficult if you have many objects wishing to alter the data it holds at once - you can always synchronize but performance might be an issue.
If you simply want to cache something HashMap is a good bet, as the previous post pointed out.
20 years ago
How does one measure how many threads to create within a given jvm, to provide optimal performance?
I ask because Im writing an application that must make a threaded request of SAP for every order number it finds in an database. It seems unreasonable that I allow this to be an open-ended number of threads, even though my employers will never have an infinite amount of orders in their database.
I'm thinking of writing some kind of optimization algorithm using Runtime.freeMemory(), totalMemory() and maxMemory().
Is there a better alternative?
Kathy,
Thanks for your answer!
To hazard a guess, for an answer to your question -
// pseudocode
try
{
...
return ;
...
}
catch (SomeException e)
{
return ;
...
}
finally
{
System.out.println( "!" ) ;
}
I'm a little intrigued - where can I learn about the stack that contains currently executing methods - the JLS?
I'm actually a SCJP and am beginning study for the SCWCD quite soon. It's great to learn more about the fundamentals, however.
[ January 30, 2003: Message edited by: Nick Faiz ]
This is an oddity I don't quite understand.
Can anyone shed some light on why foo(), here, which has no return type whatsoever (i.e. void) operates quite well with an empty return statement?
If it seems odd, I am using software that specifies methods be written as foo() is.

public class TestingReturnType {

public final static void foo()
{
System.out.println( 1 ) ;
return ;
}

public static void main( String[] args )
{
foo() ;
}
}
Thanks,
biv
[ January 29, 2003: Message edited by: brain_in_vat ]
Hi,
If I've successfully overridden equals( Object o ) for my own class, why must I also override hashCode()? What breaks the hashCode() implementation of Object, which works perfectly well otherwise?
Please note, when overriding equals( Object o ) I do compare the values returned by hashCode() for o and the object running the method.
Nick
Yes, 1.4 seems harder than anything I studied for in 1.2.
I studied for the 1.2 exam quite extensively, between programming contracts, then jumped into the 1.4 exam and passed, but not to my full satisfaction.
The difference between mock questions for the 1.2 and the questions I found in 1.4 was significant - there were still standard bread and butter questions, but there were also mind bending questions relating to class interaction, etc., that I had not anticipated.
O, I also knew inner classes backwards too.
So my advice is to go over the fundamentals very well - rote learn, as it stands you in good stead in the workplace when you need to be fast about problem solving. Then, spend another good while thinking of example questions that have to do with one, two, or three classes interacting and presenting a problem - about threads, casting, method overriding, etc..
Nick
Max,
See if javax.servlet.http.HttpSessionBindingListener is what you want.
[ December 04, 2002: Message edited by: Nick_F ]
21 years ago
Hi, what does this certification cost? I've looked at Prometric and Ibm.com; can't seem to find a price.
I work with XML, (XSL, XPath, Xerces) just about everyday. How long do people generally study for this exam?
Thanks,
Nick