User: user57
Date: 01/07/09 21:40:29
Modified: src/main/org/jboss/ejb/plugins/jrmp/interfaces
BeanProxy.java
Log:
o reformat to 3 spaces
Revision Changes Path
1.3 +94 -94
jboss/src/main/org/jboss/ejb/plugins/jrmp/interfaces/BeanProxy.java
Index: BeanProxy.java
===================================================================
RCS file:
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/jrmp/interfaces/BeanProxy.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- BeanProxy.java 2001/06/18 20:01:24 1.2
+++ BeanProxy.java 2001/07/10 04:40:28 1.3
@@ -19,119 +19,119 @@
* An abstract base proxy class from which all bean proxys extend from.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Jason Dillon</a>
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
*/
public abstract class BeanProxy
extends GenericProxy
{
- // Constants -----------------------------------------------------
+ // Constants -----------------------------------------------------
- /** Serial Version Identifier. */
- private static final long serialVersionUID = -4177999312297604904L;
+ /** Serial Version Identifier. */
+ private static final long serialVersionUID = -4177999312297604904L;
- // Attributes ----------------------------------------------------
+ // Attributes ----------------------------------------------------
- // Static --------------------------------------------------------
+ // Static --------------------------------------------------------
- /** {@link EJBObject#getPrimaryKey} method reference. */
- protected static final Method GET_PRIMARY_KEY;
+ /** {@link EJBObject#getPrimaryKey} method reference. */
+ protected static final Method GET_PRIMARY_KEY;
- /** {@link EJBObject#getHandle} method reference. */
- protected static final Method GET_HANDLE;
+ /** {@link EJBObject#getHandle} method reference. */
+ protected static final Method GET_HANDLE;
- /** {@link EJBObject#getEJBHome} method reference. */
- protected static final Method GET_EJB_HOME;
+ /** {@link EJBObject#getEJBHome} method reference. */
+ protected static final Method GET_EJB_HOME;
- /** {@link EJBObject#isIdentical} method reference. */
- protected static final Method IS_IDENTICAL;
+ /** {@link EJBObject#isIdentical} method reference. */
+ protected static final Method IS_IDENTICAL;
- /**
- * Initialize {@link EJBObject} method references.
- */
- static {
- try {
- final Class[] empty = {};
- final Class type = EJBObject.class;
+ /**
+ * Initialize {@link EJBObject} method references.
+ */
+ static {
+ try {
+ final Class[] empty = {};
+ final Class type = EJBObject.class;
- GET_PRIMARY_KEY = type.getMethod("getPrimaryKey", empty);
- GET_HANDLE = type.getMethod("getHandle", empty);
- GET_EJB_HOME = type.getMethod("getEJBHome", empty);
- IS_IDENTICAL = type.getMethod("isIdentical", new Class[] {
type });
- }
- catch (Exception e) {
- e.printStackTrace();
- throw new ExceptionInInitializerError(e);
- }
- }
+ GET_PRIMARY_KEY = type.getMethod("getPrimaryKey", empty);
+ GET_HANDLE = type.getMethod("getHandle", empty);
+ GET_EJB_HOME = type.getMethod("getEJBHome", empty);
+ IS_IDENTICAL = type.getMethod("isIdentical", new Class[] { type });
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ throw new ExceptionInInitializerError(e);
+ }
+ }
- // Constructors --------------------------------------------------
+ // Constructors --------------------------------------------------
- /**
- * No-argument constructor for externalization.
- */
- public BeanProxy() {}
-
- /**
- * Initialze.
- *
- * @param name The JNDI name of the container that we proxy for.
- * @param container The remote interface of the invoker for which
- * this is a proxy for.
- * @param optimize True if the proxy will attempt to optimize
- * VM-local calls.
- */
- protected BeanProxy(final String name,
- final ContainerRemote container,
- final boolean optimize)
- {
- super(name, container, optimize);
- }
+ /**
+ * No-argument constructor for externalization.
+ */
+ public BeanProxy() {}
+
+ /**
+ * Initialze.
+ *
+ * @param name The JNDI name of the container that we proxy for.
+ * @param container The remote interface of the invoker for which
+ * this is a proxy for.
+ * @param optimize True if the proxy will attempt to optimize
+ * VM-local calls.
+ */
+ protected BeanProxy(final String name,
+ final ContainerRemote container,
+ final boolean optimize)
+ {
+ super(name, container, optimize);
+ }
- // Public --------------------------------------------------------
+ // Public --------------------------------------------------------
- // Package protected ---------------------------------------------
+ // Package protected ---------------------------------------------
- // Protected -----------------------------------------------------
+ // Protected -----------------------------------------------------
- /**
- * Get a <tt>EJBHome</tt> reference for this proxy.
- *
- * @return <tt>EJBHome</tt> reference.
- *
- * @throws NamingException Failed to create InitalContext or lookup
- * EJBHome reference.
- */
- protected EJBHome getEJBHome() throws NamingException {
- // get a reference to the correct context
- final InitialContext ctx = createInitialContext();
-
- try {
- return (EJBHome)ctx.lookup(name);
- }
- finally {
- ctx.close();
- }
- }
-
- /**
- * Test the identitiy of an <tt>EJBObject</tt>.
- *
- * @param a <tt>EJBObject</tt>.
- * @param b Object to test identity with.
- * @return True if objects are identical.
- *
- * @throws RemoteException Failed to get primary key.
- * @throws ClassCastException Not an EJBObject instance.
- */
- protected Boolean isIdentical(final Object a, final Object b)
- throws RemoteException
- {
- final EJBObject ejb = (EJBObject)a;
- final Object pk = ejb.getPrimaryKey();
- return new Boolean(pk.equals(b));
- }
+ /**
+ * Get a <tt>EJBHome</tt> reference for this proxy.
+ *
+ * @return <tt>EJBHome</tt> reference.
+ *
+ * @throws NamingException Failed to create InitalContext or lookup
+ * EJBHome reference.
+ */
+ protected EJBHome getEJBHome() throws NamingException {
+ // get a reference to the correct context
+ final InitialContext ctx = createInitialContext();
+
+ try {
+ return (EJBHome)ctx.lookup(name);
+ }
+ finally {
+ ctx.close();
+ }
+ }
+
+ /**
+ * Test the identitiy of an <tt>EJBObject</tt>.
+ *
+ * @param a <tt>EJBObject</tt>.
+ * @param b Object to test identity with.
+ * @return True if objects are identical.
+ *
+ * @throws RemoteException Failed to get primary key.
+ * @throws ClassCastException Not an EJBObject instance.
+ */
+ protected Boolean isIdentical(final Object a, final Object b)
+ throws RemoteException
+ {
+ final EJBObject ejb = (EJBObject)a;
+ final Object pk = ejb.getPrimaryKey();
+ return new Boolean(pk.equals(b));
+ }
- // Private -------------------------------------------------------
+ // Private -------------------------------------------------------
- // Inner classes -------------------------------------------------
+ // Inner classes -------------------------------------------------
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development