Home > Articles > Programming > Java

Like this article? We recommend

Like this article? We recommend

Session Bean Components

A session bean is composed of the following components:

  • Remote interface

  • Home interface

  • Bean class

The remote interface defines the business methods of the session bean; these are the action methods that operate on the database data.

The home interface is used to create and locate session beans. For a stateless session bean, we'll only be interested in creating a default bean (remember that stateless session beans cannot persist data between method calls).

The Bean class implements all of the methods defined in the remote interface.

In this example, I want to create a database manager session bean that is our front end to a database; it contains methods to manipulate two tables: user and company. The tables are very simple (see Tables 1 and 2). The model is simply that a user can belong to a single company and a company can contain multiple users.

Table 1

Company Table

Field

Description

Data Type

id

Company ID (primary key)

NUMBER

name

Company name

VARCHAR

Table 2

User Table

Field

Description

Data Type

id

User ID (primary key)

NUMBER

name

Username

VARCHAR

company

User's company (primary key)

NUMBER

The session bean also makes use of two helper classes; these are standard classes that represent a company and a user: com.informit.javasolutions.database.CompanyInfo and com.informit.javasolutions.database.UserInfo, respectively.

Remote Interface

The remote interface defines the session bean's business methods. We're going to define the following functionality:

  • Add a user

  • Remove a user

  • Find a user

  • Add a company

  • Remove a company

  • Find a company

  • Find all companies

  • Find all users who work for a specific company

  • Retrieve the number of users in the database

  • Retrieve the number of users who work for a specific company in the database

Listing 1 shows the source code for the DatabaseManager remote interface.

Listing 1  DatabaseManager Remote Interface (DatabaseManager.java)

package com.informit.javasolutions.databasemanager;

// Import the EJB classes
import java.rmi.RemoteException;
import javax.ejb.FinderException;
import javax.ejb.EJBObject;

// Import our database objects
import com.informit.javasolutions.database.CompanyInfo;
import com.informit.javasolutions.database.UserInfo;

/**
 * The session bean that manages all transactions with the
 * User Entity Bean
 */
public interface DatabaseManager extends EJBObject
{
   /**
    * Adds a new User to the Database
    */
   public abstract void addUser( UserInfo user ) 
          throws RemoteException;

   /**
    * Removes the specified User from the Database
    */
   public abstract void removeUser( int id ) throws RemoteException;

   /**
    * Finds a User by its id
    */
   public abstract UserInfo findUser( int id ) throws RemoteException;

   /**
    * Adds a new Company to the Database
    */
   public abstract void addCompany( CompanyInfo company )
          throws RemoteException;

   /**
    * Removes the specified Company from the Database
    */
   public abstract void removeCompany( int id )
          throws RemoteException;

   /**
    * Finds a Company by its id
    */
   public abstract CompanyInfo findCompany( int id )
          throws RemoteException;

   /**
    * Returns all companies in the database
    */
   public abstract CompanyInfo[] findCompanies()
          throws RemoteException;

   /**
    * Returns all the users that belong to the specified company
    */
   public abstract UserInfo[] findUsersForCompany( int id )
          throws RemoteException;

   /**
    * Returns the number of Users in the database
    */
   public abstract int getNumberOfUsers() throws RemoteException;

   /**
    * Returns the number of Users for a
    * specific company in the database
    */
   public abstract int getNumberOfUsers( int company )
          throws RemoteException;

}

Listing 1 starts by importing the EJB classes and the database classes. Next it declares the com.informit.javasolutions.databasemanager.DatabaseManager interface; this, like all EJB remote interfaces, must extend the javax.ejb.EJBObject interface.

The methods of the DatabaseManager interface offer the aforementioned functionality and interact with the database table helper classes: CompanyInfo and UserInfo. All methods must declare that they can throw java.rmi.RemoteException; this is inherited from EJB's RMI roots.

Home Interface

The home interface defines the methods that will create and locate a session bean; we'll only be concerned with a default create method. Listing 2 shows the complete source code for the DatabaseManager home interface.

Listing 2  DatabaseManager Home Interface (DatabaseManagerHome.java)

package com.informit.javasolutions.databasemanager;

// Import the EJB classes
import java.rmi.RemoteException;
import javax.ejb.*;

/**
 * The Home interface for the DatabaseManager session bean
 */
