• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

why to use jboss.xml ?????

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello everbody....!!
in my app i have
web.xml:

<web-app>
...............

<ejb-ref>
<ejb-ref-name>ejb/Funcionario_Session</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>br.com.funcionario.session.FuncionarioHome</home>
<remote>br.com.funcionario.session.Funcionario</remote>
<ejb-link>Funcionario_Session</ejb-link>
</ejb-ref>
................
</web-app>

my ejb-jar:

<ejb-jar>
<enterprise-beans>
<session>
<ejb-name>Funcionario_Session</ejb-name><home>br.com.funcionario.session.FuncionarioHome</home>
<remote>br.com.funcionario.session.Funcionario</remote>
<ejb-class>br.com.funcionario.session.FuncionarioBean</ejb-class>
<session-type>Stateful</session-type>
<transaction-type>Container</transaction-type>
<ejb-local-ref>
<ejb-ref-name>ejb/Funcionario_Entity</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>br.com.funcionario.entity.FuncionarioHome</local-home>
<local>br.com.funcionario.entity.Funcionario</local>
<ejb-link>Funcionario_Entity</ejb-link>
</ejb-local-ref>

</session>

<entity>
<ejb-name>Funcionario_Entity</ejb-name>
<local-home>br.com.funcionario.entity.FuncionarioHome</local-home>
<local>br.com.funcionario.entity.Funcionario</local>
<ejb-class>br.com.funcionario.entity.FuncionarioEntity</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>false</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>Funcionario_Schema</abstract-schema-name>
................
</entity>

</enterprise-beans>

</ejb-jar>

and i have the jboss.xml:
<jboss>

<enterprise-beans>
<session>
<ejb-name>Funcionario_Session</ejb-name>
<jndi-name>ejb/Funcionario_Session</jndi-name>
</session>


<entity>
<ejb-name>Funcionario_Entity</ejb-name>
<jndi-name>ejb/Funcionario_Entity</jndi-name>
</entity>

</enterprise-beans>
<resource-managers>
</resource-managers>
</jboss>



BUT if i remove this file of my app ,,,, she run without none problem..
then so that it serves jboss.xml???
 
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I suppose you mean that after you remove the jboss.xml form the ear it still works. Well I'm no jboss expert, but after you remove the file do the next three tings:
  • Stop the jboss instance.
  • Remove the content of the next two folders: $JBOSS_HOME/server/default/tmp, $JBOSS_HOME/server/default/work (default could be replaced with your own domain).
  • Redeploy the new ear (without the jboss.xml)
  • Start the server.


  • If it still works, than I'd be as puzzled are you are.
    Regards.
     
    Bartender
    Posts: 10336
    Hibernate Eclipse IDE Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Given that jboss.xml is not part of the J2EE spec. and that JBoss is a spec. compliant application server, you should be able to deploy an ear which has no jboss.xml in it. JBoss.xml just contains vendor-specific configuration which is always optional.
    [ July 21, 2005: Message edited by: Paul Sturrock ]
     
    Valentin Tanase
    Ranch Hand
    Posts: 704
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Obvious... Thanks Paul, you're the man here :-)
     
    Author
    Posts: 367
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    The J2EE 2 spec never intended that applications be deployable without vendor specific deployment options. That you may be able to do this in many cases is entirely coincidental. It might even appear to be working, but if you are doing anything with security or any number of other un/under-defined aspects of J2EE apps, your deployment won't make sense.

    The reason this is working in this case is most likely that the ejb-links are fully resolving the bean and there is no need for the explicit JNDI name mappingd in the jboss.xml.
     
    You showed up just in time for the waffles! And this tiny ad:
    Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    reply
      Bookmark Topic Watch Topic
    • New Topic