0

I am trying to make hello world EJB2.1 application in RAD6 with Web sphere application server. But i'm unable to understand that which file i've to edit in RAD6 for doing changes that we do in jboss.xml while using jboss.

Some lines of codes from jboss.xml:-

<ejb-name>HelloWorld</ejb-name>
<jndi-name>myHelloWorld</jndi-name>
skaffman
  • 398,947
  • 96
  • 818
  • 769
Adnan
  • 4,517
  • 15
  • 44
  • 54
  • 1
    If it's in any way possible for you, I advice you to stay well clear of EJB 2.1. It's a disgrace to computer science in general. EJB 3.0 is already over 5 years old, and is so much better. Try to use at least that if you can. – Arjan Tijms Oct 31 '11 at 12:40

1 Answers1

1

Your are luck when you use RAD. This great tool has possibility to edit anything within dedicate ejb-jar.xml editor. Try open ejb-jar.xml, and you will be possible to edit everything related to EJB descriptors. WebSphere has two additional files to describe EJB 2.1 ibm-ejb-jar-bnd.xmi and ibm-ejb-jar-ext.xmi. Both of them is better to edit via RAD editor instead trying to do it manually.

For example ibm-ejb-jar-ext.xmi is:

<ejbbnd:EJBJarBinding xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ejbbnd="ejbbnd.xmi" xmlns:ejb="ejb.xmi" xmi:id="ejb-jar_ID_Bnd">
  <ejbJar href="META-INF/ejb-jar.xml#ejb-jar_ID"/>
  <ejbBindings xmi:id="Session_1_Bnd" jndiName="ejbs/Authentication">
    <enterpriseBean xmi:type="ejb:Session" href="META-INF/ejb-jar.xml#Session_1"/>
  </ejbBindings>
</ejbbnd:EJBJarBinding>

and ibm-ejb-jar-ext.xmi is

<ejbext:EJBJarExtension xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ejbext="ejbext.xmi" xmlns:ejb="ejb.xmi" xmi:id="ejb-jar_ID_Ext">
  <ejbJar href="META-INF/ejb-jar.xml#ejb-jar_ID"/>
  <ejbExtensions xmi:type="ejbext:SessionExtension" xmi:id="Session_1_Ext" timeout="600">
    <enterpriseBean xmi:type="ejb:Session" href="META-INF/ejb-jar.xml#Session_1"/>
    <structure xmi:id="BeanStructure_1" inheritenceRoot="false"/>
    <beanCache xmi:id="BeanCache_1" activateAt="ONCE"/>
    <internationalization xmi:id="BeanInternationalization_1" invocationLocale="CALLER"/>
    <localTran xmi:id="LocalTran_1" boundary="BEAN_METHOD" unresolvedAction="ROLLBACK"/>
  </ejbExtensions>
</ejbext:EJBJarExtension>

So, I suggest to use RAD editor for to change EJB 2.1 descriptors. If your editor doesn't work correctly - you cannot see wndow with most of proterties dividet init tabs, sections. YOu may have ruble with editing EJB descriptors. Try to right click on the ejb-jar.xml and open it with specialized editor (I don'n remember its name, but it is not "xml editor" or "System Default")

Max
  • 842
  • 5
  • 16
  • ok thanks. But when i try to add tag in ejb-jar.xml, RAD6 is giving the error description of which is that "Invalid content was found starting with jndi-name". – Adnan Oct 30 '11 at 19:50
  • jndi-name is not a part of ejb-jar.xml. To specify jndi location of your ejb specification it must be done in another file. This file is server specific: another for JBoss, another for WebSphere, and another for WebLogic. If you use RAD try do this by its editor. You should see desired section. Filling jndi name into this filed, will put value to WebSphere specific file. – Max Oct 30 '11 at 20:17