Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Parmeet Singh

Greenhorn
+ Follow
since Feb 09, 2006
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 Parmeet Singh

I am a big fan of java, and my bread and butter depnds on it

so i am bit worried about future of java after oracle acquisition,

my question to the community is:-

What will be the future of java, is there something to be afraid?

Thanks n regards,
parmeet singh

SCJP, SCWCD, SCBCD, SCEA, SCMAD
11 years ago
Question:--

My Question is

What is a diffrence between LocalEnvrironment and Envrionment variables in Ibm Message Broker ESQL?

Please assist..

thanks
parmeet
SCJP SCJD SCWCD SCBCD SCJDWS SCEA
11 years ago
I want to softcode resource value so that it picks resource value from system variables as below:=

have this:-
<sqlMap resource="resources/sqlmap_creditLines.xml"/>
wanna have somelike this:-
<sqlMap resource="${creditlines}"/>

kindly assist,,
thanks
Hi Ranchers,

I know 64% is not so attractive, but am very happy with what i got.
I gave SCEA part 1 on 29th september as my voucher was expiring by 30th sept.
Didnt get much time to study as was in canada on some project.

Exam was not easy,, trust me.. i was laughing on myself.. sometimes even felt like crying,:-

for me most difficult part was security, they ask kind of question i never even heard about.

Techonlogies i feel that were dominant in exam:-
1. JPA
2. JSF
3. SOA concept
4. how to manage transaction in integeration layers like JCA JMS web services


I have 2.4 years of expirence and i studies for about 28 hours(2 hours per day for 2 weeks,

Material i gone through:-
1. java pattern, Application Design Concepts and Principles, common architecture, security:
http://java.boot.by/scea5-guide/
2. Business Tier,
referred some site and made one example for each EJB3 component and googled for diffrence between ejb2 vs ejb3, and study through them. d
3. WEB
gone through some example from jsf in action and googled jsf vs struts,, it will list out features diffrence... and SCEA is concern only about features. so it may help
4. Integration and Messaging
only study about JCA corba as already have good understanidng for JMS and web services so took chance.

i gave suns mock exam for SCEA on 27th night, was failed by few percents but it gave me a right direction and areas to put focus on.

last words:-

Security was very difficult, the kind of questions i saw on security was not even are on java.boot.by --> SCEA --> security section, but rest its a very good referece.

pattern is the most imp. as it has the largets chuck on exam and it can be master easily best site is http://java.boot.by/scea5-guide/


SCEA is not only about knowledge but about good analytical skills so practice lot by discussions with frnds. like why jsf bettern than sturst or spring mvc,,, or why to use ejbs.. do lot of discussion like tihs it will really help.

i got 90s in scjp, scd, bcd however these 64% really made me cry for.

take care,, all the best,, thanks for yours guidance... enjoy..
Parmeet Singh
SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCDWS 1.4, SCEA 5 part 1
[ September 01, 2008: Message edited by: Parmeet Singh ]
12 years ago
As per the java doc Selector class

A selectable channel is either in blocking mode or in non-blocking mode. In blocking mode, every I/O operation invoked upon the channel will block until it completes. In non-blocking mode an I/O operation will never block and may transfer fewer bytes than were requested or possibly no bytes at all. The blocking mode of a selectable channel may be determined by invoking its isBlocking method.

what does it mean when it says "I/O operation invoked upon the channel will block until it completes"

Please assist
12 years ago
Hi Ranchers,

I gone through the java nio tutorial, i know nio work fast becaouse it doesnt copy file into the jvm.

but what i didnt get is..

Why nio also refer as non blocking io..

and what used to be blocked in conventional IOs.


Please assist..
thanks in advance.
12 years ago
Thank you for the info.. its really help ful
In a below given programme, when i run executer class, it makes two NoWai threads and these thread gets the reference of Workspace class.
Workspace class has a synchronized method name doDa(),

My question: why and how two threads are able to access synchronized method doDa() at the same time.

We can confirm this by checking the output i.e.

Message: WorkPlace@923e30 first
Thread name: Thread-1

Message: WorkPlace@923e30 first
Thread name: Thread-0

Message: WorkPlace@923e30 second
Thread name: Thread-1

Message: WorkPlace@923e30 second
Thread name: Thread-0

it shows two threads enter the synchronized method at teh same time.


class NoWai extends Thread{
public NoWai(){
start();
}

public void run(){
WorkPlace.getInstance().doDa();
}
}

class WorkPlace{
private Object lock = new Object();
private WorkPlace(){
}

static WorkPlace work = null;

public static WorkPlace getInstance(){
if(work == null){
work = new WorkPlace();
}
return work;
}


public synchronized void doDa(){
TUtil.print(this.getInstance() + " first");

TUtil.print(this.getInstance() + " second");
}
}


class Executer {
public static void main(String[] args) throws Exception{
for(int i =0 ; i < 2; i++){
new NoWai();
}
}
}

class TUtil{
static void print(String message){
System.out.println("Message: "+message +
"\nThread name: "+Thread.currentThread().getName() + "\n");
}
}
I am in India, and want to register my self for SCJD exam, please guide me how would i able to do that.

As according to the Sun web site, i cant purchase the assignment exam on line, so i contacted the sun india, they gave some NIIT prometric number. i contacted NIIT prometric center they said they are not aware of assignment based examination as there is not voucher for the same..

Kindly assist,

Thank you
Thank you. it was really helpful
12 years ago
public int read() throws IOException;

read() in java.io.Reader returns int, and to print it we have to cast it to char.

why not this method can have return type char instead of int.

one point can be it returns -1 in case no char exist thats why it returns int, but that can not be a sole reason as it leads to cast an output every time we read a char. may be million times in some big file.

Please assist.
12 years ago
Matthew
There is nothing more than char or beyond char we need to print.
We would always print char, not its ASCII value,
and as a genral rule, there should be a minimum scope where ever possible.
so char would be large enough, nothing more than char scoe needed..
than why return type as a char not int..

sir am not looking for alternatives, but just wanna know there must be some good logic behind that..

please assist.
12 years ago
public int read() throws IOException;

read() in java.io.Reader returns int, and to print it we have to cast it to char.

why not this method can have return type char instead of int.

one point can be it returns -1 in case no char exist thats why it returns int, but that can not be a sole reason as it leads to cast an output every time we read a char. may be million times in some big file.

Please assist.
12 years ago