LSPS documentation logo
LSPS Documentation
Configuring SDK Embedded Server

Configuring Mail Server of SDK Embedded Server

To configure the SMTP settings of SDK Embedded Server, set the respective properties in the mail/LSPS_MAIL element of the<APP>-embedded/conf/conf/openejb.xml file:

mail.transport.protocol=smtp
mail.smtp.host=mailsmtp.whitestein.com
mail.smtp.port=25
mail.from=<YOUR@EMAIL.com>
mail.smtp.user=lsps_user
mail.smtp.auth=true
mail.smtp.starttls.enable=true
mail.smtp.password=<PASSWORD>
password=<PASSWORD>

Important: SDK Embedded Server fails to communicate with an SMTP server that requires MD5Digest authentication. This causes the sendEmail() calls to fail. To force another authentication method, specify the following property in the <APP>-embedded/conf/conf/openejb.xml file: mail.smtp.sasl.mechanisms=PLAIN

Configuring Data Source of SDK Embedded Server

To add a data source to the SDK Embedded server, do the following:

  1. In <YOUR_APP>-embedded/conf/conf/openejb.xml, define the resource and its properties.

    Example mysql data source

    ...
        JdbcUrl jdbc:h2:tcp://localhost/./h2/h2;MVCC=TRUE;LOCK_TIMEOUT=60000
        Username lsps
        Password lsps
      </Resource>
      <!-- adding this Resource tag:-->
      <Resource id="jdbc/USERS_DS" type="javax.sql.DataSource">
        JdbcDriver com.mysql.cj.jdbc.Driver
        JdbcUrl jdbc:mysql://localhost:3306/training_users;
        Username root
        Password root
      </Resource>
    
  2. Restart the server.

Now you can map a data type model to the data source:

  1. In the Outline view, click the root node of the hierarchy.
  2. In the Properties view of the data type hierarchy, set database to resource id.
  3. Set the table name prefix so you can identify your tables easily.
  4. Upload the modules to create the database tables.

You can also create entities for the data base entries and use them via EJBs with EntityManager.

Deleting the System Database of SDK Embedded Server

To delete the system database of SDK Embedded Server, remove the h2 directory in the <YOUR_APP>-embedded project.