Carlo Smits

Greenhorn
+ Follow
since Jul 09, 2001
Merit badge: grant badges
For More
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 Carlo Smits

In the Head First EJB book it is said that all system exceptions, except RemoteException, are RuntimeException. However, if I look up IllegalStateException in the J2EE API, it is a subclass of javax.jms.JMSException, which is a subclass of java.lang.Exception. Does this mean that the IllegalStateException in the J2EE API is a different one?
Thanks,
Carlo
Hi, I am getting an AbstractMethodError when trying to get a PreparedStatement from a connection. Does anyone know whats is the cause of this?
Thanks,
Carlo Smits
-----------------exception---------------
[10/28/03 12:04:09:188 CET] 18458e51 ExceptionUtil E CNTR0020E: Non-application exception occurred while processing method "getKop" on bean "BeanId(Porrel1Project#Porrel1ProjectEJB.jar#Porrel1Data, null)". Exception data: java.lang.AbstractMethodError: COM/ibm/db2/jdbc/app/DB2Connection.prepareStatement
at com.ibm.ws.rsadapter.spi.WSStatementCache.reallyPrepareStatement(WSStatementCache.java:360)

------------------------------code-------------------
Connection con = null;
PreparedStatement ps = null;
try
{
con = getConnection();
ps = con.prepareStatement("SELECT * FROM DB2ADMIN.ORDERINHOUD");
}
Can doAfterBody() return EVAL_BODY_BUFFERED ?
The API just speaks of doAfterBody() returning SKIP_BODY or EVAL_BODY_AGAIN.
And if so, what is the implication of the return value EVAL_BODY_BUFFERED? Is it the same as would be with EVAL_BODY_AGAIN?
Thanks,
Carlo
In Manning''s book it is said that if you forward a request to an error page using a RequestDispatcher (which is not recommended), that you have to set some attributes in the request (what the servlet container would otherwise take care of). It also sais that you can get the servlet name from the request by calling req.getServletName(). But I don't understand this, because getServletName() is a method of ServletConfig, not of HttpServletRequest. Is this an error in the book or am I not understanding it? This is the code fragment:
try
{
double newBalance = debit(accountId, amount);
}
catch(InsufficientFundsException isfe)
{
req.setAttribute("javax.servlet.error.exception", isfe);
req.setAttribute("javax.servlet.error.request_uri",
req.getRequestURI());
req.setAttribute("javax.servlet.error.servlet_name",req.getServletName());
RequestDispatcher rd = req.getRequestDispatcher( /servlet/BusinessLogicExceptionHandlerSerlvet");
rd.forward(req, res);
Carlo
Does any one know of an editor that can hide all HTML code in a JSP page to show only the included Java. With lots of mixed Java and HTML code one would have a better overview of the Java code. Thanx
22 years ago
JSP
If I say
System.out.println(Object.class),
I get as output the toString method of the Class class. Is there a hidden field class of type Class in Object? Because in JDK documentation I do not see any field in Object.
We solved the problem here. I had to do with a very large database table that interbally keeps settings of the database. We exported the database to XML, deleted the table, restarted WebSphere with an empty database table and imported the settings from the XML.
22 years ago
I have a question about WebSphere server (3.5.3). Every time we start WebSphere Admin Server a java.exe process starts up and eats up the cpu performance. (it uses about 98% of CPU and takes 88MB internal memory). I have seen this question before but never an answer? Does anybody have experience with this?
22 years ago
About o.s, I think Windows 3.11 and Windows 95 where both time-sliced/cooperative, whereas Solaris and Windows NT are pre-emptive and newer versions of Solaris support both cooperative and preemptive.
I am having problems understanding the difference between
- time-sliced threads versus preemptive threads, on the one hand, and
- native threads versus green threads, on the other hand
1. Is is true that native threads are always preemptive and never time-sliced?
2. Is is true that green threads are never preemptive and always time-sliced?
3. are cooperative/round-robin threads the same as time-sliced threads?
4. Why is it useful to use yield() in time-sliced threads? The whole idea of a time-sliced method is that it interrupts the currently running thread to let other threads run. (therefore you wouldn't need yield() to do this?)
I hope somebody can clear some of these doubts,

------------------
I am trying to use Jaxb to transform xml into Java classes. However, Jaxb doesn't not seem to know how to handle the mutually exclusive operator in xml/dtd (|). Does any one if this gives any problems and how JAxb should make Java of this? Thanks
I took the test yesterday and passed with 91%.
Many thanks to the javaranch. I found a lot of answers by searching in the certification forums. Also, Mughal's book was a great help. I studied for almost two months, did many many mock exam I could find and tried a lot of coding myself. I was hoping to get 100%, but I am happy with 91%. I only started programming in yhe beginning of this year. I found most of the questions not too hard compared to the trial exams I did. There were two questions I was almost certain had not one correct answer, so I just had to guess what the author probably would have meant when he wrote the question. I probably had those wrong.
------------------
22 years ago
But List is an interface, not a class. How could it be the answer to the question?
22 years ago
Hi Manfred, you are right. This has been discussed a lot.
thanks,
carlo