Dishi Jain

Ranch Hand
+ Follow
since Jan 16, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Dishi Jain

For the time being, I found following piece of code which helps me connect and read the data...
[code=java]
[color=blue]MQQueueConnectionFactory connectionFactory = new MQQueueConnectionFactory();
connectionFactory.setChannel(channel_);
connectionFactory.setHostName(hostname_);
connectionFactory.setPort(port_);
connectionFactory.setQueueManager(queueManager_);
connectionFactory.setTransportType(1);
connectionFactory.setSSsetSSLCertStores(arg0)

Connection connection = connectionFactory.createConnection();
connection.setExceptionListener(this);
session_ = connection.createSession(DEFAULT_TRANSACTED, DEFAULT_ACKMODE);
connection.start();[/color][/code]

Still I want to know, what is the URL for admin console.??
10 years ago
Hi All,

I have to write a consumer code to read messages from Websphere MQ. For that I have installed websphere server, which gives me the MQ Explorer thick client. Please find the attachment for the same.
Now for my consumer side connection, I need the username and password. I have read many forums and IBM docs to understand that Admin Console is the place from where I can create a user. But where do I find it? The connection details are with tcp, 1414 port. How do I connect to it? PFA for it.

Or there is some other installation required for it? When I try to install client, it says Server is already installed, so server is there for sure. But I did not get any of the properties files (portdefs.props is also not there) to find these details.

System details : Windows 7
Profile : Admin
Installed Software Name : WebSphere MQ V7.0.1 for Windows-CZ4V6ML

Any help will be appreciated.

10 years ago
Hi All,

I am so much confused with Casting and Boxing, UNboxing concepts of Primitives and respective Wrappers..
What all kinds of assignment will work?
What all kinds of operators will work?
What all operations (eg, equals() ) will work?
What all types of parameter passing will work?
What all are precautions?

Can anyone please summarize them at one place..Please please??

Thanks.
Dishi
11 years ago
I have the below code :



It gives :
Exception in thread "main" java.lang.NullPointerException : Line 5

Why is it giving NPE? Isnt the variable defaulted with 0.0f? Also, I am not performing any dot operation, it's just a multiplication operation.
Thanks.
11 years ago
I have a confusion in below piece of code :



On line no 4. "duplicate local variables" compilation error comes.

please help me understand why?

Because as per my knowledge, the ouch variable in for loop has it's scope limited to for loop. can it not supersede the method parameter

ouch

here? The way method parameters will supersede member variables?

Thanks.
Dish
11 years ago
What is the difference between


<absolute-ordering>
</others>
<name>Y</name>
<name>Z</name>
</absolute-ordering>

<absolute-ordering>
<name>X</name>
</others>
<name>Z</name>
</absolute-ordering>

and

<absolute-ordering>
<name>X</name>
<name>Y</name>
</others>
</absolute-ordering>

If let say i just have a jar file packaged with three web fragments with names X, Y and Z respectively.
Oh yes..I dint think about scopes at all. It can be seen that way too, makes it more clear for me.
I appreciate your inputs.

Thanks
Hey Tim,

Seems you took it so hard on yourself

Ok, so to answer your questions,

A - incorrect - scriptlets cannot have expressions inside them
B - incorrect - scriptlets cannot have ELs inside them

C is correct as per the other forums. And yes it is. Actually while answering your questions i noticed that D is an assignment task, without any scriptlets..I noticed the ';'

Sorry for the inconvenience caused..
However I would still want you to confirm that my assumption is correct

PS-I wrote urgent because I have my ocwcd on coming Monday!!

Thanks,
Dishi
You need to create a JSP that generates some JavaScript code to populate
an array of strings used on the client-side. Which JSP code snippet will create this array?

[code=java]
A. MY_ARRAY = new Array();
<% for ( int i = 0; i < serverArray.length; i++ ) {
MY_ARRAY[<%= i %>] = '<%= serverArray[i] %>';
} %>
B. MY_ARRAY = new Array();
<% for ( int i = 0; i < serverArray.length; i++ ) {
MY_ARRAY[${i}] = '${serverArray[i]}';
} %>
C. MY_ARRAY = new Array();
<% for ( int i = 0; i < serverArray.length; i++ ) { %>
MY_ARRAY[<%= i %>] = '<%= serverArray[i] %>';
<% } %>
D. MY_ARRAY = new Array();
<% for ( int i = 0; i < serverArray.length; i++ ) { %>
MY_ARRAY[${i}] = '${serverArray[i]}';
<% } %>

[/code]

Answer: C

I understand that A and B are not correct, but can someone please clarify why is D incorrect?

Urgent.
Thanks
Dishi

Samir Dash wrote:Hi Narendra,

Actually what I was trying to say is, assume we provide a no argument constructor without access modifier. In this case we will not get any compilation error (as theoritically the class is correct), but it will not be loaded by the container as there is no public no argument constructor existing. We will get error on loading of servlet. So if in case of servlets compiler can check this, it would be better.




Having a constructor without any access modifiers mean, it is private. And so we do not allow any other class to create instance of servlet class by doing so. Hence the error is coming.
For those visiting the question for an answer and get one more doubt - like me!

Thanks,
Dish
I have to maintain a list of old values and respective new value. Which Data structure I should use? ArrayList of array with 2 columns (old, new)
or anything better?
13 years ago
Hi All,
I need a bit clarification about Exceptions.

1. Can we throw any Exception/Error from catch block? And is any declaration in method required for that?
2. We need to declare in method before throwing any Exception from try block. true/false
3. When I use throw new Exception(); in catch block ? It says "unhandled exception type Exception" unless I declare it in Method, but when I throw some other Exception, i do not need the declaration. Why? Can you mention all the scenarios while both declaration an handling are required?
As per page number 254 in K&B,
You CANNOT widen and then box. (An int can't become a Long.)

Why???
I can widen int->long
and then Box long->Long !!
Firstly,


is working fine for me. No compile time errors.
Because as per the description in Khalid Mughal, widening and then Boxing is taking place, while it is not legal.
Secondly,


doesnt work. Why is it not following the same steps as in earlier one.
Also what is the difference between,widening and casting as mentioned above?



Output : 34

How does it work?