How is it determined which type of bean will be used in the application? Wildfly supports both the web and the full JEE 7 profile, which means it implements both EJB and EJB lite. For example, I want to configure the application so that it only uses the EJB lite, how can I achieve this?

    1 answer 1

    EJB Light represents a part (the most used part) of the functional as compared to a full-fledged EJB , which in theory should allow launching applications based on EJB Light on more lightweight versions of application servers (application server) called the jee web-profile . Servers implementing web-profile can be viewed here .

    EJB Light 3.2 supports everything the same as EJB 3.2 except:

    • Remote interfaces (remote interfaces)
    • Message-Driven Beans
    • Endpoints for JAX-WS Web Services

    • RMI-IIOP

    • The persistent attribute for the @Schedule annotation (implements cron-like running methods)

    How is it determined which type of bean will be used in the application? That is, how can you understand / configure whether to use EJB Lite or full-featured EJBs?

    It depends on the server itself and on whether it implements the full Java EE specification ( Full Platform ) or Web Profile . But of course, if you use functions that are not supported in the Web Profile then such an application will not run on the server implementing Web Profile . Also, if the server implements the Full Platform it doesn’t matter whether you use a function from EJB Lite or EJB , the same EJB 3.2 Full API engine will be used.


    Judging by the documentation WildFly web profile is launched by default, to change the mode of operation ( Full Plaform <-> Web Profile ) you need to start the server with different configurations.

    For example (running Full Plaform ):

     ./standalone.sh --server-config=standalone-full-ha.xml 

    The configuration defines the connected server modules block extensions . The differences between the Full Platform for the server version 10.1.0.CR1 are the following modules:

     <extension module="org.jboss.as.jsr77"/> <extension module="org.wildfly.extension.messaging-activemq"/> <extension module="org.wildfly.iiop-openjdk"/> 
    • You did not answer my question at all. I know the difference between profiles and between EJBs, I know that my server implements both the web and the full profile. I want to understand how I can configure what type of EJB should I use on the server? - Janislav Kornev
    • Ok, closer to the truth. I will edit the question to make it clearer. Wildlfly implements the full EE profile, and I can use all the features of an EJB, but, for example, I want the server to launch components as an EJB lite, how to achieve this? - Janislav Kornev
    • That is, no way to use EJB lite will work? Maybe I got the wrong source, but after all, EJB lite is more lightweight and faster to execute, or am I wrong? Then why not use them if I need only a part of the functionality? - Janislav Kornev
    • I thank you for your patience and for the answer, but I still can not understand whether the EJB lite will work faster? - Janislav Kornev
    • one
      Look at the configuration here: docs.jboss.org/author/display/WFLY8/… . Judging by the documentation Web profile is used by default. - Mikhailov Valentine