Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why WS5.0 ejb-jar.xml is not J2EE complaint???

 
Suttan Pym
Ranch Hand
Posts: 46
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
As WebSphere is J2EE compliant, there should not be any difference in the ejb-jar.xml used in other AppServers and WebSphere. But it is seen
that the ejb-jar.xml created using "Application Assembly Tool" is an ejb-jar.xml very specific to WebSphere. So now we have one common ejb-jar.xml
for Pramati, WebLogic abd Borland. But only for WebSphere we have to make a different.
Is there any way to import an existing ejb-jar.xml?
Please correct me if I am wrong and if there is an option for importing please give me info for the same.
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no difference between an IBM ejb-jar.xml and one for any other vendor. What makes you think they're different?
Kyle
 
Suttan Pym
Ranch Hand
Posts: 46
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kyle,
The ejb-jar.xml and the corresponding created xmi files using AAT are interlinked using id's. Now only in the case of WebSphere I have seen the usage of id. All other AppServers (WebLogic, Pramati, Borland) does not use the id. So for all other AppServers we have a common copy of ejb-jar.xml but in the case of WebSphere we require to maintain a different copy.
Also if AAT had provided a facility to import an existing ejb-jar.xml and then make its own using ejb-jar.xml with id's then also it would have been great, so that we need to make changes in only one area and then import it using AAT and it updates the WebSphere specific DD's.
Yes, I went through the specs and found that id could be used, but is there any specific reason why IBM require id's while all others could do the mapping between ejb-jar.xml and AppServer specific DD?
Thanks,
Suttan
 
Lakshmanan NS
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, This is not true. Being worked in both weblogic and websphere, i feel websphere is more sticking to J2EE standards than weblogic. Giving ids for every tag in ejb-jar.xml is part of the DTD specs from SUN. Weblogic is convinently don't need it because it is an optional attribute according to the DTD. In fact if you introduce the id attribute, WebLogic doesn't complain and works fine. So, if you want to have a common ejb-jar.xml, try putting the id tags which will work both in websphere and weblogic.
Also, the AAT (atlest WAS 5.0) generates its own ids if the id tags are not present.
I think as a best practice, it is always better to use IDs (which has no business meaning and only required to uniquely identify the entity) than using any other tags within a tag.
Lakshman
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Suttan Pym:
Hi Kyle,
The ejb-jar.xml and the corresponding created xmi files using AAT are interlinked using id's. Now only in the case of WebSphere I have seen the usage of id. All other AppServers (WebLogic, Pramati, Borland) does not use the id. So for all other AppServers we have a common copy of ejb-jar.xml but in the case of WebSphere we require to maintain a different copy.
Also if AAT had provided a facility to import an existing ejb-jar.xml and then make its own using ejb-jar.xml with id's then also it would have been great, so that we need to make changes in only one area and then import it using AAT and it updates the WebSphere specific DD's.
Yes, I went through the specs and found that id could be used, but is there any specific reason why IBM require id's while all others could do the mapping between ejb-jar.xml and AppServer specific DD?
Thanks,
Suttan

Ids are an optional part of any XML element. They are not disallowed by the spec, in fact, they are implicitly allowed. The reason we use ID's is because it gives us extremely fine-grained identification of XML elements. Are you saying that you take an IBM-generated ejb-jar.xml with ID's and that another server can't parse it? If so, then THAT server is in violation of the J2EE spec (for not being able to parse perfectly valid and well-formed XML within the DTD described in the spec) rather than WebSphere!
Kyle
 
Suttan Pym
Ranch Hand
Posts: 46
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kyle,
Thanks a lot for the info. I am testing the ejb-jar.xml with ids with other AppServers.
Thanks,
Suttan
 
Torsten Friebe
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But the WebSphere specific ID's interfere with very helpful tools such as Xdoclet. To migrate our application from JBoss, Weblogic to IBM Websphere we have to break the Ant-based deployment process and are forced to call the AAT.
This is still unsatisfying. A solution which helps to generate the specific IDs with Ant would be great.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know if this is doable, but could you perhaps write an XSLT document to add the element IDs if missing.
At least it should be easy from the Ant point of view:

[ May 05, 2003: Message edited by: Lasse Koskela ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic