Commits

Anonymous committed 750e04f

Switched back to xdoclet, hooray

Comments (0)

Files changed (15)

src/java/com/opensymphony/user/provider/ejb/EJBAccessProvider.java

 import javax.ejb.ObjectNotFoundException;
 import javax.ejb.RemoveException;
 
-import javax.naming.InitialContext;
 import javax.naming.NamingException;
 
 
  * @author <a href="mailto:joe@truemesh.com">Joe Walnes</a>
  * @author <a href="mailto:mike@atlassian.com">Mike Cannon-Brookes</a>
  * @author <a href="mailto:plightbo@cisco.com">Patrick Lightbody</a>
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
  */
 public class EJBAccessProvider implements AccessProvider {
     //~ Static fields/initializers /////////////////////////////////////////////
 
     public boolean init(Properties properties) {
         try {
-            InitialContext context = new InitialContext();
             String userLocation = properties.getProperty("location.user", "ejb/osuser/User");
 
             try {
                 userHome = (UserHome) EJBUtils.lookup(userLocation, UserHome.class);
             } catch (NamingException e) {
                 try {
-                    userHome = (UserHome) EJBUtils.lookup(UserHome.COMP_NAME, UserHome.class);
+                    userHome = (UserHome) EJBUtils.lookup(UserHomeFactory.COMP_NAME, UserHome.class);
                 } catch (NamingException e1) {
                     try {
-                        userHome = (UserHome) EJBUtils.lookup(UserHome.JNDI_NAME, UserHome.class);
+                        userHome = (UserHome) EJBUtils.lookup(UserHomeFactory.JNDI_NAME, UserHome.class);
                     } catch (NamingException e2) {
                         // throw the original exception
                         throw e;
                 groupHome = (GroupHome) EJBUtils.lookup(groupLocation, GroupHome.class);
             } catch (NamingException e) {
                 try {
-                    groupHome = (GroupHome) EJBUtils.lookup(GroupHome.COMP_NAME, GroupHome.class);
+                    groupHome = (GroupHome) EJBUtils.lookup(GroupHomeFactory.COMP_NAME, GroupHome.class);
                 } catch (NamingException e1) {
                     try {
-                        groupHome = (GroupHome) EJBUtils.lookup(GroupHome.JNDI_NAME, GroupHome.class);
+                        groupHome = (GroupHome) EJBUtils.lookup(GroupHomeFactory.JNDI_NAME, GroupHome.class);
                     } catch (NamingException e2) {
                         // throw the original exception
                         throw e;
                 membershipHome = (MembershipHome) EJBUtils.lookup(membershipLocation, MembershipHome.class);
             } catch (NamingException e) {
                 try {
-                    membershipHome = (MembershipHome) EJBUtils.lookup(MembershipHome.COMP_NAME, MembershipHome.class);
+                    membershipHome = (MembershipHome) EJBUtils.lookup(MembershipHomeFactory.COMP_NAME, MembershipHome.class);
                 } catch (NamingException e1) {
                     try {
-                        membershipHome = (MembershipHome) EJBUtils.lookup(MembershipHome.JNDI_NAME, MembershipHome.class);
+                        membershipHome = (MembershipHome) EJBUtils.lookup(MembershipHomeFactory.JNDI_NAME, MembershipHome.class);
                     } catch (NamingException e2) {
                         // throw the original exception
                         throw e;

src/java/com/opensymphony/user/provider/ejb/EJBCredentialsProvider.java

 import com.opensymphony.user.Entity;
 import com.opensymphony.user.UserManagerImplementationException;
 import com.opensymphony.user.provider.CredentialsProvider;
-import com.opensymphony.user.provider.ejb.entity.MembershipHome;
-import com.opensymphony.user.provider.ejb.entity.MembershipRemote;
-import com.opensymphony.user.provider.ejb.entity.UserHome;
-import com.opensymphony.user.provider.ejb.entity.UserRemote;
+import com.opensymphony.user.provider.ejb.entity.*;
 
 import com.opensymphony.util.EJBUtils;
 
 import javax.ejb.ObjectNotFoundException;
 import javax.ejb.RemoveException;
 
-import javax.naming.InitialContext;
 import javax.naming.NamingException;
 
 
 /**
  * @author <a href="mailto:joe@truemesh.com">Joe Walnes</a>
  * @author <a href="mailto:mike@atlassian.com">Mike Cannon-Brookes</a>
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
  */
 public class EJBCredentialsProvider implements CredentialsProvider {
     //~ Static fields/initializers /////////////////////////////////////////////
         }
 
         try {
-            InitialContext context = new InitialContext();
             String location = properties.getProperty("location", "ejb/osuser/User");
 
             if (logger.isDebugEnabled()) {
                 userHome = (UserHome) EJBUtils.lookup(location, UserHome.class);
             } catch (NamingException e) {
                 try {
-                    userHome = (UserHome) EJBUtils.lookup(UserHome.COMP_NAME, UserHome.class);
+                    userHome = (UserHome) EJBUtils.lookup(UserHomeFactory.COMP_NAME, UserHome.class);
                 } catch (NamingException e1) {
                     try {
-                        userHome = (UserHome) EJBUtils.lookup(UserHome.JNDI_NAME, UserHome.class);
+                        userHome = (UserHome) EJBUtils.lookup(UserHomeFactory.JNDI_NAME, UserHome.class);
                     } catch (NamingException e2) {
                         // throw the original exception
                         throw e;
                 membershipHome = (MembershipHome) EJBUtils.lookup(membershipLocation, MembershipHome.class);
             } catch (NamingException e) {
                 try {
-                    membershipHome = (MembershipHome) EJBUtils.lookup(MembershipHome.COMP_NAME, MembershipHome.class);
+                    membershipHome = (MembershipHome) EJBUtils.lookup(MembershipHomeFactory.COMP_NAME, MembershipHome.class);
                 } catch (NamingException e1) {
                     try {
-                        membershipHome = (MembershipHome) EJBUtils.lookup(MembershipHome.JNDI_NAME, MembershipHome.class);
+                        membershipHome = (MembershipHome) EJBUtils.lookup(MembershipHomeFactory.JNDI_NAME, MembershipHome.class);
                     } catch (NamingException e2) {
                         // throw the original exception
                         throw e;

src/java/com/opensymphony/user/provider/ejb/EJBProfileProvider.java

 import com.opensymphony.user.Entity;
 import com.opensymphony.user.UserManagerImplementationException;
 import com.opensymphony.user.provider.ProfileProvider;
-import com.opensymphony.user.provider.ejb.entity.GroupHome;
-import com.opensymphony.user.provider.ejb.entity.UserHome;
+import com.opensymphony.user.provider.ejb.entity.*;
 
 import com.opensymphony.util.EJBUtils;
 
 
 import javax.ejb.ObjectNotFoundException;
 
-import javax.naming.InitialContext;
 import javax.naming.NamingException;
 
 
 /**
  * @author <a href="mailto:joe@truemesh.com">Joe Walnes</a>
  * @author <a href="mailto:mike@atlassian.com">Mike Cannon-Brookes</a>
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
  */
 public class EJBProfileProvider implements ProfileProvider {
     //~ Static fields/initializers /////////////////////////////////////////////
 
     public boolean init(Properties properties) {
         try {
-            InitialContext context = new InitialContext();
             String userLocation = properties.getProperty("location.user", "ejb/osuser/User");
             String groupLocation = properties.getProperty("location.group", "ejb/osuser/Group");
 
                 userHome = (UserHome) EJBUtils.lookup(userLocation, UserHome.class);
             } catch (NamingException e) {
                 try {
-                    userHome = (UserHome) EJBUtils.lookup(UserHome.COMP_NAME, UserHome.class);
+                    userHome = (UserHome) EJBUtils.lookup(UserHomeFactory.COMP_NAME, UserHome.class);
                 } catch (NamingException e1) {
                     try {
-                        userHome = (UserHome) EJBUtils.lookup(UserHome.JNDI_NAME, UserHome.class);
+                        userHome = (UserHome) EJBUtils.lookup(UserHomeFactory.JNDI_NAME, UserHome.class);
                     } catch (NamingException e2) {
                         // throw the original exception
                         throw e;
                 groupHome = (GroupHome) EJBUtils.lookup(groupLocation, GroupHome.class);
             } catch (NamingException e) {
                 try {
-                    groupHome = (GroupHome) EJBUtils.lookup(GroupHome.COMP_NAME, GroupHome.class);
+                    groupHome = (GroupHome) EJBUtils.lookup(GroupHomeFactory.COMP_NAME, GroupHome.class);
                 } catch (NamingException e1) {
                     try {
-                        groupHome = (GroupHome) EJBUtils.lookup(GroupHome.JNDI_NAME, GroupHome.class);
+                        groupHome = (GroupHome) EJBUtils.lookup(GroupHomeFactory.JNDI_NAME, GroupHome.class);
                     } catch (NamingException e2) {
                         // throw the original exception
                         throw e;

src/java/com/opensymphony/user/provider/ejb/entity/GroupCMP.java

-/*
- * Copyright (c) 2002-2003 by OpenSymphony
- * All rights reserved.
- */
-/*
- * Generated file - Do not edit!
- */
-package com.opensymphony.user.provider.ejb.entity;
-
-import com.opensymphony.ejb.AbstractEntityAdapter;
-
-import com.opensymphony.module.propertyset.PropertySet;
-
-import java.lang.*;
-
-import java.rmi.RemoteException;
-
-import javax.ejb.CreateException;
-import javax.ejb.EntityBean;
-import javax.ejb.EntityContext;
-
-
-/**
- * CMP layer for os.Group.
- * @author XDOCLET 1.1.1
- * @author XDOCLET 1.1.1
- * @author XDOCLET 1.1.1
- * @version XDOCLET 1.1.1 * @xdoclet-generated at Mar 13, 2002 5:54:07 PM
- */
-public class GroupCMP extends com.opensymphony.user.provider.ejb.entity.GroupEJB implements javax.ejb.EntityBean {
-    //~ Static fields/initializers /////////////////////////////////////////////
-
-    static final long serialVersionUID = -8228480041350733463L;
-
-    //~ Instance fields ////////////////////////////////////////////////////////
-
-    public java.lang.Long id;
-    public java.lang.String name;
-    private boolean dirty;
-
-    //~ Methods ////////////////////////////////////////////////////////////////
-
-    public void setEntityContext(javax.ejb.EntityContext ctx) {
-        super.setEntityContext(ctx);
-    }
-
-    public void setId(java.lang.Long id) {
-        this.id = id;
-
-        makeDirty();
-    }
-
-    public java.lang.Long getId() {
-        return this.id;
-    }
-
-    public boolean isModified() {
-        return dirty;
-    }
-
-    public void setName(java.lang.String name) {
-        this.name = name;
-
-        makeDirty();
-    }
-
-    public java.lang.String getName() {
-        return this.name;
-    }
-
-    public void ejbActivate() {
-    }
-
-    public void ejbLoad() {
-        makeClean();
-    }
-
-    public void ejbPassivate() {
-    }
-
-    public void ejbRemove() {
-    }
-
-    public void ejbStore() {
-        makeClean();
-    }
-
-    public void unsetEntityContext() {
-        super.unsetEntityContext();
-    }
-
-    protected void makeClean() {
-        dirty = false;
-    }
-
-    protected void makeDirty() {
-        dirty = true;
-    }
-}

src/java/com/opensymphony/user/provider/ejb/entity/GroupEJB.java

 /**
  * Entity bean representing Group.
  *
- * @ejb:bean type="CMP" name="os.Group" primkey-field="id" jndi-name="ejb/osuser/Group"
- * @ejb:interface class="com.opensymphony.user.provider.ejb.entity.GroupRemote" extends="javax.ejb.EJBObject"
- * @ejb:home class="com.opensymphony.user.provider.ejb.entity.GroupHome" extends="javax.ejb.EJBHome"
- * @ejb:pk class="java.lang.Long" extends="java.lang.Object"
+ * @ejb.bean type="CMP" name="Group" primkey-field="id" jndi-name="ejb/osuser/Group" view-type="remote"
+ * @ejb.interface remote-class="com.opensymphony.user.provider.ejb.entity.GroupRemote" extends="javax.ejb.EJBObject"
+ * @ejb.home class="com.opensymphony.user.provider.ejb.entity.GroupHome" extends="javax.ejb.EJBHome"
+ * @ejb.pk class="java.lang.Long" extends="java.lang.Object"
  *
- * @ejb:finder signature="java.util.Collection findAll()" orion-query="1 = 1 order by $name"
- * @ejb:finder signature="com.opensymphony.user.provider.ejb.entity.GroupRemote findByName(java.lang.String name)" orion-query="$name = $1"
- * @jboss:finder-query name="findAll" query="1 = 1" order="name"
- * @jboss:finder-query name="findByName" query="name = {0}" order="name"
+ * @ejb.finder  name="findAll" signature="java.util.Collection findAll()" query="select object(g) from Group g"
+ * @jboss.query name="findAll" signature="java.util.Collection findAll()" query="select object(g) from Group g order by g.name"
+ * @ejb.finder  name="findByName" signature="com.opensymphony.user.provider.ejb.entity.GroupRemote findByName(java.lang.String name)" query="select object(g) from Group g where g.name = ?1"
+ * @jboss.query name="findByName" signature="com.opensymphony.user.provider.ejb.entity.GroupRemote findByName(java.lang.String name)" query="select object(g) from Group g where g.name = ?1 order by g.name"
  *
- * @ejb:env-entry name="sequenceName" type="java.lang.String" value="OSUEntityEJB"
- * @ejb:ejb-external-ref ejb-name="sequenceGenerator" type="Session" home="com.opensymphony.module.sequence.SequenceGeneratorHome" remote="com.opensymphony.module.sequence.SequenceGenerator"
- * @ejb:ejb-external-ref ejb-name="propertyStore" type="Session" home="com.opensymphony.module.propertyset.ejb.PropertyStoreHome" remote="com.opensymphony.module.propertyset.ejb.PropertyStore"
- * @jboss:ejb-ref-jndi ref-name="sequenceGenerator" jndi-name="os.Sequence"
- * @jboss:ejb-ref-jndi ref-name="propertyStore" jndi-name="os.PropertyStore"
+ * @ejb.env-entry name="sequenceName" type="java.lang.String" value="OSUEntityEJB"
+ * @ejb.ejb-external-ref ref-name="sequenceGenerator" type="Session" home="com.opensymphony.module.sequence.SequenceGeneratorHome" remote="com.opensymphony.module.sequence.SequenceGenerator" link="SequenceGenerator"
+ * @ejb.ejb-external-ref ref-name="propertyStore" type="Session" home="com.opensymphony.module.propertyset.ejb.PropertyStoreHome" remote="com.opensymphony.module.propertyset.ejb.PropertyStore" link="PropertyStore"
  *
- * @orion:bean location="ejb/osuser/Group" table="OSGroup"
- * @jboss:table-name table-name="OSGroup"
+ * @ejb.persistence table-name="OSGroup"
+ *
+ * @orion.bean location="ejb/osuser/Group"
  *
  * @author <a href="mailto:joe@truemesh.com">Joe Walnes</a>
  * @author <a href="mailto:mike@atlassian.com">Mike Cannon-Brookes</a>
  * @author <a href="mailto:plightbo@cisco.com">Patrick Lightbody</a>
- * @version $Revision: 1.1.1.1 $
+ * @version $Revision: 1.2 $
  */
 public abstract class GroupEJB extends AbstractEntityAdapter implements EntityBean {
     //~ Methods ////////////////////////////////////////////////////////////////
     /**
     * Unique primary key of Group.
     *
-    * @ejb:interface-method
-    * @ejb:persistent-field
-    * @ejb:pk-field
-     * @jboss:column-name name="id"
-     * @orion:persistence persistence-name="id"
-     */
+    * @ejb.interface-method
+    * @ejb.persistence column-name="id"
+    * @ejb.pk-field
+    */
     public abstract Long getId();
 
     public abstract void setName(String name);
     /**
     * Get name of Group.
     *
-    * @ejb:interface-method
-    * @ejb:persistent-field
-    * @jboss:column-name name="name"
-     * @orion:persistence persistence-name="name"
-     */
+    * @ejb.interface-method
+          * @ejb.persistence column-name="name"
+    */
     public abstract String getName();
 
     /**
     * Group's PropertySet.
     *
-    * @ejb:interface-method
+    * @ejb.interface-method
     */
     public PropertySet getPropertySet() throws RemoteException {
         return locatePropertySet(getId().longValue());
     /**
     * Create new Group with given name.
     *
-    * @ejb:create-method
+    * @ejb.create-method
      */
     public Long ejbCreate(String name) throws RemoteException, CreateException {
         Long id = new Long(nextLong());

src/java/com/opensymphony/user/provider/ejb/entity/GroupHome.java

-/*
- * Copyright (c) 2002-2003 by OpenSymphony
- * All rights reserved.
- */
-/*
- * Generated file - Do not edit!
- */
-package com.opensymphony.user.provider.ejb.entity;
-
-import com.opensymphony.ejb.AbstractEntityAdapter;
-
-import com.opensymphony.module.propertyset.PropertySet;
-
-import java.lang.*;
-
-import java.rmi.RemoteException;
-
-import javax.ejb.CreateException;
-import javax.ejb.EntityBean;
-import javax.ejb.EntityContext;
-
-
-/**
- * Home interface for os.Group.
- * @author XDOCLET 1.1.1
- * @author XDOCLET 1.1.1
- * @author XDOCLET 1.1.1
- * @version XDOCLET 1.1.1 * @xdoclet-generated at Mar 13, 2002 5:54:07 PM
- */
-public interface GroupHome extends javax.ejb.EJBHome {
-    //~ Static fields/initializers /////////////////////////////////////////////
-
-    public static final String COMP_NAME = "java:comp/env/ejb/os/Group";
-    public static final String JNDI_NAME = "ejb/osuser/Group";
-
-    //~ Methods ////////////////////////////////////////////////////////////////
-
-    /**
-     * Create new Group with given name.
-     */
-    public com.opensymphony.user.provider.ejb.entity.GroupRemote create(java.lang.String name) throws java.rmi.RemoteException, javax.ejb.CreateException;
-
-    public java.util.Collection findAll() throws java.rmi.RemoteException, javax.ejb.FinderException;
-
-    public com.opensymphony.user.provider.ejb.entity.GroupRemote findByName(java.lang.String name) throws java.rmi.RemoteException, javax.ejb.FinderException;
-
-    public com.opensymphony.user.provider.ejb.entity.GroupRemote findByPrimaryKey(java.lang.Long pk) throws java.rmi.RemoteException, javax.ejb.FinderException;
-}

src/java/com/opensymphony/user/provider/ejb/entity/GroupRemote.java

-/*
- * Copyright (c) 2002-2003 by OpenSymphony
- * All rights reserved.
- */
-/*
- * Generated file - Do not edit!
- */
-package com.opensymphony.user.provider.ejb.entity;
-
-import com.opensymphony.ejb.AbstractEntityAdapter;
-
-import com.opensymphony.module.propertyset.PropertySet;
-
-import java.lang.*;
-
-import java.rmi.RemoteException;
-
-import javax.ejb.CreateException;
-import javax.ejb.EntityBean;
-import javax.ejb.EntityContext;
-
-
-/**
- * Remote interface for os.Group.
- * @author XDOCLET 1.1.1
- * @author XDOCLET 1.1.1
- * @author XDOCLET 1.1.1
- * @version XDOCLET 1.1.1 * @xdoclet-generated at Mar 13, 2002 5:54:07 PM
- */
-public interface GroupRemote extends javax.ejb.EJBObject {
-    //~ Methods ////////////////////////////////////////////////////////////////
-
-    /**
-     * Unique primary key of Group.
-     */
-    public java.lang.Long getId() throws java.rmi.RemoteException;
-
-    /**
-     * Get name of Group.
-     */
-    public java.lang.String getName() throws java.rmi.RemoteException;
-
-    /**
-     * Group's PropertySet.
-     */
-    public com.opensymphony.module.propertyset.PropertySet getPropertySet() throws java.rmi.RemoteException;
-}

src/java/com/opensymphony/user/provider/ejb/entity/MembershipCMP.java

-/*
- * Copyright (c) 2002-2003 by OpenSymphony
- * All rights reserved.
- */
-/*
- * Generated file - Do not edit!
- */
-package com.opensymphony.user.provider.ejb.entity;
-
-import com.opensymphony.ejb.AbstractEntityAdapter;
-
-import java.lang.*;
-
-import java.rmi.RemoteException;
-
-import javax.ejb.CreateException;
-import javax.ejb.EntityBean;
-import javax.ejb.EntityContext;
-
-
-/**
- * CMP layer for os.Membership.
- * @author XDOCLET 1.1.1
- * @author XDOCLET 1.1.1
- * @author XDOCLET 1.1.1
- * @version XDOCLET 1.1.1 * @xdoclet-generated at Mar 13, 2002 5:54:07 PM
- */
-public class MembershipCMP extends com.opensymphony.user.provider.ejb.entity.MembershipEJB implements javax.ejb.EntityBean {
-    //~ Static fields/initializers /////////////////////////////////////////////
-
-    static final long serialVersionUID = -788595692429882588L;
-
-    //~ Instance fields ////////////////////////////////////////////////////////
-
-    public java.lang.Long id;
-    public java.lang.String group;
-    public java.lang.String user;
-    private boolean dirty;
-
-    //~ Methods ////////////////////////////////////////////////////////////////
-
-    public void setEntityContext(javax.ejb.EntityContext ctx) {
-        super.setEntityContext(ctx);
-    }
-
-    public void setGroup(java.lang.String group) {
-        this.group = group;
-
-        makeDirty();
-    }
-
-    public java.lang.String getGroup() {
-        return this.group;
-    }
-
-    public void setId(java.lang.Long id) {
-        this.id = id;
-
-        makeDirty();
-    }
-
-    public java.lang.Long getId() {
-        return this.id;
-    }
-
-    public boolean isModified() {
-        return dirty;
-    }
-
-    public void setUser(java.lang.String user) {
-        this.user = user;
-
-        makeDirty();
-    }
-
-    public java.lang.String getUser() {
-        return this.user;
-    }
-
-    public void ejbActivate() {
-    }
-
-    public void ejbLoad() {
-        makeClean();
-    }
-
-    public void ejbPassivate() {
-    }
-
-    public void ejbRemove() {
-    }
-
-    public void ejbStore() {
-        makeClean();
-    }
-
-    public void unsetEntityContext() {
-        super.unsetEntityContext();
-    }
-
-    protected void makeClean() {
-        dirty = false;
-    }
-
-    protected void makeDirty() {
-        dirty = true;
-    }
-}

src/java/com/opensymphony/user/provider/ejb/entity/MembershipEJB.java

 /**
  * Entity bean linking a User to a Group.
  *
- * @ejb:bean type="CMP" name="os.Membership" primkey-field="id" jndi-name="ejb/osuser/Membership"
- * @ejb:interface class="com.opensymphony.user.provider.ejb.entity.MembershipRemote" extends="javax.ejb.EJBObject"
- * @ejb:home class="com.opensymphony.user.provider.ejb.entity.MembershipHome" extends="javax.ejb.EJBHome"
- * @ejb:pk class="java.lang.Long" extends="java.lang.Object"
+ * @ejb.bean type="CMP" name="Membership" primkey-field="id" jndi-name="ejb/osuser/Membership" view-type="remote"
+ * @ejb.interface remote-class="com.opensymphony.user.provider.ejb.entity.MembershipRemote" extends="javax.ejb.EJBObject"
+ * @ejb.home class="com.opensymphony.user.provider.ejb.entity.MembershipHome" extends="javax.ejb.EJBHome"
+ * @ejb.pk class="java.lang.Long" extends="java.lang.Object"
  *
- * @ejb:finder signature="java.util.Collection findAll()"
- * @ejb:finder signature="java.util.Collection findByUser(java.lang.String user)" orion-query="$user = $1"
- * @ejb:finder signature="java.util.Collection findByGroup(java.lang.String group)" orion-query="$group = $1"
- * @ejb:finder signature="com.opensymphony.user.provider.ejb.entity.MembershipRemote findByUserAndGroup(java.lang.String user, java.lang.String group)" orion-query="$user = $1 AND $group = $2"
- * @jboss:finder-query name="findAll" query="1 = 1" order="name"
- * @jboss:finder-query name="findByUser" query="userId = {0}" order="userId"
- * @jboss:finder-query name="findByGroup" query="groupId = {0}" order="groupId"
- * @jboss:finder-query name="findByUserAndGroup" query="userId = {0} AND groupId = {1}" order="groupId, userId"
+ * @ejb.finder  name="findAll" signature="java.util.Collection findAll()" query="select object(m) from Membership m"
+ * @ejb.finder  name="findByUser" signature="java.util.Collection findByUser(java.lang.String user)" query="select object(m) from Membership m where m.user = ?1"
+ * @jboss.query name="findByUser" signature="java.util.Collection findByUser(java.lang.String user)" query="select object(m) from Membership m where m.user = ?1 order by m.user"
+ * @ejb.finder  name="findByGroup" signature="java.util.Collection findByGroup(java.lang.String group)" query="select object(m) from Membership m where m.group = ?1"
+ * @jboss.query name="findByGroup" signature="java.util.Collection findByGroup(java.lang.String group)" query="select object(m) from Membership m where m.group = ?1 order by m.group"
+ * @ejb.finder    name="findByUserAndGroup" signature="com.opensymphony.user.provider.ejb.entity.MembershipRemote findByUserAndGroup(java.lang.String user, java.lang.String group)" query="select object(m) from Membership m where m.group = ?1 AND m.user = ?2"
+ * @jboss.finder  name="findByUserAndGroup" signature="com.opensymphony.user.provider.ejb.entity.MembershipRemote findByUserAndGroup(java.lang.String user, java.lang.String group)" query="select object(m) from Membership m where m.group = ?1 AND m.user = ?2 order by m.group, m.user"
  *
- * @ejb:env-entry name="sequenceName" type="java.lang.String" value="MembershipEJB"
- * @ejb:ejb-external-ref ejb-name="sequenceGenerator" type="Session" home="com.opensymphony.module.sequence.SequenceGeneratorHome" remote="com.opensymphony.module.sequence.SequenceGenerator"
- * @ejb:ejb-external-ref ejb-name="propertyStore" type="Session" home="com.opensymphony.module.propertyset.ejb.PropertyStoreHome" remote="com.opensymphony.module.propertyset.ejb.PropertyStore"
- * @jboss:ejb-ref-jndi ref-name="sequenceGenerator" jndi-name="os.Sequence"
- * @jboss:ejb-ref-jndi ref-name="propertyStore" jndi-name="os.PropertyStore"
+ * @ejb.env-entry name="sequenceName" type="java.lang.String" value="MembershipEJB"
+ * @ejb.ejb-external-ref ejb-name="sequenceGenerator" type="Session" home="com.opensymphony.module.sequence.SequenceGeneratorHome" remote="com.opensymphony.module.sequence.SequenceGenerator" link="SequenceGenerator"
+ * @ejb.ejb-external-ref ejb-name="propertyStore" type="Session" home="com.opensymphony.module.propertyset.ejb.PropertyStoreHome" remote="com.opensymphony.module.propertyset.ejb.PropertyStore" link="PropertyStore"
  *
- * @orion:bean location="ejb/osuser/Membership" table="OSMembership"
- * @jboss:table-name table-name="OSMembership"
+ * @orion.bean location="ejb/osuser/Membership"
+ * @ejb.persistence table-name="OSMembership"
  *
  * @author <a href="mailto:joe@truemesh.com">Joe Walnes</a>
  * @author <a href="mailto:mike@atlassian.com">Mike Cannon-Brookes</a>
  * @author <a href="mailto:plightbo@cisco.com">Patrick Lightbody</a>
- * @version $Revision: 1.1.1.1 $
+ * @version $Revision: 1.2 $
  */
 public abstract class MembershipEJB extends AbstractEntityAdapter implements EntityBean {
     //~ Methods ////////////////////////////////////////////////////////////////
     /**
      * Get Group
      *
-     * @ejb:interface-method
-     * @ejb:persistent-field
-     * @jboss:column-name name="groupId"
-     * @orion:persistence persistence-name="groupId"
+     * @ejb.interface-method
+     * @ejb.persistence column-name="groupId"
      */
     public abstract String getGroup();
 
     /**
      * Unique primary key of Membership.
      *
-     * @ejb:interface-method
-     * @ejb:persistent-field
-     * @ejb:pk-field
-     * @jboss:column-name name="id"
-     * @orion:persistence persistence-name="id"
+     * @ejb.interface-method
+     * @ejb.pk-field
+     * @ejb.persistence column-name="id"
      */
     public abstract Long getId();
 
     /**
      * Get User
      *
-     * @ejb:interface-method
-     * @ejb:persistent-field
-     * @jboss:column-name name="userId"
-     * @orion:persistence persistence-name="userId"
+     * @ejb.interface-method
+     * @ejb.persistence column-name="userId"
      */
     public abstract String getUser();
 
     /**
      * Create new Membership of User and Group.
      *
-     * @ejb:create-method
+     * @ejb.create-method
      */
     public Long ejbCreate(String user, String group) throws RemoteException, CreateException {
         Long id = new Long(nextLong());

src/java/com/opensymphony/user/provider/ejb/entity/MembershipHome.java

-/*
- * Copyright (c) 2002-2003 by OpenSymphony
- * All rights reserved.
- */
-/*
- * Generated file - Do not edit!
- */
-package com.opensymphony.user.provider.ejb.entity;
-
-import com.opensymphony.ejb.AbstractEntityAdapter;
-
-import java.lang.*;
-
-import java.rmi.RemoteException;
-
-import javax.ejb.CreateException;
-import javax.ejb.EntityBean;
-import javax.ejb.EntityContext;
-
-
-/**
- * Home interface for os.Membership.
- * @author XDOCLET 1.1.1
- * @author XDOCLET 1.1.1
- * @author XDOCLET 1.1.1
- * @version XDOCLET 1.1.1 * @xdoclet-generated at Mar 13, 2002 5:54:07 PM
- */
-public interface MembershipHome extends javax.ejb.EJBHome {
-    //~ Static fields/initializers /////////////////////////////////////////////
-
-    public static final String COMP_NAME = "java:comp/env/ejb/os/Membership";
-    public static final String JNDI_NAME = "ejb/osuser/Membership";
-
-    //~ Methods ////////////////////////////////////////////////////////////////
-
-    /**
-    * Create new Membership of User and Group.
-    */
-    public com.opensymphony.user.provider.ejb.entity.MembershipRemote create(java.lang.String user, java.lang.String group) throws java.rmi.RemoteException, javax.ejb.CreateException;
-
-    public java.util.Collection findAll() throws java.rmi.RemoteException, javax.ejb.FinderException;
-
-    public java.util.Collection findByGroup(java.lang.String group) throws java.rmi.RemoteException, javax.ejb.FinderException;
-
-    public com.opensymphony.user.provider.ejb.entity.MembershipRemote findByPrimaryKey(java.lang.Long pk) throws java.rmi.RemoteException, javax.ejb.FinderException;
-
-    public java.util.Collection findByUser(java.lang.String user) throws java.rmi.RemoteException, javax.ejb.FinderException;
-
-    public com.opensymphony.user.provider.ejb.entity.MembershipRemote findByUserAndGroup(java.lang.String user, java.lang.String group) throws java.rmi.RemoteException, javax.ejb.FinderException;
-}

src/java/com/opensymphony/user/provider/ejb/entity/MembershipRemote.java

-/*
- * Copyright (c) 2002-2003 by OpenSymphony
- * All rights reserved.
- */
-/*
- * Generated file - Do not edit!
- */
-package com.opensymphony.user.provider.ejb.entity;
-
-import com.opensymphony.ejb.AbstractEntityAdapter;
-
-import java.lang.*;
-
-import java.rmi.RemoteException;
-
-import javax.ejb.CreateException;
-import javax.ejb.EntityBean;
-import javax.ejb.EntityContext;
-
-
-/**
- * Remote interface for os.Membership.
- * @author XDOCLET 1.1.1
- * @author XDOCLET 1.1.1
- * @author XDOCLET 1.1.1
- * @version XDOCLET 1.1.1 * @xdoclet-generated at Mar 13, 2002 5:54:07 PM
- */
-public interface MembershipRemote extends javax.ejb.EJBObject {
-    //~ Methods ////////////////////////////////////////////////////////////////
-
-    /**
-     * Get Group
-     */
-    public java.lang.String getGroup() throws java.rmi.RemoteException;
-
-    /**
-     * Unique primary key of Membership.
-     */
-    public java.lang.Long getId() throws java.rmi.RemoteException;
-
-    /**
-     * Get User
-     */
-    public java.lang.String getUser() throws java.rmi.RemoteException;
-}

src/java/com/opensymphony/user/provider/ejb/entity/UserCMP.java

-/*
- * Copyright (c) 2002-2003 by OpenSymphony
- * All rights reserved.
- */
-/*
- * Generated file - Do not edit!
- */
-package com.opensymphony.user.provider.ejb.entity;
-
-import com.opensymphony.ejb.AbstractEntityAdapter;
-
-import com.opensymphony.module.propertyset.PropertySet;
-
-import com.opensymphony.user.provider.ejb.util.Base64;
-import com.opensymphony.user.provider.ejb.util.PasswordDigester;
-
-import java.lang.*;
-
-import java.rmi.RemoteException;
-
-import javax.ejb.CreateException;
-import javax.ejb.EntityBean;
-import javax.ejb.EntityContext;
-
-
-/**
- * CMP layer for os.User.
- * @author XDOCLET 1.1.1
- * @author XDOCLET 1.1.1
- * @author XDOCLET 1.1.1
- * @version XDOCLET 1.1.1 * @xdoclet-generated at Mar 13, 2002 5:54:07 PM
- */
-public class UserCMP extends com.opensymphony.user.provider.ejb.entity.UserEJB implements javax.ejb.EntityBean {
-    //~ Static fields/initializers /////////////////////////////////////////////
-
-    static final long serialVersionUID = 132327067589536299L;
-
-    //~ Instance fields ////////////////////////////////////////////////////////
-
-    public java.lang.Long id;
-    public java.lang.String name;
-    public java.lang.String passwordHash;
-    private boolean dirty;
-
-    //~ Methods ////////////////////////////////////////////////////////////////
-
-    public void setEntityContext(javax.ejb.EntityContext ctx) {
-        super.setEntityContext(ctx);
-    }
-
-    public void setId(java.lang.Long id) {
-        this.id = id;
-
-        makeDirty();
-    }
-
-    public java.lang.Long getId() {
-        return this.id;
-    }
-
-    public boolean isModified() {
-        return dirty;
-    }
-
-    public void setName(java.lang.String name) {
-        this.name = name;
-
-        makeDirty();
-    }
-
-    public java.lang.String getName() {
-        return this.name;
-    }
-
-    public void setPasswordHash(java.lang.String passwordHash) {
-        this.passwordHash = passwordHash;
-
-        makeDirty();
-    }
-
-    public java.lang.String getPasswordHash() {
-        return this.passwordHash;
-    }
-
-    public void ejbActivate() {
-    }
-
-    public void ejbLoad() {
-        makeClean();
-    }
-
-    public void ejbPassivate() {
-    }
-
-    public void ejbRemove() {
-    }
-
-    public void ejbStore() {
-        makeClean();
-    }
-
-    public void unsetEntityContext() {
-        super.unsetEntityContext();
-    }
-
-    protected void makeClean() {
-        dirty = false;
-    }
-
-    protected void makeDirty() {
-        dirty = true;
-    }
-}

src/java/com/opensymphony/user/provider/ejb/entity/UserEJB.java

 /**
  * Entity bean representing User. Stores name and hashed password.
  *
- * @ejb:bean type="CMP" name="os.User" primkey-field="id" jndi-name="ejb/osuser/User"
- * @ejb:interface class="com.opensymphony.user.provider.ejb.entity.UserRemote" extends="javax.ejb.EJBObject"
- * @ejb:home class="com.opensymphony.user.provider.ejb.entity.UserHome" extends="javax.ejb.EJBHome"
- * @ejb:pk class="java.lang.Long" extends="java.lang.Object"
+ * @ejb.bean type="CMP" name="User" primkey-field="id" jndi-name="ejb/osuser/User" view-type="remote"
+ * @ejb.interface remote-class="com.opensymphony.user.provider.ejb.entity.UserRemote" extends="javax.ejb.EJBObject"
+ * @ejb.home class="com.opensymphony.user.provider.ejb.entity.UserHome" extends="javax.ejb.EJBHome"
+ * @ejb.pk class="java.lang.Long" extends="java.lang.Object"
  *
- * @ejb:finder signature="java.util.Collection findAll()" orion-query="1 = 1 order by $name"
- * @ejb:finder signature="com.opensymphony.user.provider.ejb.entity.UserRemote findByName(java.lang.String name)" orion-query="$name = $1"
- * @jboss:finder-query name="findAll" query="1 = 1" order="name"
- * @jboss:finder-query name="findByName" query="name = {0}" order="name"
+ * @ejb.finder  name="findAll" signature="java.util.Collection findAll()" query="select object(u) from User u"
+ * @jboss.query name="findAll" signature="java.util.Collection findAll()" query="select object(u) from User u order by u.name"
+ * @ejb.finder  name="findByName" signature="com.opensymphony.user.provider.ejb.entity.UserRemote findByName(java.lang.String name)" query="select object(u) from User u where u.name = ?1"
+ * @jboss.query name="findByName" signature="com.opensymphony.user.provider.ejb.entity.UserRemote findByName(java.lang.String name)" query="select object(u) from User u where u.name = ?1 order by u.name"
  *
- * @ejb:env-entry name="sequenceName" type="java.lang.String" value="OSUEntityEJB"
- * @ejb:ejb-external-ref ejb-name="sequenceGenerator" type="Session" home="com.opensymphony.module.sequence.SequenceGeneratorHome" remote="com.opensymphony.module.sequence.SequenceGenerator"
- * @ejb:ejb-external-ref ejb-name="propertyStore" type="Session" home="com.opensymphony.module.propertyset.ejb.PropertyStoreHome" remote="com.opensymphony.module.propertyset.ejb.PropertyStore"
- * @jboss:ejb-ref-jndi ref-name="sequenceGenerator" jndi-name="os.Sequence"
- * @jboss:ejb-ref-jndi ref-name="propertyStore" jndi-name="os.PropertyStore"
+ * @ejb.env-entry name="sequenceName" type="java.lang.String" value="OSUEntityEJB"
+ * @ejb.ejb-external-ref ref-name="sequenceGenerator" type="Session" home="com.opensymphony.module.sequence.SequenceGeneratorHome" remote="com.opensymphony.module.sequence.SequenceGenerator" link="SequenceGenerator"
+ * @ejb.ejb-external-ref ref-name="propertyStore" type="Session" home="com.opensymphony.module.propertyset.ejb.PropertyStoreHome" remote="com.opensymphony.module.propertyset.ejb.PropertyStore" link="SequenceGenerator"
  *
- * @orion:bean location="ejb/osuser/User" table="OSUser"
- * @jboss:table-name table-name="OSUser"
+ * @ejb.persistence table="OSUser"
  *
  * @author <a href="mailto:joe@truemesh.com">Joe Walnes</a>
  * @author <a href="mailto:mike@atlassian.com">Mike Cannon-Brookes</a>
  * @author <a href="mailto:plightbo@cisco.com">Patrick Lightbody</a>
- * @version $Revision: 1.1.1.1 $
+ * @version $Revision: 1.2 $
  */
 public abstract class UserEJB extends AbstractEntityAdapter implements EntityBean {
     //~ Methods ////////////////////////////////////////////////////////////////
     /**
     * Unique primary key of User.
     *
-    * @ejb:interface-method
-    * @ejb:persistent-field
-    * @ejb:pk-field
-    * @jboss:column-name name="id"
-     * @orion:persistence persistence-name="id"
-     */
+    * @ejb.interface-method
+    * @ejb.persistence column-name="id"
+    * @ejb.pk-field
+    */
     public abstract Long getId();
 
     public abstract void setName(String name);
     /**
     * Get login name of User.
     *
-    * @ejb:interface-method
-    * @ejb:persistent-field
-    * @jboss:column-name name="name"
-     * @orion:persistence persistence-name="name"
-     */
+    * @ejb.interface-method
+    * @ejb.persistence column-name="name"
+    */
     public abstract String getName();
 
     public abstract void setPasswordHash(String passwordHash);
 
     /**
-    * @ejb:persistent-field
-    * @jboss:column-name name="passwordHash"
-     * @orion:persistence persistence-name="passwordHash"
+     * @ejb.persistence column-name="passwordHash"
      */
     public abstract String getPasswordHash();
 
     /**
-     * @ejb:interface-method
+     * @ejb.interface-method
      */
     public void setPassword(String password) {
         setPasswordHash(createHash(password));
     /**
     * User's PropertySet.
     *
-    * @ejb:interface-method
+    * @ejb.interface-method
     */
     public PropertySet getPropertySet() throws RemoteException {
         return locatePropertySet(getId().longValue());
     /**
     * Verify that supplied password matches that of user.
     *
-    * @ejb:interface-method
+    * @ejb.interface-method
     */
     public boolean authenticate(String password) {
         if ((password == null) || (getPasswordHash() == null) || (password.length() == 0)) {
     /**
     * Create new User with given name.
     *
-    * @ejb:create-method
+    * @ejb.create-method
     */
     public Long ejbCreate(String name) throws RemoteException, CreateException {
         Long id = new Long(nextLong());

src/java/com/opensymphony/user/provider/ejb/entity/UserHome.java

-/*
- * Copyright (c) 2002-2003 by OpenSymphony
- * All rights reserved.
- */
-/*
- * Generated file - Do not edit!
- */
-package com.opensymphony.user.provider.ejb.entity;
-
-import com.opensymphony.ejb.AbstractEntityAdapter;
-
-import com.opensymphony.module.propertyset.PropertySet;
-
-import com.opensymphony.user.provider.ejb.util.Base64;
-import com.opensymphony.user.provider.ejb.util.PasswordDigester;
-
-import java.lang.*;
-
-import java.rmi.RemoteException;
-
-import javax.ejb.CreateException;
-import javax.ejb.EntityBean;
-import javax.ejb.EntityContext;
-
-
-/**
- * Home interface for os.User.
- * @author XDOCLET 1.1.1
- * @author XDOCLET 1.1.1
- * @author XDOCLET 1.1.1
- * @version XDOCLET 1.1.1 * @xdoclet-generated at Mar 13, 2002 5:54:07 PM
- */
-public interface UserHome extends javax.ejb.EJBHome {
-    //~ Static fields/initializers /////////////////////////////////////////////
-
-    public static final String COMP_NAME = "java:comp/env/ejb/os/User";
-    public static final String JNDI_NAME = "ejb/osuser/User";
-
-    //~ Methods ////////////////////////////////////////////////////////////////
-
-    /**
-     * Create new User with given name.
-     */
-    public com.opensymphony.user.provider.ejb.entity.UserRemote create(java.lang.String name) throws java.rmi.RemoteException, javax.ejb.CreateException;
-
-    public java.util.Collection findAll() throws java.rmi.RemoteException, javax.ejb.FinderException;
-
-    public com.opensymphony.user.provider.ejb.entity.UserRemote findByName(java.lang.String name) throws java.rmi.RemoteException, javax.ejb.FinderException;
-
-    public com.opensymphony.user.provider.ejb.entity.UserRemote findByPrimaryKey(java.lang.Long pk) throws java.rmi.RemoteException, javax.ejb.FinderException;
-}

src/java/com/opensymphony/user/provider/ejb/entity/UserRemote.java

-/*
- * Copyright (c) 2002-2003 by OpenSymphony
- * All rights reserved.
- */
-/*
- * Generated file - Do not edit!
- */
-package com.opensymphony.user.provider.ejb.entity;
-
-import com.opensymphony.ejb.AbstractEntityAdapter;
-
-import com.opensymphony.module.propertyset.PropertySet;
-
-import com.opensymphony.user.provider.ejb.util.Base64;
-import com.opensymphony.user.provider.ejb.util.PasswordDigester;
-
-import java.lang.*;
-
-import java.rmi.RemoteException;
-
-import javax.ejb.CreateException;
-import javax.ejb.EntityBean;
-import javax.ejb.EntityContext;
-
-
-/**
- * Remote interface for os.User.
- * @author XDOCLET 1.1.1
- * @author XDOCLET 1.1.1
- * @author XDOCLET 1.1.1
- * @version XDOCLET 1.1.1 * @xdoclet-generated at Mar 13, 2002 5:54:07 PM
- */
-public interface UserRemote extends javax.ejb.EJBObject {
-    //~ Methods ////////////////////////////////////////////////////////////////
-
-    /**
-     * Unique primary key of User.
-     */
-    public java.lang.Long getId() throws java.rmi.RemoteException;
-
-    /**
-     * Get login name of User.
-     */
-    public java.lang.String getName() throws java.rmi.RemoteException;
-
-    public void setPassword(java.lang.String password) throws java.rmi.RemoteException;
-
-    /**
-     * User's PropertySet.
-     */
-    public com.opensymphony.module.propertyset.PropertySet getPropertySet() throws java.rmi.RemoteException;
-
-    /**
-     * Verify that supplied password matches that of user.
-     */
-    public boolean authenticate(java.lang.String password) throws java.rmi.RemoteException;
-}