public interface DatabaseManagerHome extends EJBHome
{
    /**
     * Creates an instance of the DatabaseManager object
     */
    public DatabaseManager create()
           throws RemoteException, CreateException;

}

Listing 2 first imports the EJB classes. Next it declares the com.informit.javasolutions.databasemanager.DatabaseManagerHome interface; this, like all EJB home interfaces, must extend the javax.ejb.EJBHome interface.

The only method in this interface is the default create() method; this method declares that it can throw the java.rmi.RemoteException if an network error occurs and that it can throw the javax.ejb.CreateException if the EJB container cannot create an instance of the bean. Finally, it returns an instance of a class implementing the bean's remote interface.

Bean Class

The Bean class implements the business methods defined in the remote interface. Listing 3 shows a partial implementation of the com.informit.javasolutions.databasemanager.DatabaseManagerBean class; please refer to the source code.

Listing 3  DatabaseManager Bean Class (DatabaseManagerHome.java)

package com.informit.javasolutions.databasemanager;

// Import the JNDI classes
import javax.naming.*;
import javax.rmi.PortableRemoteObject;

// Import the EJB classes
import java.rmi.RemoteException;
import javax.ejb.*;

// Import the Helper classes
import com.informit.javasolutions.database.UserInfo;
import com.informit.javasolutions.database.CompanyInfo;

// Import the collection classes
import java.util.*;

// Import the SQL classes
import javax.sql.*;
import java.sql.*;

/**
 * Manages access to the Database
 */
public class DatabaseManagerBean implements SessionBean
{
    /**
     * Adds a new User to the Database
     */
    public void addUser( UserInfo user )
    {
    ...
    }

    /**
     * Removes the specified User from the Database
     */
    public void removeUser( int id )
    {
    ...
    }

    /**
     * Finds a User by its id
     */
    public UserInfo findUser( int id )
    {
    ...
    }

    /**
     * Adds a new Company to the Database
     */
    public void addCompany( CompanyInfo company )
    {
    ...
    }

    /**
     * Removes the specified Company from the Database
     */
    public void removeCompany( int id )
    {
    ...
    }

    /**
     * Finds a Company by its id
     */
    public CompanyInfo findCompany( int id )
    {
    ...
    }

    /**
     * Returns all companies in the database
     */
    public CompanyInfo[] findCompanies()
    {
    ...
    }


    /**
     * Returns all the users that belong to the specified company
     */
    public UserInfo[] findUsersForCompany( int company )
    {
    ...
    }

    /**
     * Returns the number of Users in the Database
     */
    public int getNumberOfUsers()
    {
    ...
    }

    /**
     * Returns the number of Users in the ConfigServer
     */
    public int getNumberOfUsers( int company )
    {
    ...
    }

    /**
     * Returns a connection to the ConfigServer Database
     */
    private Connection getConnection() throws SQLException
    {
        try
        {
            // Get a JNDI Context
            Context jndiContext = new InitialContext();

            // Get a datasource for the ConfigServerDB
            DataSource ds = ( DataSource )
              jndiContext.lookup( "java:comp/env/jdbc/InformIT" );

            // Return a connection to the database
            return ds.getConnection();
        }
        catch( NamingException eNaming )
        {
            throw new EJBException( eNaming );
        }
    }

    public void ejbCreate() {}

    public void ejbRemove() {}

    public void ejbActivate() {}

    public void ejbPassivate() {}

    public void setSessionContext( SessionContext ctx ) {}
}

The DatabaseManagerBean class imports the EJB classes, the JNDI classes, the SQL classes, the collection classes, and the helper classes. Like all session beans, the DatabaseManagerBean class implements the javax.ejb.SessionBean interface. Table 3 shows the methods defined in the javax.ejb.SessionBean interface; we must provide implementations of these methods in the DatabaseManagerBean class (see the end of Listing 3).

Table 3

javax.ejb.SessionBean Interface Methods

Method

Description

ejbActivate()

The activate method is called when the instance is activated from its "passive" state.

ejbPassivate()

The passivate method is called before the instance enters the "passive" state.

ejbRemove()

A container invokes this method before it ends the life of the session object.

setSessionContext(SessionContext ctx)

This sets the associated session context.

The business methods are implemented very similarly to the addUser() method shown in Listing 4.

