This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

why to use jboss.xml ?????  RSS feed

 
Paulo Fernandes de Rezende
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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???
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • 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.
     
    Paul Sturrock
    Bartender
    Posts: 10336
    Eclipse IDE Hibernate Java
    • Mark post as helpful
    • send pies
    • 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
    • Quote
    • Report post to moderator
    Obvious... Thanks Paul, you're the man here :-)
     
    norman richards
    Author
    Ranch Hand
    Posts: 367
    • Mark post as helpful
    • send pies
    • 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.
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!