Hi,

I'm tinkering with JBoss by extending the CMB CD example from the
documentation. One idea is to make the individual CD track an fairly
complex object. Say, the most simple track has only two properties - a
title and length. However, it may also have additional properties, for
example, a composer, performer(s) or, in case of a compilation, an
original CD it comes from.

Rather than having a superset of such properties, I went the way of
interfaces. For example, for a track that needs a composer name I'm
using an interface ComposedBy with methods getCompserName(),
setComposerName().

I'm wondering how this type of design afects the remote and home
interfaces, i.e., would this be the way to do it:

public class TrackWithComposerBean implements javax.ejb.EntityBean,
ComposedBy {
....
}

where the remote interface is

public class TrackWithComposer extends javax.ejb.EJBObject {
      public String getTitle() throws RemoteException;
      ......
      public String getComposerName() throws RemoteException;
      ....

}

or should I do this:

public class TrackWithComposer extends javax.ejb.EJBObject implements
ComposedBy {
}

or neither is correct?

Also, can arrays of, say, String be used as properties of CMB? How about
custom objects? It seems not, as I got an error using such an object
(wrapping a couple of string values).

TIA

--

Aaron Stromas          |    "Tick-tick-tick!!!... ja, Pantani is weg..."
mailto:[EMAIL PROTECTED]  |                                BRTN commentator
+1 (301) 493 4933      |                                L'Alpe d'Huez
http://www.izoard.com  |                                1995 Tour de France




_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to