[Design of JCA on JBoss] - Proposal of new JCAMetaDataRepository (use JBoss-MDR project
by jeff.zhang
public interface JCAMetaDataRepository
{
MutableMetaDataRepository getMetaDataRepository();
public void addConnectorMetaData(String name, ConnectorMetaData cmd);
public ConnectorMetaData getConnectorMetaData(String name);
public void removeConnectorMetaData(String name);
public void addManagedConnectionFactoryDeploymentGroup(String name, ManagedConnectionFactoryDeploymentGroup group);
public ManagedConnectionFactoryDeploymentGroup getManagedConnectionFactoryDeploymentGroup(String name);
public void removeManagedConnectionFactoryDeploymentGroup(String name);
public int getConnectorMetaDataCount();
public int getManagedConnectionFactoryCount();
}
1. add getMetaDataRepository(), basic idea is use JBoss-mdr project instead of old ConcurrentHashMap.
2. remove AdminObject and ActivationSpec add/get method since no other code use them
3. remove FormatterClassName method, since it is just about formatter, maybe format by other class.
4. remove JCAConnectorMetaDataEntry/Key and JCADeploymentMetaDataEntry class since we use mdr project.
5. will add ScopeInfo. (still thinking)
Any suggestion?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4211348#4211348
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4211348
17 years, 1 month
[Design of POJO Server] - Re: Regression on VirtualFile.toURL()
by wolfc
"jason.greene(a)jboss.com" wrote : Any reason to use it over the first construct? It should be more reliable. Does the above regression occur with it as well?
The first construct doesn't work if the deployment unit base is the VFS root. Then there is no parent.
I could do the following to eliminate the no parent problem:
-URL url = di.getFile("").toURL();
| -return new URL(url, jar);
| +VirtualFile deploymentUnitFile = di.getFile("");
| +VirtualFile parent = deploymentUnitFile.getParent();
| +VirtualFile baseDir = (parent != null ? parent : deploymentUnitFile);
| +VirtualFile jarFile = baseDir.getChild(jar);
| +if(jarFile == null)
| + throw new RuntimeException("could not find child '" + jar + "' on '" + baseDir + "'");
| +return jarFile.toURL();
But depending on how you read the specification it could be interpreted as a violation. Because jar files are no longer relative to the physical location, if the VFS is rooted at the deployment unit.
If the formal definition of 'a directory containing an exploded jar' is: a directory with the same name as the jar in question containing the extracted contents of said jar (which is how we define it). Then you've eliminated the output directory use case because you must root at the parent of the '.jar' directory and you're good to go.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4211346#4211346
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4211346
17 years, 1 month