Hi Vicente,

> Right now I'm manually copying Bird.java (serializable
> pojo model) to both classpath of QueryServlet's and Client. Any advice on
> how to automate this in Eclipse?
> I'm starting to think I should really learn Ant :D

A simple solution could be to split the project in 3 or more
subproject (like in an Enterprise Project):
- a server-only subproject => generate a war for this
- a client-only subproject => generate a jar for this
- a common project to be visible from the server and from the client
(like the ejb client subproject in EAR) => generate a jar for this

In most IDEs this is simple to do ... and make the same in Ant later.
With Maven you can do this, or you can do a multi module project, but
the setup is a little more complex.


Or more simple, you can do this using different packages in a single
project, but in this case you can't force right classpath ...



Oh, one trick, using the BinarySerializer you can send only 1
(Serializable) Object, or the output will generate error during write
on (optional) elements after the first ... so a general trick on this
could be to send a container object (like a Map) containing only
serializable objects ...
Some time ago i wrote an enhanced version of the BinarySerializer to
avoid these problems, but it's outside the core project at the moment.

Tell me what do you think.


Bye,
Sandro

Reply via email to