General

General
Why is EJOEs performance getting bad if i use large objects?

As of version 0.3.2 EJOE uses NIO only for connection accept/select operations, so that invoking of (de)serialize adapters can be done directly using blocking io streams. This should be a significantly improvement. Support for partial NIO read/write was also added in version 0.3.2. Even though blocking IO streams perform better in most enviroments, the performance differences aren't so abundantly clear now. If you are using a prior version than 0.32 there is no possibility to avoid these performance issues.

Take a look at this article if you want to know why usage of non-blocking IO can cause some major drawbacks in EJOE.

EJOEs memory consumption isn't acceptable when using large objects!

As of version 0.3.2 this shouldn't happen anymore when using blocking IO. Don't use EJServer.enableNonBlockingIO().

How can i avoid OutOfMemoryExceptions?

Use blocking IO (see above) and/or Increase the value for the max. used memory:

java -mx256m -cp ...

I send and retrieve large text based data, eg. XML structures. What about compression?

Good news: As of version 0.3.2 EJOE offers selective compression. It will be used if compression is enabled in the EJOE server and a client requests compression.

To enable compression on serverside use:

ejserver.enableCompression();
before starting the server.

To request compression on clientside use:

ejclient.enableCompression(true);

Does EJOE support HTTP-Tunneling?

Not at the moment. We are looking for options how to support HTTP-Tunneling in conjunction with java nio. Hints are very welcome...

Serializing/Deserializing

Serializing/Deserializing
My EJOE client application (or server) sends or retrieves objects which don't implement Serializable. Does EJOE support serialization of such objects?

Yes, from version 0.3.3 EJOE uses the XStreamAdapter (de.netseeker.adapter.XStreamAdapter) as default (de)serialization mechanism.

The XStreamAdapter is based on the great XStream library which is known to (de)serialize nearly everything on the (java) planet.

For prior versions you have to enable the XStreamAdapter in EJServer and EJClient manually:

EJServer ejserver = new EJServer(myServerHandler, new XStreamAdapter())
Prior versions use the ObjectStreamAdapter (de.netseeker.adapter.ObjectStreamAdapter) as default SerializeAdapter. The ObjectStreamAdapter uses the default java (De)Serialization mechanism via ObjectInputStream/ObjectOutputStream.

I don't know what SerializeAdapter my clients use. Why doesn't handle the EJOE server the adapters per client request?

This feature was implemented in version 0.3.3.

Prior versions doesn't support selective adapter handling and require the same SerializeAdapter on client- and serverside.

Which adapter is the best option to gain maximum performance?

The fastest adapter is the ObjectStreamAdapter. Be aware that using this adapter has some (possible) drawbacks:

  1. either you use only plain java data types (this gives the maximum performance)
  2. or you have to use the EJClassLoader and must ensure that all used java classes are available on the server

Another fast solution is to use the CastorAdapter with a castor mapping file. Again this solution has drawbacks too:

  1. you have to create a mapping file for all your custom objects as well as special HashMap variants
  2. the mapping file must be available on server and client

I am using the CastorAdapter and get a error message like
The class for the root element 'blah' could not be found

Either you are using the CastorAdapter without a mapping file or the adapter can not locate the mapping file. In general using the CastorAdapter makes sense only when providing a castor mapping file.

Dependencies

Dependencies
Which JDK is required to use EJOE?

1.4 or later.

The dependencies page lists some 3rd party libraries. Which of them are required at runtime?

The following dependencies are required when using the default SerializeAdapter (de.netseeker.adapater.XStreamAdapter):

They can be avoided when using the ObjectStreamAdapter or JavaBeansXmlAdapter.

The following dependencies are required only when using the CastorAdapter:

  • castor-0.9.6-xml.jar
  • commons-logging-1.0.4.jar
  • xerces.x.x.x.jar

Logging

Logging
How can i configure logging?

EJOE uses the standard java logging mechanism (java.util.logging). See http://javaalmanac.com/egs/java.util.logging/pkg.html#Configuration, respectively http://javaalmanac.com/egs/java.util.logging/Props.html for details.

Building from sources

Building from sources
How can i build EJOE from sources with maven?

Download the source archive or checkout from CVS (see the download and cvs links on the left side) and run maven with the following commandline:

maven dist -Djava.util.logging.config.file=maven-logging.properties

Alternative projects

Alternative projects
Are there known alternatives to EJOE or libraries which can be used somehow to achieve the same goal?

Sure there are. We don't know all and the following list is neither a recommendation nor a benchmark and may contain also projects which aren't really related to EJOE.