Listing 4  DatabaseManagerBean's addUser() method

    /**
     * Adds a new User to the Database
     */
    public void addUser( UserInfo user )
    {
       Connection conn = null;
       PreparedStatement statement = null;

       try
       {
           String insert = "INSERT INTO users VALUES (?, ?, ?)";

           conn = getConnection();
           statement = conn.prepareStatement( insert );
           statement.setInt( 1, user.getId() );
           statement.setString( 2, user.getName() );
           statement.setInt( 3, user.getCompany() );

           int rows = statement.executeUpdate();

           if( rows != 1 )
           {
               throw new EJBException( "Unable to insert user: " +
                                       user.getName() );
           }
       }
       catch( SQLException e )
       {
           e.printStackTrace();
           throw new EJBException( e );
       }
       finally
       {
           try
           {
              if( statement != null ) statement.close();
              if( conn != null ) conn.close();
           }
           catch( SQLException e )
           {
               e.printStackTrace();
           }
       }
    }

The addUser() method first declares its database resources, and then builds a JDBC java.sql.PreparedStatement class with an SQL query (update in this case) and executes it. If a database error occurs, the method throws a javax.ejb.EJBException containing the java.sql.SQLException object. The finally block cleans up all of the database resources.

The last method defined in the DatabaseManagerBean class is the getConnection() method. The getConnection() method gets a reference to the JNDI server and then looks up a database connection:

DataSource ds = ( DataSource )

 jndiContext.lookup( "java:comp/env/jdbc/InformIT" );

The name "java:comp/env/jdbc/InformIT" is going to refer to the SQLServerPool that we created earlier; the name will be resolved in the bean's deployment descriptor.

The javax.sql.DataSource interface is the programmatic interface to retrieving a database connection from a JNDI database connection pool. Once the database connection pool has been created, we can simply call the getConnection() method to get a java.sql.Connection. Table 4 shows the methods defined in the DataSource interface.

Table 4

javax.sql.DataSource Interface Methods

Method

Description

Connection getConnection()

Attempts to establish a database connection.

Connection getConnection(String username, String password)

Attempts to establish a database connection.

int getLoginTimeout()

Gets the maximum time in seconds that this data source can wait while attempting to connect to a database.

java.io.PrintWriter getLogWriter()

Gets the log writer for this data source.

void setLoginTimeout(int seconds)

Sets the maximum time in seconds that this data source will wait while attempting to connect to a database.

void setLogWriter(java.io.PrintWriter out)

Sets the log writer for this data source.

ejbActivate()

The activate method is called when the instance is activated from its "passive" state.

The JDBC driver that you use to access your database will implement the DataSource interface and provide implementations for each of its methods.

Compiling

Place all three of these files in the following package:

com.infomit.javasolutions.databasemanager

Place the CompanyInfo and UserInfo classes in the following package:

com.infomit.javasolutions.database

Recall that the directory structure mimics the package:

com/infomit/javasolutions/database

com/infomit/javasolutions/databasemanager

Using the JDK 1.3, compile these five files with the following files added to your CLASSPATH:

YOUR_JBOSS_HOME/lib/ext/ejb.jar
YOUR_JBOSS_HOME/lib/jdbc2_0-stdext.jar

If you're not using the JDK 1.3, you'll need to include JBoss's jndi.jar file.

Deployment

Unlike standard Java applications or applets, EJBs must be deployed to an EJB container. For the EJB container to know the location of the files that comprise the bean and their respective roles, we must develop a deployment descriptor. Listing 5 shows the contents of our deployment descriptor.

Listing 5  DatabaseManager Deployment Descriptor (ejb-jar.xml)

<?xml version="1.0"?>

<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//
                      DTD Enterprise JavaBeans 1.1//EN"
    "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd">

<ejb-jar>
  <display-name>Database Manager</display-name>
  <enterprise-beans>

    <session>
      <ejb-name>DatabaseManagerBean</ejb-name>
      <home>
       com.informit.javasolutions.databasemanager.DatabaseManagerHome
      </home>
      <remote>
        com.informit.javasolutions.databasemanager.DatabaseManager
      </remote>
      <ejb-class>
       com.informit.javasolutions.databasemanager.DatabaseManagerBean
      </ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>

      <!--
        Provide a JNDI link to the database so that this session
        bean can access it through the following string:

        java:comp/env/jdbc/InformIT

        Now it is the responsibility of the EJB Container to map
        jndi/InformIT to the actual JNDI database name.
        -->
      <resource-ref>
          <description>Database connection pool</description>
          <res-ref-name>jdbc/InformIT</res-ref-name>
          <res-type>javax.sql.DataSource</res-type>
          <res-auth>Container</res-auth>
      </resource-ref>

    </session>

  </enterprise-beans>

</ejb-jar>

All deployment descriptors are named ejb-jar.xml and have an <enterprise-beans> tag that defines all entity beans and session beans. Entity beans are defined by an <entity> tag and session beans are defined by a <session> tag. In the DatabaseManager deployment descriptor we have one session bean, and hence one <session> tag.

The <description> tag describes this entity bean, for use with some GUI deployment applications. The <ejb-name> tag names the bean; this name references this bean elsewhere in the ejb-jar.xml file as well as in custom deployment files. The <home> tag defines the fully qualified name of the entity bean's home interface, the <remote> tag defines the fully qualified name of the entity bean's remote interface, and the <ejb-class> tag defines the fully qualified name of the session bean's bean class. The <session-type> tag defines whether the session is "stateless" or "stateful"; in our case, this entry is "stateless".

Inside the <session> tag we have defined a <resource-ref> tag. This tag provides a reference to a resource that's available from within this bean (usually a database connection or another EJB). In this case, we make a javax.sql.DataSource reference available in the DatabaseManager session bean with the name "java:comp/env/jdbc/InformIT". We'll resolve this to our SQLServerPool in the JBoss custom deployment descriptor (jboss.xml).

The second half of this deployment is JBoss's own deployment descriptor (jboss.xml); see Listing 6.

Listing 6  DatabaseManager Deployment Descriptor (jboss.xml)

<?xml version="1.0" encoding="Cp1252"?>

<jboss>
    <secure>false</secure>
    <container-configurations />

    <resource-managers>
      <resource-manager>
        <res-name>jdbc/InformIT</res-name>
        <res-jndi-name>SQLServerPool</res-jndi-name>
      </resource-manager>
    </resource-managers>

    <enterprise-beans>
        <session>
           <ejb-name>DatabaseManagerBean</ejb-name>
           <jndi-name>db/DatabaseManager</jndi-name>
           <configuration-name></configuration-name>
        </session>
    </enterprise-beans>
</jboss>

The JBoss custom deployment descriptor has the root node <jboss>. To resolve our database connection resource reference, we have to create a <resource-manager> that maps a resource name, <res-name> (that the EJB will use), to a JNDI name, <res-jndi-name>. In this case we mapped "java:comp/env/jdbc/InformIT" to "SQLServerPool".

If you don't have a jboss.xml file in your deployment, one is automatically created, but if you define your own you must define the beans that are in your ejb-jar.xml file. The only modification we make to the deployment is that we change the JNDI name of our session bean using the <jndi-name> tag in our <session> tag; we changed the name from "DatabaseManager" to "db/DatabaseManager".

Once you have these deployment descriptors and your classes in place, you must package your EJB into a JAR file with the following directory structure:

com/informit/javasolutions/databasemanager/DatabaseManager.class
com/informit/javasolutions/databasemanager/DatabaseManagerHome.class
com/informit/javasolutions/databasemanager/DatabaseManagerBean.class
com/informit/javasolutions/database/UserInfo.class
com/informit/javasolutions/database/CompanyInfo.class
META-INF/ejb-jar.xml

META-INF/jboss.xml

From the folder that contains your com folder, you can build this JAR file with the following command:

