Jacek Ostrowski

+ Follow
since Feb 09, 2007
Merit badge: grant badges
For More
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 Jacek Ostrowski

This code runs as standalone process on sun jdk 1.5.0_11 on RedHat Linux.
As you can suspect shown method is a part of logging utility.
Application uses third party native code via JNI but as far as I know we never had any problems with invalid stack traces.

As for JLS 17.3 suggestion - I agree that it looks like there is some synchronization issue but I can't find what it could be.
Class that thrown NPE is a log4j Logger wrapper and it only has static field logger. Classes using this wrapper follow log4j usage pattern - they declare static field logger.

16 years ago

Why not ? if(level == null || msg == null || params == null)result == npe;// duh

I agree that NPE may be thrown from lines 322 or 324 if some of arguments are null, but I can't see how it could be thrown from line 321. It looks like line 320 was not executed or at least not completed before line 321 was called.

So far the most important for me is to understand how it happened.

16 years ago

Can you tell if its is 'param' that is null

Yes, there is another log method that calls this one with a null param.
But it should have no meaning and it should not throw NPE.

Since objs is a local variable, that really seems impossible

Exactly what I'm thinking.

I think the most likely scenario is that you're accidentally executing an older version of the code

That is the first what I've checked. Line numbers are correct.

it seems like it would have to be a JVM bug of some sort. You could try looking for a bug report, but I suspect there are many NullPointerException reports that are not related to this problem.

It is my conclusion too. There are many NPEs in bug database and so far I haven't found anything close to mine.

What kind of heavy stress are you dealing with ?

We do load tests and this means that we have many threads and high CPU load.

Thanks for those suggestions. I'm going back to java bug database

16 years ago
Howdy ranchers, I found NullPointerException that I can't explain.
I'm going mad because of it so maybe you will help me.

Here is method that throws NPE, line numbers are in comments

NPE was thrown from line 321 during stress tests under heavy load, it happened only few times and can't be reproduced, code is multi-threaded.

Any ideas ?

16 years ago
It doesn't matter how many apps you have.
For some apps BD is useful, for others is not.

Here I would use BD to reduce coupling between tiers and
I would share BD between both apps.

Hi Sam,

From http://java.sun.com/blueprints/corej2eepatterns/Patterns/BusinessDelegate.html

Reduces Coupling, Improves Manageability
The Business Delegate reduces coupling between the presentation tier and the business tier by hiding all business-tier implementation details. It is easier to manage changes because they are centralized in one place, the Business Delegate.

This is why BD is so important.

Hi Sam,

I see no reason for payment processing via COBOL system.
You should read assignment carefully.


1,2,3 are true because CMP was slow and limited in EJB1.1

A is true - BMP doesn't require mapping in descriptors which is server dependent
D is true - BMP requires SQL in code and SQL might be db dependent

B is true - negation of Q1

Hi Filipe,

If load-balancer uses predefined IP ranges (I think that this is called sticky IP) to maintain server affinity then all request from given client goes always to same server. So from client's perspective there is only one server in a cluster. No problem with sessions here. Works regardless of used protocol.

If load-balancer uses cookies, then for first request it chooses server for a client, forwards request to chosen server and adds to response his own cookie with server ip (or anything that could be used to find this server). On following requests load-balancer finds its own cookie, then it forwards requests to server based on info from the cookie. This works only with HTTP.

All this is far beyond requirements for SCEA part 1. For exam you need to know that load-balancer needs to maintain client sessions.

Hi Manish

Thnx for congrats. About your questions:

RE Q1:
I think exam is based on EJB 1.1 (no local EJBs, no MDBs too but generinc messaging is covered)

RE Q3:
No questions related to code.
All questions are very high level. Most questions about EJB are when to use them and which one when.

RE Q4:
I think that all question are equal in marks. You need to answer at least 33 questions correctly to pass.


I've used Cisco CSS 15001 and it had two modes for maintaining server affinity:

A) via Cokies - load-balancer adds is own cookie to served content
B) via IP ranges - admin has to manually define IPs of clients served by each server in a cluster.

Method A doesn't work if load-balancer uses HTTPS to connect to the servers.

If load-balancer is equipped with encryption module it is possible to use method A with HTTPS. Load-balancer uses HTTP to connect to servers, adds cookie and then sends content to a client via HTTPS. This way servers don't waste CPU for HTTPS handling.

Method B doesn't support automatic failover.

[ April 30, 2007: Message edited by: Jacek Ostrowski ]

How many machines I can install the exam simulator on?

You can install Whizlabs Exam Simulator maximum 3 times on same machine or different machines. As we understand the need of a person to re-install it, say for use at home and work or for times of eventuality like system crash or reformatting, Whizlabs allow 3 activations with the same license number provided to you at the time of purchase.

but ....


YOU ARE THE ONLY PERSON ENTITLED TO USE THIS SOFTWARE. This is a license agreement between you (an individual) and Whizlabs Software Private Limited whereby Whizlabs grants you the non-exclusive and non-transferable license and right to use this software product, updates (if any), and accompanying documentation (collectively the "Software"). ONLY YOU (AND NO ONE ELSE) IS ENTITLED TO INSTALL, OR USE THE SOFTWARE. .....


I've just "cleared" SCEA part 1 with 100% today !

My resources:
- Cade's book
- IBM Java certification success, Part 4: SCEA
- Pete Morgan's Sun Certified Enterprise Architect Part 1 Notes
- Allen's book (Legacy Connectivity & Common Architectures and Protocols)
- Whizlabs demo
- some mock exams
- this forum

Thank you all for making this forum so helpful.

I missed that you answered 2 in Q2, so now we agree on all the questions.


I see we can agree with most of the questions.

Only difference is in Q2.
I answered 4 (Transport) because of TLS which stands for Transport Layer Security TLS.
I was wrong because Transport Layer in TLS name refers to TCP/IP model.

Now I think that correct answer is 2 (Presentation) - Presentation Layer