[Design of POJO Server] - Re: profile service, farming
by bstansberry@jboss.com
I'm starting to wonder whether it would make more sense to just have a JGroups Channel (actually, a more limited version of HAPartition [1]) available during the bootstrap of a clustered ProfileService. Been looking at FileProfileRepository thinking about how a cluster-aware variant of that could be created. But you quickly run into the DeploymentRepository.load() method which indirectly gets called during the profile service bootstrap. A proper clustered DeploymentRepository would need to reconcile at least some of its state with other cluster members during load(), but there's no Channel available. Getting around that would require hacky API changes all the way to the ProfileService.getProfile(ProfileKey key) method.
I had been thinking the services of the regular HAPartition would be made available to the profile service as part of DeploymentPhase.APPLICATION. But that just looks wrong; a service depending on its client to provide necessary core functionality.
[1] A more limited HAPartition would be a bean that implements an interface w/o ancillary HAPartition stuff like getDistributedState(). The regular HAPartition in deploy/ would probably just have this bean injected into it and delegate to it for its core functions. This way we'd avoid creating an extra Channel.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4154348#4154348
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4154348
16 years
[Design the new POJO MicroContainer] - Re: VFS and directory handling
by alesj
"alesj" wrote :
| For NoCopy handling, I can't see any other way then doing either this
|
| | // hack the JPA url
| | VirtualFile root = di.getRootFile();
| | URL url = root.toURL();
| | String urlString = url.toExternalForm();
| | if (urlString.startsWith("vfs"))
| | {
| | // unpack, since that's the only way
| | // to make sure we point to file
| | VirtualFile file = VFSUtils.unpack(root);
| | url = file.toURL();
| | urlString = url.toExternalForm();
| | if (urlString.startsWith("vfs"))
| | url = new URL(urlString.substring(3));
| | }
| | pi.setPersistenceUnitRootUrl(url);
| |
|
This is probably bad as well - calling VFSUtils.unpack after classpath has been set.
Since pushing something to JPA to do some resources lookup, and that this is NOT part of classloader is surely wrong. :-(
Currently I'm out of ideas ...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4154316#4154316
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4154316
16 years