User: vancek
Date: 06/04/11 08:56:05
Modified: andromda-ejb3/src/main/resources/templates/ejb3/crud
ManageableServiceLocator.vsl
Log:
used service name in jndi name variable rather than fully qualified service name
added method to get the local interface
Revision Changes Path
1.3 +22 -4 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/crud/ManageableServiceLocator.vsl
Index: ManageableServiceLocator.vsl
===================================================================
RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/crud/ManageableServiceLocator.vsl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -r1.2 -r1.3
--- ManageableServiceLocator.vsl 14 Mar 2006 06:08:36 -0000 1.2
+++ ManageableServiceLocator.vsl 11 Apr 2006 15:56:04 -0000 1.3
@@ -107,20 +107,20 @@
public final $manageable.fullyQualifiedManageableServiceName get${manageable.manageableServiceName}()
throws javax.naming.NamingException
{
- return this.get${manageable.manageableServiceName}(null);
+ return this.get${manageable.manageableServiceName}Remote(null);
}
/**
- * Gets an instance of {@link $manageable.fullyQualifiedManageableServiceName}.
+ * Get the remote interface for {@link $manageable.fullyQualifiedManageableServiceName}.
*
* @param env the Context environment properties. Null represents no properties.
* @throws javax.naming.NamingException failure to lookup remote manageable service interface.
*/
- public final $manageable.fullyQualifiedManageableServiceName get${manageable.manageableServiceName}(java.util.Properties env)
+ public final $manageable.fullyQualifiedManageableServiceName get${manageable.manageableServiceName}Remote(java.util.Properties env)
throws javax.naming.NamingException
{
#**##if ($stringUtils.isNotBlank($manageable.jndiNamePrefix))
-#* *##set ($jndiName = "${manageable.jndiNamePrefix}/${manageable.fullyQualifiedManageableServiceName}/remote")
+#* *##set ($jndiName = "${manageable.jndiNamePrefix}/${manageable.manageableServiceName}/remote")
#**##else
#* *##set ($jndiName = "${manageable.manageableServiceName}/remote")
#**##end
@@ -128,7 +128,25 @@
getContext(env).lookup("${jndiName}");
}
+ /**
+ * Get the local interface for {@link $manageable.fullyQualifiedManageableServiceName}.
+ *
+ * @param env the Context environment properties. Null represents no properties.
+ * @throws javax.naming.NamingException failure to lookup remote manageable service interface.
+ */
+ public final $manageable.fullyQualifiedManageableServiceName get${manageable.manageableServiceName}Local(java.util.Properties env)
+ throws javax.naming.NamingException
+ {
+#**##if ($stringUtils.isNotBlank($manageable.jndiNamePrefix))
+#* *##set ($jndiName = "${manageable.jndiNamePrefix}/${manageable.manageableServiceName}/local")
+#**##else
+#* *##set ($jndiName = "${manageable.manageableServiceName}/local")
+#**##end
+ return ($manageable.fullyQualifiedManageableServiceName)
+ getContext(env).lookup("${jndiName}");
+ }
#end
+
/**
* Gets an instance of the given service.
*
|