Showing results for 
Search instead for 
Did you mean: 

parsing ejb-jar.xml using jaxb

Former Member
0 Kudos

hi all,

how to parse the ejb-jar.xml using jaxb? can anybody send the information about the API which we have to use to parse the ejb-jar.xml? (ejb2.0)

i need the details about all ejbs in an application, (like jndi name, Home and Remote name). so, how can i parse the ejb descriptors?



Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Panneer,

Well, parsing the EJB descriptors is, in principle, a task for the EJB container where they are deployed. From what you wrote I assume that you need to gather that kind of info to visualize in some (monitoring?) tool. Is that correct?

If so, the question would be whether you have access to the EJB jar on the file system (before it's deployed) or you can only connect to the server with the already deployed EJBs. In the latter case, this information is shown in the [NWA plugins|]. There are also some [telnet commands|] in NW 04 and 7.0 (04s).

If you have access to the EJB jar file, you can parse the descriptors using DOM or SAX, but I'm not aware of any pre-defined JAXB API for this purpose. Probably you can also generate the mapped classes yourself and use them, however I'm not sure how that works with DTD (because of EJB 2.0).


\-- Vladimir

Answers (0)