File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Websphere and the fly likes why WS5.0 ejb-jar.xml is not J2EE complaint??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "why WS5.0 ejb-jar.xml is not J2EE complaint???" Watch "why WS5.0 ejb-jar.xml is not J2EE complaint???" New topic
Author

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

Suttan Pym
Ranch Hand

Joined: Jan 30, 2003
Posts: 46
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

Joined: Aug 10, 2001
Posts: 3892
    
    5
There is no difference between an IBM ejb-jar.xml and one for any other vendor. What makes you think they're different?
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Suttan Pym
Ranch Hand

Joined: Jan 30, 2003
Posts: 46
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

Joined: Apr 02, 2003
Posts: 20
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

Joined: Aug 10, 2001
Posts: 3892
    
    5
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

Joined: Jan 30, 2003
Posts: 46
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

Joined: Aug 05, 2002
Posts: 10
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

Joined: Jan 23, 2002
Posts: 11962
    
    5
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 ]

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: why WS5.0 ejb-jar.xml is not J2EE complaint???