By default, it seems that the name jndi bean is based on the ear in which it is contained. An EJB named MyBean my-app.ear will be named "my-app / MyBean / local".
How can I change this behavior declaratively? I want the jndi name to be "something-else / MyBean / local". It should be declarative rather than b / c annotation. I cannot change the source of MyBean.java; I only have a can that I pack in my ear for deployment.
You can specify this in jboss.xml
http://docs.jboss.org/ejb3/app-server/reference/build/reference/en/html/jboss_deployment_descriptor.html
jndi-name - , .
:
<jboss> <enterprise-beans> <service> <ejb-class>org.jboss.ejb3.test.service.ServiceSix</ejb-class> <local>org.jboss.ejb3.test.service.ServiceSixLocal</local> <remote>org.jboss.ejb3.test.service.ServiceSixRemote</remote> <management>org.jboss.ejb3.test.service.ServiceSixManagement</management> <jndi-name>serviceSix/remote</jndi-name> <local-jndi-name>serviceSix/local</local-jndi-name> </service> </enterprise-beans> </jboss>
EJB3 ( , ), EJB2 , jboss.xml, EJB JAR META-INF. , EJB.
EJB3 ( , EJB3 -lite), , , :)
Source: https://habr.com/ru/post/1710698/More articles:Can I use Open Type fonts (.otf) in SQL Reporting Services (2008) - fontsSelecting STL vectors - c ++xcode cannot find standard C ++ include file - iphoneUnable to instantiate COM component in C # - error 80070002 - c #DSN per connection string? - asp.netJPA / Hibernate Query returns results - javaHow can I access the IPTV server programmatically? - udpExport ListView to CSV - c #In the Entity Framework, how to specify a condition for an association? - entity-frameworkСоздание окна WPF из WinForms BackgroundWorker - backgroundworkerAll Articles