CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/maven-javax--javaee-api

Complete Java Enterprise Edition 8 specification APIs providing all standardized enterprise application development interfaces

Pending
Overview
Eval results
Files

ejb.mddocs/

Enterprise JavaBeans

EJB API for developing enterprise business components with transaction management, security, and lifecycle support.

Session Bean Annotations

@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface Stateless {
    String name() default "";
    String mappedName() default "";
    String description() default "";
}

@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface Stateful {
    String name() default "";
    String mappedName() default "";
    String description() default "";
    String passivationCapable() default "";
}

@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface Singleton {
    String name() default "";
    String mappedName() default "";
    String description() default "";
}

EJB Context

public interface EJBContext {
    EJBHome getEJBHome() throws IllegalStateException;
    EJBLocalHome getEJBLocalHome() throws IllegalStateException;
    Properties getEnvironment();
    Identity getCallerIdentity();
    Principal getCallerPrincipal();
    boolean isCallerInRole(Identity role);
    boolean isCallerInRole(String roleName);
    UserTransaction getUserTransaction() throws IllegalStateException;
    void setRollbackOnly() throws IllegalStateException;
    boolean getRollbackOnly() throws IllegalStateException;
    TimerService getTimerService() throws IllegalStateException;
    Object lookup(String name) throws IllegalArgumentException;
    Map<String, Object> getContextData();
}

Lifecycle Callbacks

@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface PostConstruct;

@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface PreDestroy;

@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface PostActivate;

@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface PrePassivate;

Usage Example

@Stateless
public class UserService {
    
    @PersistenceContext
    private EntityManager em;
    
    @PostConstruct
    public void init() {
        // Initialization logic
    }
    
    public User findUser(Long id) {
        return em.find(User.class, id);
    }
    
    @PreDestroy
    public void cleanup() {
        // Cleanup logic
    }
}

Install with Tessl CLI

npx tessl i tessl/maven-javax--javaee-api

docs

dependency-injection.md

ejb.md

enterprise-services.md

index.md

json-processing.md

messaging.md

persistence.md

rest-services.md

security.md

transactions.md

validation.md

web-services.md

web-technologies.md

xml-binding.md

tile.json