Good time, dear.

Here is an example of a simple Stateless / Stateful Session Beans . There are two maven modules compiled into one pom file. I executed this example. Hardened him in Jboss . But damn it, how can I use it in my program. It is a calculator ( @Remote interface RemoteCalculator ). How do I pull it?

In RemoteEJBClient.java there is a public static main . But why is she there if it all rushes to the server?

    1 answer 1

    In the README, for example, it is written:

    There are two components to this example:

    1. A server side component:

      The server component is comprised of a stateful EJB and a stateless EJB. It provides you with the JAR file that has been deployed. 2. A remote client application that accesses the server component.

      The remote client application depends on the server component. This application looks up to the stateless and stateful beans through a number of methods for them.

    Deploy the server part on the server, run the client as a java application, from the java RemoteEJBClient console should work.

    Build and Deploy the Quickstart

    You can’t use the quickstarts. You must follow this quickstart.

    1. Make sure you have started the JBoss server. See the instructions in the previous section.
    2. Ezb-remote quickstart directory
    3. Build and install the server side component:
      • Navigate to the server-side subdirectory:

        cd server-side * Majors repository.

         mvn clean install * Deploy the EJB JAR to your server. This maven goal will deploy 

        server-side/target/jboss-ejb-remote-server-side.jar . You can check the deployment.

         mvn jboss-as:deploy 
        1. Build and run the client application

          • Navigate to the server-side subdirectory:

          cd ../client * Compile the client code

          mvn clean compile * Execute the client application within Maven

          mvn exec: exec

    Own, what is there to understand?

    • You see, pom-nicks confuse me. Did you watch the main pom.xml? it also clearly shows that the whole project consists of 2 modules: <modules> <module> server-side </ module> <module> client </ module> </ modules> Plus, I was knocked down by the fact that in the server-side plugin : <plugin> <groupId> org.apache.maven.plugins </ groupId> <artifactId> maven-ejb-plugin </ artifactId> <version> $ {version.ejb.plugin} </ version> </ plugin> is going Remote client-jar-jar-nick.%) I have to do 2 separate projects: server-side (add 2 jar) and client-client application. So? if yes, then my mistakes are piling up ... = ( - nightin_gale
    • everything! Hooray!!! earned! did everything as written above. strange, last time I did the same thing, and no way .... thanks for your attention! - nightin_gale