Global module with ejbs

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Global module with ejbs

Nikola Malenic

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?

 


_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: Global module with ejbs

David Lloyd-2
Correct, EJBs are not discovered from modules.  They must be deployed.
On Tue, Nov 27, 2018 at 12:07 PM Nikola Malenic
<[hidden email]> wrote:

>
> 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?
>
>
>
> _______________________________________________
> wildfly-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/wildfly-dev



--
- DML
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: Global module with ejbs

Nikola Malenic
But how does the injection work with other stuff from modules, e.g. EntityManager?

-----Original Message-----
From: David Lloyd [mailto:[hidden email]]
Sent: Tuesday, November 27, 2018 10:46 PM
To: [hidden email]
Cc: WildFly Dev <[hidden email]>
Subject: Re: [wildfly-dev] Global module with ejbs

Correct, EJBs are not discovered from modules.  They must be deployed.
On Tue, Nov 27, 2018 at 12:07 PM Nikola Malenic <[hidden email]> wrote:

>
> 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?
>
>
>
> _______________________________________________
> wildfly-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/wildfly-dev



--
- DML


_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: Global module with ejbs

Scott Marlow

On 11/28/18 4:14 AM, Nikola Malenic wrote:
> But how does the injection work with other stuff from modules, e.g. EntityManager?
>

The EntityManager injection [1] is also not handled for global modules,
since global modules do not get processed as deployments.

If you want to include JPA code in your global module, you could use the
javax.persistence.Persistence API [2] to create the EntityManagerFactory
from which you can get the EntityManager.

Scott

[1]
https://github.com/wildfly/wildfly/blob/master/jpa/subsystem/src/main/java/org/jboss/as/jpa/processor/JPAAnnotationProcessor.java#L80

[2]
https://javaee.github.io/javaee-spec/javadocs/javax/persistence/Persistence.html#createEntityManagerFactory-java.lang.String-java.util.Map-

> -----Original Message-----
> From: David Lloyd [mailto:[hidden email]]
> Sent: Tuesday, November 27, 2018 10:46 PM
> To: [hidden email]
> Cc: WildFly Dev <[hidden email]>
> Subject: Re: [wildfly-dev] Global module with ejbs
>
> Correct, EJBs are not discovered from modules.  They must be deployed.
> On Tue, Nov 27, 2018 at 12:07 PM Nikola Malenic <[hidden email]> wrote:
>>
>> 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?
>>
>>
>>
>> _______________________________________________
>> wildfly-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>
>
>
> --
> - DML
>
>
> _______________________________________________
> wildfly-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev