[jboss-cvs] JBossAS SVN: r73069 - trunk/server/src/main/org/jboss/deployment.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue May 6 00:17:18 EDT 2008


Author: scott.stark at jboss.org
Date: 2008-05-06 00:17:18 -0400 (Tue, 06 May 2008)
New Revision: 73069

Modified:
   trunk/server/src/main/org/jboss/deployment/MappedReferenceMetaDataResolverDeployer.java
Log:
Map the home, remote, local-home and local interfaces as well

Modified: trunk/server/src/main/org/jboss/deployment/MappedReferenceMetaDataResolverDeployer.java
===================================================================
--- trunk/server/src/main/org/jboss/deployment/MappedReferenceMetaDataResolverDeployer.java	2008-05-06 03:33:46 UTC (rev 73068)
+++ trunk/server/src/main/org/jboss/deployment/MappedReferenceMetaDataResolverDeployer.java	2008-05-06 04:17:18 UTC (rev 73069)
@@ -358,6 +358,127 @@
                cdmd.addJndiName(sbean.determineJndiName());
                cdmd.addJndiName(sbean.determineLocalJndiName());
                String ejbName = sbean.getEjbName();
+               // home
+               if(sbean.getHome() != null && sbean.getHome().length() > 0)
+               {
+                  // Add ejb/vfsPath at iface
+                  String home = sbean.getHome();
+                  String ifacePath = prefix + "@" + home;
+                  if(endpointAlternateMap.containsKey(ifacePath))
+                     log.debug(ejbName+" duplicates home: "+home+", existing: "+endpointAlternateMap.get(ifacePath));
+                  else
+                  {
+                     endpointAlternateMap.put(ifacePath, ejbCompID);
+                     mappings.add(ifacePath);
+                     if(trace)
+                        log.trace("mapEjbs, local-home: "+ifacePath+", ejbName: "+ejbName);
+                  }
+                  // Add ejb/iface
+                  ifacePath = "ejb@" + home;
+                  if(endpointMap.containsKey(ifacePath))
+                  {
+                     // TODO: may need to track the duplicates to create an error
+                     log.debug(ejbName+" duplicates home: "+home+", existing: "+endpointMap.get(ifacePath));
+                  }
+                  else
+                  {
+                     endpointAlternateMap.put(ifacePath, ejbCompID);
+                     mappings.add(ifacePath);
+                     if(trace)
+                        log.trace("mapEjbs, home: "+ifacePath+", ejbName: "+ejbName);
+                  }
+               }
+               // remote
+               if(sbean.getRemote() != null && sbean.getRemote().length() > 0)
+               {
+                  // Add ejb/vfsPath at iface
+                  String remote = sbean.getRemote();
+                  String ifacePath = prefix + "@" + remote;
+                  if(endpointAlternateMap.containsKey(ifacePath))
+                     log.debug(ejbName+" duplicates remote: "+remote+", existing: "+endpointAlternateMap.get(ifacePath));
+                  else
+                  {
+                     endpointAlternateMap.put(ifacePath, ejbCompID);
+                     mappings.add(ifacePath);
+                     if(trace)
+                        log.trace("mapEjbs, remote: "+ifacePath+", ejbName: "+ejbName);
+                  }
+                  // Add ejb/iface
+                  ifacePath = "ejb@" + remote;
+                  if(endpointMap.containsKey(ifacePath))
+                  {
+                     // TODO: may need to track the duplicates to create an error
+                     log.debug(ejbName+" duplicates remote: "+remote+", existing: "+endpointMap.get(ifacePath));
+                  }
+                  else
+                  {
+                     endpointAlternateMap.put(ifacePath, ejbCompID);
+                     mappings.add(ifacePath);
+                     if(trace)
+                        log.trace("mapEjbs, local: "+ifacePath+", ejbName: "+ejbName);
+                  }
+               }
+               // local-home
+               if(sbean.getLocalHome() != null && sbean.getLocalHome().length() > 0)
+               {
+                  // Add ejb/vfsPath at iface
+                  String local = sbean.getLocalHome();
+                  String ifacePath = prefix + "@" + local;
+                  if(endpointAlternateMap.containsKey(ifacePath))
+                     log.debug(ejbName+" duplicates local-home: "+local+", existing: "+endpointAlternateMap.get(ifacePath));
+                  else
+                  {
+                     endpointAlternateMap.put(ifacePath, ejbCompID);
+                     mappings.add(ifacePath);
+                     if(trace)
+                        log.trace("mapEjbs, local-home: "+ifacePath+", ejbName: "+ejbName);
+                  }
+                  // Add ejb/iface
+                  ifacePath = "ejb@" + local;
+                  if(endpointMap.containsKey(ifacePath))
+                  {
+                     // TODO: may need to track the duplicates to create an error
+                     log.debug(ejbName+" duplicates local-home: "+local+", existing: "+endpointMap.get(ifacePath));
+                  }
+                  else
+                  {
+                     endpointAlternateMap.put(ifacePath, ejbCompID);
+                     mappings.add(ifacePath);
+                     if(trace)
+                        log.trace("mapEjbs, local-home: "+ifacePath+", ejbName: "+ejbName);
+                  }
+               }
+               // local
+               if(sbean.getLocal() != null && sbean.getLocal().length() > 0)
+               {
+                  // Add ejb/vfsPath at iface
+                  String local = sbean.getLocal();
+                  String ifacePath = prefix + "@" + local;
+                  if(endpointAlternateMap.containsKey(ifacePath))
+                     log.debug(ejbName+" duplicates local: "+local+", existing: "+endpointAlternateMap.get(ifacePath));
+                  else
+                  {
+                     endpointAlternateMap.put(ifacePath, ejbCompID);
+                     mappings.add(ifacePath);
+                     if(trace)
+                        log.trace("mapEjbs, local: "+ifacePath+", ejbName: "+ejbName);
+                  }
+                  // Add ejb/iface
+                  ifacePath = "ejb@" + local;
+                  if(endpointMap.containsKey(ifacePath))
+                  {
+                     // TODO: may need to track the duplicates to create an error
+                     log.debug(ejbName+" duplicates local: "+local+", existing: "+endpointMap.get(ifacePath));
+                  }
+                  else
+                  {
+                     endpointAlternateMap.put(ifacePath, ejbCompID);
+                     mappings.add(ifacePath);
+                     if(trace)
+                        log.trace("mapEjbs, local: "+ifacePath+", ejbName: "+ejbName);
+                  }
+               }
+
                BusinessLocalsMetaData locals = sbean.getBusinessLocals();
                if(locals != null)
                {




More information about the jboss-cvs-commits mailing list