Global module with ejbs












0















I deployed a global module with remote ejbs defined, but I can't access them from deployed applications.



Here is the interface:



@Remote

public interface ICryptoAPI..



and bean definition:

@Stateless

public class CryptoAPI implements ICryptoAPI ...


How can I find jndi name of the ejbs deployed, since default @Ejb cannot find bean? Just to mention, /subsystem=naming:jndi-view() from jboss-cli doesn't print anything about deployed module and there are no errors in wildfly log.



Maybe, it is not possible to define injectable ejbs in global modules?










share|improve this question



























    0















    I deployed a global module with remote ejbs defined, but I can't access them from deployed applications.



    Here is the interface:



    @Remote

    public interface ICryptoAPI..



    and bean definition:

    @Stateless

    public class CryptoAPI implements ICryptoAPI ...


    How can I find jndi name of the ejbs deployed, since default @Ejb cannot find bean? Just to mention, /subsystem=naming:jndi-view() from jboss-cli doesn't print anything about deployed module and there are no errors in wildfly log.



    Maybe, it is not possible to define injectable ejbs in global modules?










    share|improve this question

























      0












      0








      0








      I deployed a global module with remote ejbs defined, but I can't access them from deployed applications.



      Here is the interface:



      @Remote

      public interface ICryptoAPI..



      and bean definition:

      @Stateless

      public class CryptoAPI implements ICryptoAPI ...


      How can I find jndi name of the ejbs deployed, since default @Ejb cannot find bean? Just to mention, /subsystem=naming:jndi-view() from jboss-cli doesn't print anything about deployed module and there are no errors in wildfly log.



      Maybe, it is not possible to define injectable ejbs in global modules?










      share|improve this question














      I deployed a global module with remote ejbs defined, but I can't access them from deployed applications.



      Here is the interface:



      @Remote

      public interface ICryptoAPI..



      and bean definition:

      @Stateless

      public class CryptoAPI implements ICryptoAPI ...


      How can I find jndi name of the ejbs deployed, since default @Ejb cannot find bean? Just to mention, /subsystem=naming:jndi-view() from jboss-cli doesn't print anything about deployed module and there are no errors in wildfly log.



      Maybe, it is not possible to define injectable ejbs in global modules?







      ejb wildfly jndi






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 27 '18 at 17:43









      MikeMike

      17911




      17911
























          1 Answer
          1






          active

          oldest

          votes


















          0














          The portable JNDI name, an EJB is bound to, depends on how beans are deployed and some configurations (e.g. deployment descriptors).



          In addition to the portable JNDI name, JBoss provides access from a remote VM within the java:jboss/exported namespace.



          For your convenience, JBoss' default logging shows the JNDI names, an EJB is bound to, on console and in the server logfile upon deployment. The logger is org.jboss.as.ejb3.deployment on INFO level.



          Example:



          12:00:00,000 INFO  [org.jboss.as.ejb3.deployment] (MSC service thread 1-6) WFLYEJB0473: JNDI bindings for session bean named 'MyBean' in deployment unit 'subdeployment "my-beans.jar" of deployment "my-app.ear"' are as follows:

          java:global/my-app/my-beans/MyBean!my.package.MyBeanRemote
          java:app/my-beans/MyBean!my.package.MyBeanRemote
          java:module/MyBean!my.package.MyBeanRemote
          java:jboss/exported/my-app/my-beans/MyBean!my.package.MyBeanRemote


          For accesing the EJB, you can do a manual JNDI lookup or use the @EJB annotations lookup method for injection.






          share|improve this answer
























          • But I'm deploying EJB bean inside a global module, not a .ear application and doesn't get any pieces of information in the log.

            – Mike
            Nov 28 '18 at 13:01






          • 1





            How are you deploying an EJB as "global module"? Do you mean a JBoss module? This is not a deployment. It's just providing classes, so no EJBs are deployed at all.

            – Frito
            Nov 28 '18 at 13:31











          • Exactly. Is there a way to register ejb beans inside global jboss module?

            – Mike
            Nov 28 '18 at 13:51






          • 1





            Nope. But why not deploying the "global" EJBs as separate enterprise application?

            – Frito
            Nov 28 '18 at 13:56













          • That's my intention now, but I wanted to make it part of the server.

            – Mike
            Nov 28 '18 at 14:05











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53505293%2fglobal-module-with-ejbs%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          The portable JNDI name, an EJB is bound to, depends on how beans are deployed and some configurations (e.g. deployment descriptors).



          In addition to the portable JNDI name, JBoss provides access from a remote VM within the java:jboss/exported namespace.



          For your convenience, JBoss' default logging shows the JNDI names, an EJB is bound to, on console and in the server logfile upon deployment. The logger is org.jboss.as.ejb3.deployment on INFO level.



          Example:



          12:00:00,000 INFO  [org.jboss.as.ejb3.deployment] (MSC service thread 1-6) WFLYEJB0473: JNDI bindings for session bean named 'MyBean' in deployment unit 'subdeployment "my-beans.jar" of deployment "my-app.ear"' are as follows:

          java:global/my-app/my-beans/MyBean!my.package.MyBeanRemote
          java:app/my-beans/MyBean!my.package.MyBeanRemote
          java:module/MyBean!my.package.MyBeanRemote
          java:jboss/exported/my-app/my-beans/MyBean!my.package.MyBeanRemote


          For accesing the EJB, you can do a manual JNDI lookup or use the @EJB annotations lookup method for injection.






          share|improve this answer
























          • But I'm deploying EJB bean inside a global module, not a .ear application and doesn't get any pieces of information in the log.

            – Mike
            Nov 28 '18 at 13:01






          • 1





            How are you deploying an EJB as "global module"? Do you mean a JBoss module? This is not a deployment. It's just providing classes, so no EJBs are deployed at all.

            – Frito
            Nov 28 '18 at 13:31











          • Exactly. Is there a way to register ejb beans inside global jboss module?

            – Mike
            Nov 28 '18 at 13:51






          • 1





            Nope. But why not deploying the "global" EJBs as separate enterprise application?

            – Frito
            Nov 28 '18 at 13:56













          • That's my intention now, but I wanted to make it part of the server.

            – Mike
            Nov 28 '18 at 14:05
















          0














          The portable JNDI name, an EJB is bound to, depends on how beans are deployed and some configurations (e.g. deployment descriptors).



          In addition to the portable JNDI name, JBoss provides access from a remote VM within the java:jboss/exported namespace.



          For your convenience, JBoss' default logging shows the JNDI names, an EJB is bound to, on console and in the server logfile upon deployment. The logger is org.jboss.as.ejb3.deployment on INFO level.



          Example:



          12:00:00,000 INFO  [org.jboss.as.ejb3.deployment] (MSC service thread 1-6) WFLYEJB0473: JNDI bindings for session bean named 'MyBean' in deployment unit 'subdeployment "my-beans.jar" of deployment "my-app.ear"' are as follows:

          java:global/my-app/my-beans/MyBean!my.package.MyBeanRemote
          java:app/my-beans/MyBean!my.package.MyBeanRemote
          java:module/MyBean!my.package.MyBeanRemote
          java:jboss/exported/my-app/my-beans/MyBean!my.package.MyBeanRemote


          For accesing the EJB, you can do a manual JNDI lookup or use the @EJB annotations lookup method for injection.






          share|improve this answer
























          • But I'm deploying EJB bean inside a global module, not a .ear application and doesn't get any pieces of information in the log.

            – Mike
            Nov 28 '18 at 13:01






          • 1





            How are you deploying an EJB as "global module"? Do you mean a JBoss module? This is not a deployment. It's just providing classes, so no EJBs are deployed at all.

            – Frito
            Nov 28 '18 at 13:31











          • Exactly. Is there a way to register ejb beans inside global jboss module?

            – Mike
            Nov 28 '18 at 13:51






          • 1





            Nope. But why not deploying the "global" EJBs as separate enterprise application?

            – Frito
            Nov 28 '18 at 13:56













          • That's my intention now, but I wanted to make it part of the server.

            – Mike
            Nov 28 '18 at 14:05














          0












          0








          0







          The portable JNDI name, an EJB is bound to, depends on how beans are deployed and some configurations (e.g. deployment descriptors).



          In addition to the portable JNDI name, JBoss provides access from a remote VM within the java:jboss/exported namespace.



          For your convenience, JBoss' default logging shows the JNDI names, an EJB is bound to, on console and in the server logfile upon deployment. The logger is org.jboss.as.ejb3.deployment on INFO level.



          Example:



          12:00:00,000 INFO  [org.jboss.as.ejb3.deployment] (MSC service thread 1-6) WFLYEJB0473: JNDI bindings for session bean named 'MyBean' in deployment unit 'subdeployment "my-beans.jar" of deployment "my-app.ear"' are as follows:

          java:global/my-app/my-beans/MyBean!my.package.MyBeanRemote
          java:app/my-beans/MyBean!my.package.MyBeanRemote
          java:module/MyBean!my.package.MyBeanRemote
          java:jboss/exported/my-app/my-beans/MyBean!my.package.MyBeanRemote


          For accesing the EJB, you can do a manual JNDI lookup or use the @EJB annotations lookup method for injection.






          share|improve this answer













          The portable JNDI name, an EJB is bound to, depends on how beans are deployed and some configurations (e.g. deployment descriptors).



          In addition to the portable JNDI name, JBoss provides access from a remote VM within the java:jboss/exported namespace.



          For your convenience, JBoss' default logging shows the JNDI names, an EJB is bound to, on console and in the server logfile upon deployment. The logger is org.jboss.as.ejb3.deployment on INFO level.



          Example:



          12:00:00,000 INFO  [org.jboss.as.ejb3.deployment] (MSC service thread 1-6) WFLYEJB0473: JNDI bindings for session bean named 'MyBean' in deployment unit 'subdeployment "my-beans.jar" of deployment "my-app.ear"' are as follows:

          java:global/my-app/my-beans/MyBean!my.package.MyBeanRemote
          java:app/my-beans/MyBean!my.package.MyBeanRemote
          java:module/MyBean!my.package.MyBeanRemote
          java:jboss/exported/my-app/my-beans/MyBean!my.package.MyBeanRemote


          For accesing the EJB, you can do a manual JNDI lookup or use the @EJB annotations lookup method for injection.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 28 '18 at 12:36









          FritoFrito

          36110




          36110













          • But I'm deploying EJB bean inside a global module, not a .ear application and doesn't get any pieces of information in the log.

            – Mike
            Nov 28 '18 at 13:01






          • 1





            How are you deploying an EJB as "global module"? Do you mean a JBoss module? This is not a deployment. It's just providing classes, so no EJBs are deployed at all.

            – Frito
            Nov 28 '18 at 13:31











          • Exactly. Is there a way to register ejb beans inside global jboss module?

            – Mike
            Nov 28 '18 at 13:51






          • 1





            Nope. But why not deploying the "global" EJBs as separate enterprise application?

            – Frito
            Nov 28 '18 at 13:56













          • That's my intention now, but I wanted to make it part of the server.

            – Mike
            Nov 28 '18 at 14:05



















          • But I'm deploying EJB bean inside a global module, not a .ear application and doesn't get any pieces of information in the log.

            – Mike
            Nov 28 '18 at 13:01






          • 1





            How are you deploying an EJB as "global module"? Do you mean a JBoss module? This is not a deployment. It's just providing classes, so no EJBs are deployed at all.

            – Frito
            Nov 28 '18 at 13:31











          • Exactly. Is there a way to register ejb beans inside global jboss module?

            – Mike
            Nov 28 '18 at 13:51






          • 1





            Nope. But why not deploying the "global" EJBs as separate enterprise application?

            – Frito
            Nov 28 '18 at 13:56













          • That's my intention now, but I wanted to make it part of the server.

            – Mike
            Nov 28 '18 at 14:05

















          But I'm deploying EJB bean inside a global module, not a .ear application and doesn't get any pieces of information in the log.

          – Mike
          Nov 28 '18 at 13:01





          But I'm deploying EJB bean inside a global module, not a .ear application and doesn't get any pieces of information in the log.

          – Mike
          Nov 28 '18 at 13:01




          1




          1





          How are you deploying an EJB as "global module"? Do you mean a JBoss module? This is not a deployment. It's just providing classes, so no EJBs are deployed at all.

          – Frito
          Nov 28 '18 at 13:31





          How are you deploying an EJB as "global module"? Do you mean a JBoss module? This is not a deployment. It's just providing classes, so no EJBs are deployed at all.

          – Frito
          Nov 28 '18 at 13:31













          Exactly. Is there a way to register ejb beans inside global jboss module?

          – Mike
          Nov 28 '18 at 13:51





          Exactly. Is there a way to register ejb beans inside global jboss module?

          – Mike
          Nov 28 '18 at 13:51




          1




          1





          Nope. But why not deploying the "global" EJBs as separate enterprise application?

          – Frito
          Nov 28 '18 at 13:56







          Nope. But why not deploying the "global" EJBs as separate enterprise application?

          – Frito
          Nov 28 '18 at 13:56















          That's my intention now, but I wanted to make it part of the server.

          – Mike
          Nov 28 '18 at 14:05





          That's my intention now, but I wanted to make it part of the server.

          – Mike
          Nov 28 '18 at 14:05




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53505293%2fglobal-module-with-ejbs%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

          Calculate evaluation metrics using cross_val_predict sklearn

          Insert data from modal to MySQL (multiple modal on website)