Swapnil Sapar

Ranch Hand
+ Follow
since Sep 29, 2003
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 Swapnil Sapar


I have been searching abt this for a while now. Could not find any good answer.
I'm using JUnit 4.8.1 but can go to JUnit 3 if I have too.

Here is my problem:

I have 3 test suites each containing 11, 12, 13 tests in it. CarTestSuite, CycleTestSuite, BoatTestSuite
Now I wish to create a new suite SanityReverseTestSuite containing only 3 tests. These tests are handpicked from the each of the above suites.
I know one I include all 3 suites into one using @Suite.SuiteClasses annotation but it would include *ALL* tests from these suite whereas I'm looking for including only ONE test from each of these suite.
Any tips/suggestions?


11 years ago
Thanks for the replies. I found the solution that uses com.sun.jndi.dns.DnsContextFactory.
Here is the link to the HttpClient-User mailing list - HttpClient-User

I'm looking for a way to get IP address for a given host and given DNS.

something like ...

Now I know I can use following but here I dont get a chance to specify my own DNS server - I dont see any InetAddress API that allow me to specify my DNS.

I really don't want to use Runtime.exec() to actually run nslookup command, instead I'm looking for a java API or third party library API.


Here is the best place to see, relate and compare all the things that can go into deployment descriptor.


This is very good for understanding and turned out to be very useful for my exam. This was another thing that I forgot to mention in my post after the exam.
Make the best use of it.

Cheers and wish you all the best for XMAS.
I cracked SCWCD exam today. Scored 92% - 64/80

Only Book: HFSJ - Kathy, Bert

Mock Tests: Marcus Greens - http://www.examulator.com/moodle/
JavaRanch's own SCWCD Mock Exam
Mika Hirvasoja's Mock Exam
Anand Chawla's Mock Exam

Study Time: 2-3 hours daily for 3 months while on the job. I had no prior experience with live J2EE/JSP/Servlets projects or code. But now I can say I'm PRO in JSP and Servlets at least.

Exam lasted little longer than I expected. There were 80 questions instead of 69. Abt 4-5 questions on drag-and-drop.

I'm from India. I purchased the voucher 5 mins before the exam. I got it for discounted price of Rs 5,500 in NIIT, Pune.

Voucher is cheaper on website (Rs 4,200). But
Sun India website just sucks, it does not allow to buy this exam online. You can proceed from above URL till the checkout page but thats where they do not have any option for providing Creadit Card number. I tried 100 times but same damn story. This is a second bad experience of Sun India for me. They should do something about it.

Anyways its all over now. Its time to party !!!


[ December 10, 2007: Message edited by: Swapnil Sapar ]

[ December 10, 2007: Message edited by: Swapnil Sapar ]
[ December 10, 2007: Message edited by: Christophe Verre ]
I�m looking for a following cert exam voucher at discounted price.

SCWCD - Sun Certified Web Component Developer for the Java 2 Platform, Enterprise Edition 1.4 (CX-310-081)

If you have already purchased one, let me know the price for it.
Also mention the voucher expiry date.

Write to me...
Pune, India.
15 years ago
Vouchers are available online too in India.
Just follow the link below with your name and other info and you will be able to buy the voucher online.

Its shows SCWCD price as Rs 4,800. Not sure if there will be some VAT added later. I went till step 4 just to see the price and it remained same as Rs 4,800/-. So I suppose the price is Rs 4,800/- only.

Can somebody share the experience of buying the voucher online?
I'm also stuck in the same place. Seb, I do not see any relation between RemoteServiceImpl and RemoteServiceWrapper(Service). So how can we have RemoteServiceImpl object bound in the server type casted to Service interface at client side?

I tried another solution from here
But this also did not help much.

Has anyone found any other elegant solution to this problem where I can have common service refernce for both standalone and remote mode?

[ January 09, 2006: Message edited by: Swapnil Sapar ]
I'm happy with the old version of Jalopy but I lost the default original Sun standard convension xml file that came with the package.

Can somebody please share the xml file/or just paste the contents.

I've some basic doubts regarding URLyBird assignment.

1. Can a CSR add a "new" record into the DB? OR he can just BOOK\DELETE a record from db file?
The URLyBird instructions does not talk about this, but i feel its logical and much needed functionality. I've received a DB file which has about 30 records. If we don't implement the addNewRecord then we'll always be playing with those 30 records only. (Yes, I know I can create my own db file for testing)

