Mirko Bernardini

Greenhorn
+ Follow
since Oct 28, 2007
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 Mirko Bernardini


The correct answer in my simulator is D (without any explanation), for me the correct answer is C !



Yes we right !!! in effect I inversed the letters on the post... I was sleeping
The correct answer in my simulator is C (without any explanation), for me the correct answer is D !

However thanksssssssss

Mirko
I'm training with a simulator and I received this question:

Your application sends three messages with no delivery failures to a JMS destination, where two consumers consume messages from the destination.
How do both consumers ensure they receive all messages?

A. Consumers listen to a JMS queue without message selectors.
B. Consumers listen to a JMS queue with message selectors.
C. Consumers subscribe to a JMS topic with message selectors.
D. Consumers subscribe to a JMS topic without message selectors.

The correct answer in my simulator is D (without any explanation), for me the correct answer is C !
If I must receive all the messages I don't need a message selector, what do you think ?
Which is the correct answer ?

Thanks

M.
I found this question in the whizlab simulator:

Which of the following is a category of Web Service ?
1) Self contained
2) Business information
3) Modular
4) Self describing


the right answer is 2) but I did't find any documentation about....

Mirko
Which are the categories of WS ?
I know only one

1) Business Information

Anybody know about the others please !!!
Hi everybody,

I'm trying to connect a MDB consumer application A1 to another application A2. When A2 retrive the messages from the queue I would like fix a user in the MDB context to log him.

Now the getMessageDrivenContext().getCallerPrincipal() is <anonymous>.
How can I add the user to the MessageDrivenBean Context to perform also a security access to A1?

Help me!!!

Mirko
Source: Sun Certified Web Component Developer Study Guide by David Bridgewater (Chapter 3)

11. What is the outcome of executing ServletA? You can assume that (1) ServletB has a mapping of �/ServletB� and a name of �ServletB,� and (2) imports have been omitted from the code for brevity; the code will compile successfully. (Choose one.)

public class ServletA extends HttpServlet {

public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {

RequestDispatcher rd = getServletContext().getNamedDispatcher("ServletB");
rd.forward(req, resp);
}
}

public class ServletB {

public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
String attr = (String)
req.getAttribute("javax.servlet.forward.servlet_path");
PrintWriter out = resp.getWriter();
out.write("Attribute value: " + attr);
}
}

A. NullPointerException thrown
B. �Attribute value: null� output to the web page
C. A blank web page
D. ServletNotFoundException thrown
E. �Attribute value: /ServletB� output to the web page
F. �Attribute value: ServletB� output to the web page
G. ClassCastException thrown


Response:

B is the correct answer. The code executes correctly. However, because the method used to obtain a RequestDispatcher in ServletA is setNamedDispatcher(), the attribute javax.servlet.forward.servlet_path is not set up in the servlet that is the target of the forward, ServletB.
A, D, and G are incorrect, for the code runs perfectly well. In ServletA, the line rd.forward() has the potential to throw a NullPointerException�but not when a valid servlet is found. The getAttribute() output cast to a String in ServletB is quite correct, hence no ClassCastException. ServletNotFoundException does not exist. C is incorrect because there
is output on the web page. E and F are incorrect�E would have been a correct version of the servlet path had the dispatcher used arisen from a getRequestDispatcher() method.


------------------------------
For me the response is C because the ServletB doen't extends HttpServlet.
Do you have any idea?
Hi everybody,

I have a question for you....
In the web.xml how many time the <icon> tag can appears appends to the <web-app>?

I think that [0..1] it's the right answer but every IDE valids my web.xml also if it contains more <icon> tags [0.*].

Do you know about?

Thanks

Mirko