The Message-Driven Bean
The mailconnector message-driven bean, JavaMailMessageBean, activates the resource adapter. When an MDB is deployed, the application server passes the MDB’s activation config properties (commented out in this case) to the mailconnector resource adapter, which forwards it to the polling thread. When the MDB is undeployed, the application server notifies the resource adapter, which notifies the polling thread to stop monitoring the mail folder associated with the MDB being undeployed.
The MDB is packaged in an EJB JAR file.