2. Can a CSR add new name of the hotel?
Do we have to implement a functionality where a CRS can add/remove/modify different Hotels/Locations/Rate?
If not, then is it a good idea to use combo boxes on GUI to select the Hotel/location ?
Then my next Q would be, getting all the possible values from DB all the way to GUI to fill the combo boxes... is that a good idea?

3. 48 hours rule seem to be interesting. I browsed through the related topics here but there are no consensus whether to implement this at client side or server side.
I think I'll implement in db interface side to make the DB safe in case if they expect the DB to handle this for some other future client. Document the same.
Also its not difficult to also have the logic in GUI. So that my validation need not pass all the way back to the server. So if the date is in the not acceptable range, request can be discarded upfront.

What do you think, folks?
Finally !!!
Received the long awaited assignment today morning!
Spent the first day going through the instructions and browsing the SCJD saloon.
BTW, I found the exactly same instructions posted net also . (please don't ask me the link :roll: )

This is really a great place for SCJD and other java cert aspirants !!! Lots of information on design and locking considerations! (especially where there is a scope for assumptions)

As I start with the exciting design phase, I'll keep coming back here to post my doubts and bug you ppl

Any suggestions on the topics, pointers OR things to look out while doing the design URLyBird 1.1.3 ?
Thanks in advance for that.

[ December 09, 2005: Message edited by: Swapnil Sapar ]
I found an approach here which achieves this...
Using RMI with Client-Side Callbacks


An in-depth look at RMI callbacks

In this they suggest to expose client side object on an anonymous port.
Secret lies in

Its really easy.

I'm just jumping around RMI classes till I get my programming assignment.

I've a doubt regarding the handling of CallBack or Broadcast mechanisms in RMI client server environment. I can always inform (pass a message) to server from client but when it comes to the server to inform something to client, my thread slows down
e.g. If I want to broadcast a message "server going down" to all the clients connected to it. Basically I'm looking for a mechanism of calling a client's method from server by passing some message object.

I couldn't find a definitive, commonly used approach for this. I finally implemented a thread mechanism in which a client thread is constantly locked into the Server till some message appears in the server Q for broadcasting. And then the method returns to client with the message and then again gets locked with server. But then it was getting complex and risky with all the use-cases coming together.

Instead I'm more interested in knowing if there is any traditional, more sophisticated mechanism already available in Java RMI world?

I browsed though the SCJD topics but couldn't find anything which is classical.

Thanks in advance,
Good to be back on ranch after almost an year. I cleared a SCJP an year back and now its time to step up for SCJD.

For SCJP I extensively used Kathy and Bert's book which is I think default n popular choice. I really loved this book. For practice I referred :Dan Chisholm's Study Guide. That was really cool. I scored 90

I just finished reading the objectives n other basic info for SCJD. Now I want to settle with some book before I take the Programming Assignment. I know there is a section for SCJD in KnB's book also. But just wanted to know if there is any famous/popular choice of book for SCJD also?

Also I want to read through some more sample SCJD Programming Assignments apart from those given in the Cathy's book?

I'm going through the posts here. Any help\links\feedbacks\pointers\comments on the book or sample assignment appreciated.

[ October 21, 2005: Message edited by: Swapnil Sapar ]
Thanks folks for the replies.
The transaction was not done with a CreditCard. I issued a Bank's demand draft (DD) in the favor of Sun Microsystems, Inc. The DD and the cover letter was submitted personally at the local Sun's office.
Later I received the following acknowledgement.

Unfortunately it doesn't mention any amount in it. So it cannot be used as receipt. :roll:

Initially when I tried contacting the local Sun authority. I was told that they are not able to find any entry in database matching my name or voucher number. (surprising!). Then I provided them the Bank's Demand Draft number and other transaction details. They put me on hold for more than 2 weeks saying we need some time to get the help from Sun's accounts dept. I was told that the authority needs some kind of proof to validate the demand draft has been credited into Sun's account. After a multiple enquiry attempts they gave another excuse. This time the person in the Sun's finance has left and they do not have anybody(!!) to help them find the transaction record. (Note: It takes less than a min for the authorized account owner to call up the local Bank's CallCenter to confirm any transaction details. I myself received the details by calling Bank's CallCenter to confirm the demand draft issued to Sun from my account.)

This is surprising (at the same time absurd :confused to hear such excuses from Sun agency.

Is there is anything that I can do further to speed up the request? Its been more than month now and I'm starting to loose my patience.