jar cf db.jar com/informit/javasolutions/databasemanager/*.class
              com/informit/javasolutions/database/*.class

              META-INF/*.xml

This will build a file db.jar that contains your entity bean. The last step is to copy this file to the JBoss deploy directory. If you have JBoss running, you can watch the deployment on the text display; if not, start JBoss by executing its run.bat file from its bin directory and look for your bean! You should see something similar to the following:

...
[J2EE Deployer] Create application db.jar
[J2EE Deployer] Installing EJB package: db.jar
[J2EE Deployer] Starting module db.jar
[Container factory] Deploying:file:/D:/jBoss-2.0_FINAL/bin/../tmp/
               deploy/db.jar/ejb1010.jar
[Verifier] Verifying file:/D:/jBoss-2.0_FINAL/bin/../tmp/deploy/
               db.jar/ejb1010.jar
[Container factory] Deploying DatabaseManagerBean
[Container factory] Deployed application: file:/D:/jBoss-2.0_FINAL/
               bin/../tmp/deploy/db.jar/ejb1010.jar
[J2EE Deployer] J2EE application: file:/D:/jBoss-2.0_FINAL/deploy/

               db.jar is deployed.

If you see any exceptions, read through them and try to troubleshoot the problem; most errors are fairly easy to interpret and involve a missing file from the JAR file, a misspelling, or a case-sensitivity issue (uppercase versus lowercase).

Test Client

Once you have your session bean, it's time to write a client that exercises its methods. Listing 7 shows the complete source code for the test client.

Listing 7  Test Client (TestClient.java)

import com.informit.javasolutions.databasemanager.DatabaseManager;
import com.informit.javasolutions.databasemanager.DatabaseManagerHome;
import com.informit.javasolutions.database.CompanyInfo;
import com.informit.javasolutions.database.UserInfo;

// Import the EJB classes
import java.rmi.RemoteException;
import javax.ejb.*;

// Import the JNDI classes
import javax.naming.*;
import javax.rmi.PortableRemoteObject;

// Import the Java Collection classes
import java.util.*;

public class TestClient
{
    public static void main( String[] args )
    {
        System.setProperty( "java.naming.factory.initial",
                          "org.jnp.interfaces.NamingContextFactory");
        System.setProperty( "java.naming.provider.url",
                            "localhost:1099");

        try {
            // Get a naming context
            InitialContext jndiContext = new InitialContext();
            System.out.println("Got context");

            // Get a reference to the Interest Bean
            Object ref  = jndiContext.lookup( "db/DatabaseManager" );
            System.out.println("Got reference");

            // Get a reference from this to the Bean's Home interface
            DatabaseManagerHome home = ( DatabaseManagerHome )
                PortableRemoteObject.narrow( ref,
                                         DatabaseManagerHome.class );
            DatabaseManager db = home.create();


            if( args.length >= 1 )
            {

                // Create some companies
                for( int i=1; i<=20; i++ )
                {
                   CompanyInfo company =
                      new CompanyInfo( i, "Company " + i );
                   db.addCompany( company );
                }

                // Create some users
                for( int i=1; i<=20; i++ )
                {
                   UserInfo user = null;
                   if( i <= 10 )
                      user = new UserInfo( i, "User " + i, 1 );
                   else
                      user = new UserInfo( i, "User " + i, 2 );

                   db.addUser( user );
                }
            }


            // Find our companies and users
            CompanyInfo[] companies = db.findCompanies();
            for( int i=0; i<companies.length; i++ )
            {
               System.out.println( "Company: " +
                                     companies[ i ].getName() );
               int userCount = db.getNumberOfUsers(
                                     companies[ i ].getId() );
               System.out.println( "  Users: " + userCount );
               UserInfo[] users = db.findUsersForCompany(
                                     companies[ i ].getId() );
               for( int j=0; j<users.length; j++ )
               {
                   System.out.println( "   User: " +
                                       users[ j ].getName() );
               }

            }
        }
        catch( Exception e ) {
            e.printStackTrace();
        }

    }
}

To connect to the JBoss JNDI server, we must set a couple of system properties:

System.setProperty( "java.naming.factory.initial",
                    "org.jnp.interfaces.NamingContextFactory");
System.setProperty( "java.naming.provider.url",
                    "localhost:1099");

The naming factory is the class that JNDI will use to locate the JBoss JNDI server and the provider URL is the network location of the machine on which JBoss is running. In our case, we're running on the same machine, and hence we'll use "localhost" on the standard RMI port 1099.

Next, we create an instance of the javax.naming.InitialContext class; this uses the system properties we specified to connect to JBoss. To find the bean we're looking for (DatabaseManagerBean), we use the InitialContext lookup() method; this returns an object reference that we need to resolve to the actual entity bean's home interface. You may read in many books that you can cast this object directly to the home interface, and this will work in almost all cases, but because EJB can be used with CORBA objects through RMI/IIOP, the object is not necessarily a Java object and must be "narrowed." The javax.rmi.PortableRemoteObject class provides a static method narrow() that tests to make sure that the conversion is permissible and returns the correct object.

Once we have a reference to the home interface, we need to create an instance of a class implementing the session bean's remote interface:

DatabaseManager db = home.create();

From there, we create some companies and some users for the first two companies (if any command-line argument is specified), and then we query for the company and its list of users.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020