com.pchauvet.struttlogin
Class SecureUserEJBConnectionBean

java.lang.Object
  |
  +--com.pchauvet.struttlogin.SecureUserEJBConnectionBean

public class SecureUserEJBConnectionBean
extends java.lang.Object

Access the SecureUser table using an EJB connection.

Version:
1.0. Dated 01/13/2003 - 01/26/2003
Author:
Philip Jahmani Chauvet. abc1260@aol.com

Constructor Summary
SecureUserEJBConnectionBean()
          The constructor.
 
Method Summary
 void closeJNDIConnection()
          Close the JNDI connection. 1.
 boolean getJNDIConnection()
          Test if the JNDI connection exist for the home interface
 com.pchauvet.struttlogin.SecureUserBean getUser()
          Get the SecureUserBean
 com.pchauvet.struttlogin.SecureUserBean getUser(java.lang.String m_userid)
          Get a user record using the EJB.
 void setJNDIConnection()
          Set the JNDI connection for the SecureUser table.
 void setUser(com.pchauvet.struttlogin.SecureUserBean m_secureuserbean)
          Set the SecureUserBean
 com.pchauvet.struttlogin.SecureUserBean setUser(java.lang.String m_userid, java.lang.String m_password)
          Create a new login user in the SecureUser table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecureUserEJBConnectionBean

public SecureUserEJBConnectionBean()
The constructor. It establishes the JNDI connection by calling the setJNDIConnection().

Method Detail

setJNDIConnection

public void setJNDIConnection()
Set the JNDI connection for the SecureUser table.
1. Set the EJB Server Factory and URI information as a system
property entry.
TODO: Read this information as a Datasource or from and XML file.
2. Get the home interface for the EJB


getJNDIConnection

public boolean getJNDIConnection()
Test if the JNDI connection exist for the home interface

Returns:
true if a home interface exist (SecureUserHome), else false.

getUser

public com.pchauvet.struttlogin.SecureUserBean getUser(java.lang.String m_userid)
Get a user record using the EJB.
1. find a user record using EJBs (SecureUser) Remote Interface from
the Home Interfaces (SecureUserHome) findByPrimaryKey( m_userid ).
2. Create a SecureUserBean. from the (SecureUser) EJB Remote Interface information.
3. Set the user SecureUserBean's m_userid, m_password and status

Parameters:
m_userid - - The user's Login ID.
Returns:
SecureUserBean - A user login entry from the SecureUser table.

setUser

public com.pchauvet.struttlogin.SecureUserBean setUser(java.lang.String m_userid,
                                                       java.lang.String m_password)
Create a new login user in the SecureUser table.
1. Create a user using EJBs (SecureUser) create() method of the
Home Interfaces (SecureUserHome).
2. Create a SecureUserBean from the (SecureUser) EJB Remote Interface information.
3. Set the user SecureUserBean's m_userid, m_password and status

Parameters:
m_userid - - The user's Login ID.
m_password - - The user Password
Returns:
SecureUserBean - A Login entry

closeJNDIConnection

public void closeJNDIConnection()
Close the JNDI connection. 1. Set the home interface (SecureUserHome) to null


setUser

public void setUser(com.pchauvet.struttlogin.SecureUserBean m_secureuserbean)
Set the SecureUserBean


getUser

public com.pchauvet.struttlogin.SecureUserBean getUser()
Get the SecureUserBean

Returns:
SecureUserBean - Get the user Login information


Back to the Web Application
Copyright © 2003 Philip Chauvet: (718) 241.3602 or abc1260@aol.com.
Permission is granted to reuse and distribute for commercial or personal use.
I am looking for work and would appreciate doing business with you and developing J2EE applications for you.