I am writing a Metadata-Server for a Storage virtualisation using JBoss
4.2.1. There I have a couple of physical disks used to build a virtual
disk. There are EntityBeans for the the virtual disks and the physical
disk. Next there exists a SessionBean to be called by the storage servers
which decides which physical disk is to be used for a spcified area of the
virtual disk. The server asks something like "On which physical Disk schall I
store block 1234 of Virtual Disk 9876?", the Session Bean initializes a
distribution algorithm over the physical disks of the virtual disks and
sends back which physical disk is to be used.
Now my problem: The initialization of the distribution algorithm takes much
time (up to some minutes). The distribution could be reused for every
request to a virtual disk if the instance could survive between calls. So I
want something like a hashtable where I can store for any virtual disk an
initialized instance of the distribution algorithm. Is there any way to do
this in JBoss? Or do you have any other suggestion what I can do?