Jakarta Activation

Jakarta Activation (JAF; formerly JavaBeans Activation Framework) is a Jakarta EE API that enables developers to:
It also enables developers to dynamically register types of arbitrary data and actions associated with particular kinds of data. Additionally, it enables a program to dynamically provide or retrieve JavaBeans that implement actions associated with some kind of data. Originally an extension API, it was available as a standard API in Java SE (from Java SE 6 on) and Java EE, but was removed in Java SE 11.
Example: Compose an e-mail with attachment.
import javax.activation.DataHandler;
import javax.activation.FileDataSource;
import javax.mail.internet.*;
import javax.mail.*;
// Create a message.
MimeMessage message = new MimeMessage(session);
// Create the Multipart to be added the parts to
Multipart multipart= new MimeMultipart();
// Create and fill the first text message part
MimeBodyPart mbp = new MimeBodyPart();
mbp.setText("Body");
multipart.addBodyPart(mbp);
// Create a file attachment and fill as second message part
MimeBodyPart mbp = new MimeBodyPart();
FileDataSource fds = new FileDataSource("C:\\attachment.zip");
mbp.setDataHandler(new DataHandler(fds));
mbp.setFileName(fds.getName());
multipart.addBodyPart(mbp);
// Add the multipart to the message
message.setContent(multipart);