I am in deep deep trouble right now. I was working on a project where there was a Enterprise application. It contained one ejb module and two web modules. In addition to that the application.xml file had two .sar modules. I was not sure what it was so I commented it to run the code. I am using Netbeans 6. Now I have realized that it was a big mistake and now that mistake is killing me. I don't know how to configure it. There two folders in the ejb module's configuration folder representing the two .sar modules. Both contain a jboss-service.xml file. Now I have to configure it properly and I don't have much time. I know I was a fool and I should have asked this here way early. But now I have to do it anyhow. But I am clueless about what to do. Can someone give me some guidance related to this. What is the correct way to configure it.
1) The contents of your EAR file. Use 'jar -ft xxx.ear' and post the results.
2) Your application.xml file
3) Your jboss-app.xml file, if any.
When posting XML text or source code, please enclose the text in UBBCode "code" tags - you can do this by selecting the text and clicking the Code button above the editor window. Also, click the Preview button to ensure that the formatting is correct and the XML text shows up before posting.
There are two folders named ticket-queue and ticket-booking-queue in the src\conf folder of the EJB module. These folders contain jboss-service.xml. These are the contents of the two xml files respectively
Looks like your EAR no longer contains the SAR modules, so simply uncommenting them in application.xml will not work. Have you done a search in your file system to see if the SAR files are located somewhere? Is there another NetBeans project that builds them? (I'm a little lost here because I don't use NetBeans, so I cannot provide any NetBeans way to get you back to where you were.)
Thanks peter for the help. I just need to know what the structure of the two .sar file should be according to the jboss-service.xml. Then for now I'll create the .sar files manually and look for a solution later on...
Did the .sar have any .class files? Or was it containing only the -service.xml files? If was containing just the -service.xml files, then you need not even create the .SAR.
Anyways - You can create the structure for the sar as follows:
Thanks jaikiran for the help. But I don't know the contents of the .sar files. I just got the code and I had to configure it. But I didn't know what to do with the .Sar modules so I just deleted them from Application.xml. Can you guess about the .sar modules by looking at the jboss-service.xml??
Ankit Garg wrote:Can you guess about the .sar modules by looking at the jboss-service.xml??
Yes Those are meant to configure JMS queues in your application and dont require any other application specific code. And that's what surprised me about the packaging You don't even need a .SAR to configure those - although its no harm creating those .SAR with just these files in META-INF.
Thanks Jaikiran for the help so far. Sorry that I didn't check it before but I found two MDBs in the source code. The code for the two MDBs looks like this
And this is the second one
Now what do I need to do to make this all work. Please can you help me with this.
There are many ways you could package this. I don't know which is the packaging option your team is using. But if you just want to get it working, then you can create a jar file containing these MDB classes and place it in the EAR. Or you can copy those MDB classes to your already mapped Site_Dev-ejb.jar