wood burning stoves 2.0*
The moose likes JBoss/WildFly and the fly likes Jboss5.1 Migration to JBoss7.1 Custom-JNDI-Handling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Jboss5.1 Migration to JBoss7.1 Custom-JNDI-Handling" Watch "Jboss5.1 Migration to JBoss7.1 Custom-JNDI-Handling" New topic

Jboss5.1 Migration to JBoss7.1 Custom-JNDI-Handling

Gary Dux

Joined: Aug 14, 2008
Posts: 5
Hello together,

in our applications we used to define jndi-mappings in jboss.xml:
<?xml version="1.0" encoding="UTF-8"?>

ithis jboss.xml was placed then in META-INF of that ejb-jar

So it was easy to lookup for that bean like:

public static ContractPortfolioProcessService lookupContractPortfolioProcessService()
throws NamingException {
final Context context = new InitialContext();
return (ContractPortfolioProcessService ) context.lookup("com/fja/ipl/customer/ilis/contractportfolio/ContractPortfolioProcessService");

How can it be made on JBOSS7?

Due ejb3-spec in JBOSS7 they can also define jboss-ejb3.xml like this:
<jboss:ejb-jar xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd
http://java.sun.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-spec-2_0.xsd
urn:iiop jboss-ejb-iiop_1_0.xsd"


It deploys also errorless. But i did not find any dokumentation to lookup my ejb like in example above.

Who can help me giving a hint in this case?

How is the jndi.properties-Configuration would be in this case?

It is sorta covered in the JavaRanch Style Guide.
subject: Jboss5.1 Migration to JBoss7.1 Custom-JNDI-Handling
Similar Threads
Error in
Jboss7 IIOP-Client
Error while calling EJB
javax.naming.NameNotFoundException: MyQueueName not bound
EJB3 Stateless Session Bean deployment failure on JBOSS 5.1.0 GA