This is not really the right forum for this, but I
have been playing with Weblogic's custom RMI libraries
in my EJB app and coming up with some very odd results.
For some reason sending XML data encapsulated in a RMI
object over HTTP is faster than sending raw XML over
straight HTTP.
This really doesn't make sense to me since using RMI
(even an optimized version) should generate some
additional overhead to the communication vs a raw
URLConnection.
Since I'm doing XML->DOM translations in both cases,
that's not the issue..it really seems to be communication
related.
RMI code
xml = obj.getDirList(name);
parseXmlFileList(xml, 0, this);
non-RMI code
URLConnection urlc = httpServletUrl.openConnection();
urlc.setDoOutput(true);
urlc.setDoInput(true);
PrintWriter pw = new PrintWriter(
new OutputStreamWriter(
urlc.getOutputStream()), true);
pw.println(name);
BufferedReader r = new BufferedReader(
new InputStreamReader(urlc.getInputStream()));
StringBuffer sb = new StringBuffer();
while (true) {
String s = r.readLine();
if (s == null || s.equals("\n") || s.equals(""))
break;
sb.append(s);
sb.append("\n");
}
xml = sb.toString();
parseXmlFileList(xml, 0, this);
Any opinions on this? I'm at a loss on this one.
-David
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".