Spring questions

vitopn 
Joined: 2008-09-13
Posts: 15
User is offline
Spring questions

Just curious about how Appistry and Spring work together.

I currently have two question:

Spring remoting: What form of serialization is used. Is there anything that we should be aware of?

Singletons: I assume that the spring context is loaded upon worker startup. So that there is one context for each work and any singleton is only a singleton for that worker. Is this correct?

-Vito

randyh  Appistry employee
Joined: 2008-09-25
Posts: 5
User is offline

Hi Vito,

We currently use Java's built-in serialization (ObjectOutputStream) to serialize objects to byte arrays. This means your objects will need to implement the Serializable interface. Please let us know if this is an issue for you.

You are correct about the way Spring singletons work. There will be one ApplicationContext per worker so you will get one singleton instance of your bean per worker. If you need to store objects that will be shared across all the workers you can use the FAM.

Thanks,
Randy

guerry  Appistry employee
Joined: 2007-12-21
Posts: 95
User is offline

randyh wrote:
There will be one ApplicationContext per worker so you will get one singleton instance of your bean per worker.

Just to be totally clear, there is one JVM per deployed Java fabric application, and therefore one ApplicationContext per deployed Java fabric application.

Thanks,

Guerry