IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Wildfly/JBoss Java Discussion :

Nommage des ejb3


Sujet :

Wildfly/JBoss Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Nouveau membre du Club
    Profil pro
    Inscrit en
    Avril 2002
    Messages
    6
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2002
    Messages : 6
    Par défaut Nommage des ejb3
    J'ai un ejb stateless qui s'appel UserFacadeBean et son interface UserFacade. Dans mon client (application web) pour le récupérer j'utilise:
    ctx.lookup("hello/UserFacadeBean/local"); oû hello et le nom de mon .ear.
    Sous jboss ca marche niquel. Mais sous glassfish, il ne me trouve pas cet EJB pourtant il est bien déployer: not found ou not bound.

    L'utilisation "<nom-ear>/<nom-ejb>/local" ou /remote, n'est-elle pas standard ?

  2. #2
    Membre émérite Avatar de XmasRock
    Inscrit en
    Janvier 2007
    Messages
    729
    Détails du profil
    Informations forums :
    Inscription : Janvier 2007
    Messages : 729
    Par défaut
    Et non, ce n'est pas standard. Dans la Doc de JBoss EJB3:
    Chapter 1. @EJB and <ejb-ref>

    Rules for the @EJB annotation

    * The @EJB annotation also has a mappedName() attribute. The specification leaves this a vendor specific metadata, but JBoss recognizes mappedName() as the global JNDI name of the EJB you are referencing. If you have specified a mappedName(), then all other attributes are ignored and this global JNDI name is used for binding.
    * If you specify @EJB with no attributes defined:

    @EJB ProcessPayment myEjbref;

    Then the following rules apply:
    o The EJB jar of the referencing bean is contained in is search for another EJB with the same interface. If there are more than one EJB that publishes same business interface, throw an exception, if there is one, use that one.
    o Search the EAR for EJBs that publish that interface. If there are duplicates, throw an exception, otherwise return that one.
    o Search globally in JBoss for an EJB of that interface. Again, if duplicates, throw an exception
    * @EJB.beanName() corresponds to <ejb-link>. If the beanName() is defined, then use the same algorithm as @EJB with no attributes defined except use the beanName() as a key in the search. An exception to this rule is if you use the ejb-link '#' syntax. The '#' syntax allows you to put a relative path to a jar in the EAR where the EJB you are referencing lives. See spec for more details

    For XML the same rules apply as annotations exception <mapped-name> is the ejb-jar.xml equivalent to @EJB.mappedName().

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [Nommage des variables] Y a-t-il une normalisation ?
    Par Oberown dans le forum Framework .NET
    Réponses: 1
    Dernier message: 22/08/2006, 17h10
  2. [WinCVS] Gestion du nommage des révisions
    Par effree dans le forum CVS
    Réponses: 1
    Dernier message: 15/05/2006, 23h46
  3. [Jboss+Eclipse] Cherche tutoriel pour créer des EJB3
    Par ericw78 dans le forum Eclipse Java
    Réponses: 5
    Dernier message: 26/08/2005, 16h50
  4. [JAAS] Accès à des EJB3 déployé sous JBoss
    Par MustaghAttack dans le forum Java EE
    Réponses: 6
    Dernier message: 22/08/2005, 13h24
  5. Regle de nommage des versions
    Par Jay dans le forum Windows
    Réponses: 5
    Dernier message: 24/11/2003, 09h26

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo