Help coderanch get a
new server
by contributing to the fundraiser

Danl Thompson

Ranch Hand
+ Follow
since Apr 04, 2001
Merit badge: grant badges
For More
http://www.geocities.com/danl_thompson
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Danl Thompson

Mikal, I think the problem is the static initialization block. Clearly you can define a static final String inside an EJB. Nothing wrong with that. Trying to initialize it at class load time is the problem.
Try the alternative approach of putting final static strings that need initialization in the JNDI env namespace and do a lookup on them. Pretty much anytime you might think of something as a singleton or a static in EJB land it really belongs as a JNDI lookup.
dt
I remember once seeing an example of an HTMLReaderEJB, that is, and EJB that opened a URL connection and got an InputStream and read the content. I think there was even a related question on one of the java certifications (J2EA?) once upon a time.
I need something like that now, as I want to call SOAP services from the EJB tier. But this problem keeps plaguing me, EJBs are forbidden from using the java.io package. (For good reason, they would have to wait on i/o!!!). Hence the question, can an EJB read from an HTML stream, and if so how?
My guess is that, if they once could in an earlier J2EE version, they no longer can. But what are the alternatives?
dt
Thanks, your posting helped a lot. Of course it was obvious once I actually READ the quick start manual, and read through the ANT script. It's kind of nice that JBoss does all this magic for you.
dt
21 years ago
Reading the JBoss Getting Started 3.0 all makes sense, yet the Template project doesn't seem to work. I guess the template project is supposed to run with 3.0, but I'm running 3.2.1, so that's my first question. It shat true?
Next, where in the world does JBoss explain how to deploy an appplication? The getting started doc says to use the Template app and the associated ANT script. Fine. But the next step after building the template app with main, says "Make sure the deployment suceeded without any exceptions." But I can't find what that means anywhere. So any help is appreciated.
Newbie questions. I know. I'm a newbie again I guess.
dt
21 years ago
I have seen this problem. I was generating PDF documents using FOP in WAS and any time the document was over 100kb I got this error. The problem is that WAS is a poor file server. It is well documented, for example, not to use the file servlet in production. I had to write the PDF to a temporary file and serve it up from the HTTP server. I hear there may be improvements in some of the fix packs.
dt
21 years ago
I was confused by an old Microsoft API which simply had a write method, that saved the XML to file.
Here's the right way:
OutputFormat fmt = new OutputFormat();
StringWriter sw = new StringWriter ();
XMLSerializer serial = new XMLSerializer(sw, fmt);
serial.serialize(doc);
System.out.println(stringOut.toString());
This has got to be much simpler than it seems. I have a org.w3c.dom.Document in memory. I want to save it as an XML document to a file. This has to be easy. But I can't find it anywhere.
HELP?
Wait a second. You can debug a J2EE program? Arggg! I've been settling for print statements. Shoot me now.
21 years ago
Struts provides a great MVC implementation. What about a data layer? I just got done reading Fowler's new book, which leads me to think there are several ways to implement business layers and data layers for Struts to use. One project I just finished up had 7 !! separate layers to the data layer alone. Clearly overkill, and JDBC directly from the struts action would have been good enough. What are other people doing for data layers?
21 years ago
Really, just the javadoc comment? That's too obvious! I can't belive it. I was staring right at it. Thanks.
21 years ago
How to I show something to be deprecated? I've got some class A, with some method getIndex(), and I want to declare it to be deprecated. Can't seem to find out how to do it.
21 years ago
Here's a tip - I do a lot of development on other J2EE platforms, noteably IBM WebSphere. The problem I run into constantly is the size of the server, how long it takes to restart, and having enough memory to run a development environment AND the J2EE server. Tomcat solves all that for me. I develop under Tomcat and then port to WebSphere in the last week of the project. Wonderful!
21 years ago
Hi, I've been developing a WebSphere app that was going to use LTPA Tokens from a WebSphere Portal Server in order to pass user Authentication. Now my client has decided to go with WebLogic on the Portal Server to provide secure logon. So what are my options regarding authentication? Any thoughts?
21 years ago
Hey Krysty, did you ever figure this one out? I've got exactly the same problem in WebSphere 4.x. My app runs in TomCat just fine, but dies in WebSphere the the same error you described.
22 years ago
Hey Wendy, how's it going? I'm also having trouble with "violates loader constraints". What J2EE server are you using? Or is it just a java app? What JVM are you using?
Typically this is caused by having multiple different versions of the same jar (xalan, xerces, etc.) in the classpath. So it is finding org.w3c.dom.Node in more than one jar.
Dan'l