title: Sending an object to a EJB becomes null when being created with CGLIB
body: <p>I am creating a proxy to an object (A SERIALIZABLE object) in the client layer, and send this object to a EJB (Using EJB 3.0 on Weblogic 10.3.4 server). In the EJB, the parameter is null!
  I made sure that the object I am sending is not null in the client, and also that it is serializable (System.out.println(c instanceof Serializable) printed true).
  What could be the problem?</p>
  
  <pre><code>// Creating the proxy
  public Object createProxy(Class targetClass)
  {
      Enhancer enchancer = new Enhancer();
      enchancer.setSuperclass(targetClass);
      enchancer.setInterfaces(new Class[] { Serializable.class })
      enhancer.setCallback(new LazyInterceptor()); // LazyInterceptor implements Serializable
      return enhancer.create(); 
  }
  </code></pre>
  
  <p>Creating the object in the client:</p>
  
  <pre><code>SomeClass c = new SomeClass(); // SomeClass implements Serializable
  getTestService.test(c); // In this call, the parameter in the EJB is **not** null
  c = (SomeClass)createProxy(c.getClass());
  System.out.println(c instanceof Serializable); // This prints out true
  getTestService.test(c); // In this call, the parameter in the EJB is null!
  </code></pre>