FAQ - Frequently Asked Questions

General

  1. In 0.4.0 EJServer#enableRemoteClassLoading(true) throws an exeption!
  2. Why is EJOEs performance getting bad if i use large objects?
  3. EJOEs memory consumption isn't acceptable when using large objects!
  4. How can i avoid OutOfMemoryExceptions?
  5. I send and retrieve large text based data, eg. XML structures. What about compression?
  6. Does EJOE support HTTP-Tunneling?
Serializing/Deserializing
  1. My EJOE client application (or server) sends or retrieves objects which don't implement Serializable. Does EJOE support serialization of such objects?
  2. I don't know what SerializeAdapter my clients use. Why doesn't handle the EJOE server the adapters per client request?
  3. Which adapter is the best option to gain maximum performance?
  4. I am using the CastorAdapter and get a error message like "The class for the root element 'blah' could not be found"
  5. I am using the JavolutionAdapter and get a error message like "Classdef not found javolution.xml.XmlFormat"
  6. Why do remote reflection calls fail with HessianAdapter when using the java types byte, short and float as request?
  7. I am using the SojoAdapter. Why do remote reflection calls fail when using the java type byte[] as request?
  8. I am using the BetwixtAdapter but my Beans (or the directly transmitted java types) do not get deserialized in EJServer?
  9. Is it possible to exchange ByteBuffer objects in direct manner witout using a SerializeAdapter?
  10. I am trying to use an SerializeAdapter which does require additonal settings. How can i indicate the server to use that adapter?
Security
  1. Does EJOE support encryption of network traffic?
Dependencies
  1. Which JDK is required to use EJOE?
  2. The dependencies page lists some 3rd party libraries. Which of them are required at runtime?
Logging
  1. How can i configure logging?
Building from sources
  1. How can i build EJOE from sources with maven?
Alternative projects
  1. Are there known alternatives to EJOE or libraries which can be used somehow to achieve the same goal?
Documentation
  1. Why does the english documentation has such a, hm, teutonic flavor?
  2. Why does the german documentation contain much more information?

General

In 0.4.0 EJServer#enableRemoteClassLoading(true) throws an exeption!

Yes, this is an annoying bug in EJOE 0.4.0. It will be fixed in the next minor version. Please use the workaround explained in the Tracker [1733079].

[top]

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

Versions from 0.3.2 to 0.3.4 use NIO only for connection accept/select operations by default, so that invoking of (de)serialize adapters can be done directly using blocking io streams. This can be a significantly improvement over non blocking IO. Support for partial NIO read/write was also added in version 0.3.2. Even though blocking I/O streams perform better in some enviroments with large objects, the performance differences aren't so abundantly clear now. If you are using a prior version than 0.3.2 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 I/O can cause some major drawbacks in EJOE.

With 0.3.4 EJOE restarted using non-blocking I/O by default because in most scenarios non-blocking I/O does outperform the blocking mode. Usage of blocking mode can be helpful only if your are exchanging *really* large objects. To disable non blocking mode anyway use EJServer#enableNonBlockingIO(false).

[top]

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

See above to get an idea why that happens. As of version 0.3.2 this shouldn't happen anymore when using blocking IO. Don't use EJServer.enableNonBlockingIO(true). For version =0.3.4 you can use EJServer#enableNonBlockingIO(false) to try blocking mode.

[top]

How can i avoid OutOfMemoryExceptions?

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

java -mx256m -cp ...

[top]

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);

[top]

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...

This feature is scheduled for version 0.4.0

[top]

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.

[top]

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.

[top]

Which adapter is the best option to gain maximum performance?

One of the fastest adapters 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 deploy your java classes on both: server and client(s)
  3. or you have to use the EJClassLoader and must ensure that all used java classes are available on the server

Another efficient solution is to use the JavolutionAdapter with custom XML Formats. Again this solution has drawbacks too:

  1. you have to create XML Formats
  2. those XML Formats must be available on server and client (well you could use EJClassloader to avoid that)

[top]

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 or your mapping is incomplete. In general using the CastorAdapter makes sense only when providing a castor mapping file.

[top]

I am using the JavolutionAdapter and get a error message like "Classdef not found javolution.xml.XmlFormat"

You are using javolution 4.0. EJOE does not support javolution = 4.0 yet, because they decided to break backward compatibility within their XML-marshalling/unmarshalling API.

[top]

Why do remote reflection calls fail with HessianAdapter when using the java types byte, short and float as request?

Unfortunately it is just simple: You can not use these types with EJOEs RemoteReflection and Hessian. Hessian maps these types to other java types during serialization/deserialization so that the argument types within a reflection call will not match. Please see the Hessian/Burlap Java Binding Draft Spec for details.

[top]

I am using the SojoAdapter. Why do remote reflection calls fail when using the java type byte[] as request?

Unfortunately it is just simple: You can not use byte[] with EJOEs RemoteReflection and SoJo. SoJo maps byte[] to java.util.ArrayList during serialization/deserialization so that the argument type within a reflection call will not match.

[top]

I am using the BetwixtAdapter but my Beans (or the directly transmitted java types) do not get deserialized in EJServer?

For beans you will need a so called "dotBetwixtFile" (.betwixt). Please take a look into the betwixt documentation.

[top]

Is it possible to exchange ByteBuffer objects in direct manner witout using a SerializeAdapter?

Versions prior to 0.4.0 don't support that feature. It was scheduled for 0.4.0 and is already implemented in the current version in CVS. Use EJClient#setAdapterStrategy( EJConstants.ADAPTER_STRATEGY_DIRECT ) to tell the client to use ByteBuffers in direct manner. Then you can invok EJClient#execute() with a ByteBuffer and it will return a ByteBuffer. Note: Your ServerHandler has to return a ByteBuffer to EJOE otherwise a ClassCastExeption will be thrown.

[top]

I am trying to use an SerializeAdapter which does require additonal settings. How can i indicate the server to use that adapter?

Use the AdapterFactory to register the adapter.

[top]

Security

Does EJOE support encryption of network traffic?

Not at the moment, but support for symetric key encryption using stream ciphers is scheduled for 0.5.0. At the meantime you can use netseekers HC128Adapter to protect your network traffic.

[top]

Dependencies

Which JDK is required to use EJOE?

1.4 or later.

[top]

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.adapter.XStreamAdapter):

They can be avoided when using the ObjectStreamAdapter or JavaBeansXmlAdapter.

The following dependencies are required only when using the CastorAdapter:

  • castor-1.1-xml.jar
  • commons-logging-1.0.4.jar
  • xercesImpl-2.8.1.jar

The following dependencies are required only when using the BetwixtAdapter:

  • commons-betwixt-0.8.jar
  • commons-digester-1.7.jar
  • commons-beanutils.jar
  • xercesImpl-2.8.1.jar

The following dependencies are required only when using the JavolutionAdapter:

  • javolution.jar

[top]

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.

[top]

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

[top]

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.

[top]

Documentation

Why does the english documentation has such a, hm, teutonic flavor?

Hehe, because we are poor german developers and we speak german here. English is not our first language, hence our english documentation is more or less readable but far from perfect. Well, to be honest it is more than far from perfect. Please, please help us with really good translations of our german documentation!

[top]

Why does the german documentation contain much more information?

Please see above. Once again: Please, please help us with really good translations of our german documentation!

A translation of our german entry guide would solve a lot of documentation issues...

[top]