Greg Whelan

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

Recent posts by Greg Whelan

Do you see the stack trace of the InvocationTargetException in your Hibernate log? That likely contains some relevant information.
Perhaps you should clarify what it is about EJB that you think violates OOAD?
Certainly the component model that EJB uses enforces some limits on the design choices that are typically available in writing a normal Java class, is this what you're referring to?
When I first looked at EJB I asked the same question. And reading Monson-Haefel's book was not especially conducive towards quickly understanding WTF EJBs are about.
From my perspective it's all about transactions. No transactions, no EJB. EJB makes it easier to build a transactional application.
The distributed, scalable, secure, reliable, etc. qualities are all likely to be needed in a transactional application... so you EJB containers give you those too.
The most concise explanation of why EJB is useful is on page 35 of Ed Roman's "Enterprise Java Beans" where he shows pseudocode for an explicit middleware application, versus the implicit middleware approach used by EJBs (his book is a better intro than the O'Reilly book, in my opinion, although I keep both handy).
It'll be interesting to hear from others who have a different perspective on EJBs...
It turns out there's an article published on the O'Reilly Network that discusses using Sun's JAX-RPC, which appears to achieve precisely the RMI/SOAP transparency I'm looking for...

http://www.onjava.com/pub/a/onjava/2002/04/24/jax-rpc.html
22 years ago
"Proxy pattern" is a much better way to describe one aspect of what I'd like to see. Thanks for the references Kyle, I'll have to check them out.
In addition to the proxy approach, do they also generate stubs which implement a remote interface?
The code annotation approach is interesting... I'm still trying to erase my RMI-like expectations to decide which approach I prefer (remote interface driven, or class-annotated driven).
22 years ago
I've been looking at samples from Apache SOAP (2.2) and I've been surprised that the API does not attempt to mimic the RMI interface.
I'd like to be able to take a piece of code that uses RMI and allow the remote call to be replaced with a SOAP implementation. If the SOAP client code implemented MyRmiInterface, this would be possible. But from my initial look at Apache SOAP it appears that I'd need to create the adapter myself (for example, so that any SOAP exception is translated into a java.rmi.RemoteException).
While this is not a lot of effort, and I could automate it, I'm just surprised that this is not the default interface used by Apache SOAP for Java.
Anyone know why this is the case? Do any other SOAP for Java implementations utilize RMI-like interfaces?
22 years ago
I switched from using Tomcat to Orion for JSP/Servlet development just because of Orion's ability to automatically (and quickly) redeploy an updated war.
22 years ago
Depending upon the type of graphs you're trying to generate you might find MonkeyBoyGraph useful:
http://monkeygraph.sourceforge.net/
Regarding books, I found Brett McLaughlin's "Java & XML" (O'Reilly) book to be a fantastic intro.
23 years ago
JSP
Out of curiousity, do you know if there is a predominant implementation approach? Sending by stream or BLOB?
23 years ago
Certainly I could, however the same argument could be made for useBean in JSPs... but it's a handy concise construct for mapping from an HTML form to Java bean. Changes to the Java bean do not require corresponding servlet changes (specifically: adding new properties). And I'm hoping to have those same benefits in a servlet.
I'll note that I found it interesting that Tomcat implements useBean using reflection at servlet execution time (thus my ability to utilize JspRuntimeLibrary), but Orion performs reflection of the bean at JSP translation time (thus producing a servlet with code similar to the type you suggest).
23 years ago
Is there a more elegant way to instantiate a bean from a servlet than the approach I'm using below:

That piece of servlet code is intended to have the same behavior as the useBean action:

I'm trying to reuse an existing bean instantiation mechanism, but the only one I can find is from the Tomcat runtime (the JspRuntimeLibrary is a class i n jasper-runtime.jar).
The above works, but I'd prefer to not have to package jasper-runtime.jar with my application (nothing against jasper).
[ April 19, 2002: Message edited by: Greg Whelan ]
23 years ago
After passing the SCJP I'm offloading this monstrous book that I used to prepare. Very little wear:
http://cgi.ebay.com/aw-cgi/eBayISAPI.dll?ViewItem&item=447199985
(starting bid is $5, shipping is US-only $3).
24 years ago
Yeah, with the responsiveness of their server (at least when I tried it), that would not be a whole lot of fun
And then there's the first time I ran through the simulator -- it crashed (I got a screen with a Java stack trace) when I was 2 questions away from finishing!
I have found the book "Programming Interviews Exposed" to have some excellent practical advice. The authors have done *many* interviews and they distill their wisdom into tips that allow one to prepare for interviews. It's worth a look (even if you only read the first 2 chapters in a book store).
24 years ago

then what's difference between interface and object?


That sounds like a misunderstanding of the question. When option d says "user interface" it refers to a GUI, not an interface in the object-oriented sense.
I would agree with Michal that A, B and D appear correct.
How were you able to obtain IBM's answers to the question? When I ran through the preassessment test it only gave overall results at the end (not feedback on individual questions).