Alton Hernandez

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

Recent posts by Alton Hernandez

Originally posted by Jignesh Patel:
Use open source framework like log4j. Put debug statement and see where it goes.



Loggers(like log4j) or debuggers doesn't help much in this case as the error happens when the client calls the remote object, unless there is a way to actually debug the call.
18 years ago
Hi,

Our middleware projects runs on BEA Weblogic. From time to time we would get CORBA Marshal Exception. The problem is when we get this error there is almost nothing in the error message that would give us a hint on what's causing it.

So what is the best way of debugging this kind of error? Are there any debugging tools out there that can at least identify what part of the object that we are passing is causing the error?

tks.
18 years ago

Originally posted by Keith Lynn:
mx is just a reference. A reference to the actual object is returned, but the local variable, mx, is destroyed.



Objects are the one that are destroyed, not the variables.
I have an ejb which calls a helper class. I want this helper class to start a thread i.e. I want two instances of this helper to run in parallel. How do I do this?

Thanks.
19 years ago
I have an insert statement that is prepared with Auto-generated keys set:

conn.prepareStatement(Stmt,Statement.RETURN_GENERATED_KEYS);

However, I noticed that if this statement encounters an SQLException, for example a duplicate key, it throws a NullPointer exception instead. Can someone explain why is this?

Thanks.
19 years ago
I have a stateless Session Bean that needs to call another java class. I am currently thinking if I should implement this other java class as a normal java class or as an EJB. So I wondering what are the advantages and disadvatages asuming if this java class will always be local (i.e. never remotely called)

Thanks

Originally posted by ritwik roy:
plz look at the code
int a=10/0;
if i want to perform it then there will be a run time error. it is fine.
but in
double a=10/0.0 there will not be any run time error and the answer will be infinity. why?
please look at another problem

int x=012;
if ( x==10) { System.out.println("if part"); }
else{System.out.println("else part");}
it is printing "if part" why?




A java.lang.ArithmeticException will be thrown if there is an integer division by zero. However,

- a positive float/double division by zero will result in
a POSITIVE_INFINITY

- a negative float/double division by zero will result in
a NEGATIVE_INFINITY

In you example, 10 will be promoted to float so the result is infinity.

Hope this helps...

Originally posted by Darya Akbari:
Hi,

I wonder how I can test all HTTP message types. I am able to test with GET and POST but how can I test the remaining message types

Look the list below, maybe anyone can give a hint and update the list on how to best test these HTTP messages:

  • GET - that is the browser's default
  • POST - created by the browser when HTML contains s.th. like <form method="post" action="SelectBeer.do">
  • HEAD - you say
  • TRACE - you say
  • PUT - you say
  • DELETE - you say
  • OPTIONS - you say
  • CONNECT - you say


  • Regards,
    Darya



    Just do it manually.

    Telnet to your http server e.g.

    telnet 127.0.0.1 80

    then issue the http commands e.g.

    GET / HTTP/1.1 <cr-lf>

    Refer to tne HTTP rfc for details....

    Originally posted by kapil munjal:
    API specs give you the correct way of doing things.



    The API specs only tells you what you should do. However,it does not give any explanation on why you should do it this way. That is why I asked what is the implication if you get the printwriter first before you set the content type. If it does not give out any error then what is the problem. Could it be that the behaviour is non-deterministic?

    Originally posted by Sumit Sadana:


    It would use the default content type which is "text/html."

    Cheers!~
    Sumit


    Hi,

    It does not look like that way. When I modified the program to set the response to "application/jar", the browser treated the output as a download, which is what is expected for that content type:

    It is mentioned in the API doc that

    "If obtaining a PrintWriter, this method should be called first."

    I have a code which does otherwise but doing just fine. What is the implication if the getPrintWriter() is called first before setContentType()?

    Hi,

    Is there a limit on the no. of searched items that can be displayed by the search facility? It looks like it is only limited to 200 entries. How can I changed this limit?

    I am trying to search for topics where I made some postings particularly those that I made recently. Unfortunately, there are a lot I made in the past that those alone it is able to reach the limit. So now I cannot display the recent ones.
    19 years ago
    Hi,

    Could someone elaborate further these 2 specifications:

    (I)

    SRV.11.1

    2. The container will recursively try to match the longest path-prefix. This is done by stepping down the path tree a directory at a time, using the / character as a path separator. The longest match determines the servlet selected.


    Question:

    Supposing your mapping is as follows:
    <servlet-name>servlet3</servlet-name>
    <url-pattern>/catalog</url-pattern>

    And your URL is /catalog/index.html

    Does recursively means the following:

    1. Try to match /catalog/index.html. Not found!
    2. Step down the path tree which will give you /catalog. Try to match - Found!

    II

    SRV.11.2

    A string beginning with a / character and ending with a /* suffix is used for path mapping.


    Question:
    Suppose you have a mapping of /foo/bar/*, is the string used for path mapping only includes those characters inside the / and /*, i.e. only foo/bar is used in this example?

    Thanks.

    Originally posted by Parameswaran Thangavel:
    hi

    i heard that the subclass can access the private field of the superclass
    provided the both classes are members of the same class

    what it means i didn't understand

    can any one explain me?




    I think you mean to say "provided that the subclass is a member of the superclass".