I don't know...
we should not implement this interface; rather, implement
either javax.ejb.EntityBean or javax.ejb.SessionBean,
which both extend this interface.
public interface javax.ejb.EnterpriseBean
extends java.io.Serializable
{
}
why? Extend Serializable?
-
why? EnterpriseBean extend Serializable... (4 messages)
- Posted by: shin hyun-jung
- Posted on: June 03 2001 06:30 EDT
Threaded Messages (4)
- why? EnterpriseBean extend Serializable... by Manjunath Reddy on June 03 2001 19:22 EDT
- why? EnterpriseBean extend Serializable... by Omar Abu-jiab on June 07 2001 03:07 EDT
- why? EnterpriseBean extend Serializable... by Aditya Anand on June 22 2001 16:58 EDT
- why? EnterpriseBean extend Serializable... by Tony Brookes on June 24 2001 05:50 EDT
- why? EnterpriseBean extend Serializable... by Aditya Anand on June 22 2001 16:58 EDT
-
why? EnterpriseBean extend Serializable...[ Go to top ]
- Posted by: Manjunath Reddy
- Posted on: June 03 2001 19:22 EDT
- in response to shin hyun-jung
Why is an EnterpriseBean and hence an EntityBean serializable?
To...
1. Be extensible to support simple persistence of objects.
2. Have a simple yet extensible mechanism.
3. Maintain the Java object type and safety properties in the serialized form.
4. Be extensible to support marshaling and unmarshaling as needed for remote objects.
But its upto the container to decide when to serialize a particular entity or reconstruct it. The bottom line is better usage of memory in case of heavy duty bean access scenario.
Any comments? -
why? EnterpriseBean extend Serializable...[ Go to top ]
- Posted by: Omar Abu-jiab
- Posted on: June 07 2001 03:07 EDT
- in response to shin hyun-jung
the main thing here is to support the Activation and passivation and since this is not controlled by the developer,rather by the contianer it sely ot should always implemt this inteface .
1- pasivation is when you persisit your bean from the temporery cash to hard media ,passivation is the oppesite opration,so it is clear that when an object should be store into the disk it must implement this interface . -
why? EnterpriseBean extend Serializable...[ Go to top ]
- Posted by: Aditya Anand
- Posted on: June 22 2001 16:58 EDT
- in response to Omar Abu-jiab
hey look at the statement... it's extends Serializable.... not implements Serializable!!!.... i don't thing the compiler lets us do that... i don't get it! -
why? EnterpriseBean extend Serializable...[ Go to top ]
- Posted by: Tony Brookes
- Posted on: June 24 2001 17:50 EDT
- in response to Aditya Anand
You can extend an interface if you are also an interface. In fact you can extend many interfaces, since Java supports multiple interface inheritence. Hence the following is valid.
public interface Bar {
void doBar() throws BarException;
}
public interface Foo extends Bar, Serializable {
void doFoo() throws FooException;
}
public class Blah implements Foo {
public void doBar() throws BarException {};
public void doFoo() throws FooException {};
}
That make it clearer?
Chz
Tony