Jason, I have just been talking to another user about this very problem. Some of it stems from the assumptions ejbjar makes about the way files are named and some stems, as you point out, from the limitations of the weblogic CMP dtd.
In general ejbjar finds the files it is going to process based on the beanname prefix you use on the ejb-jar.xml file. So for example, if you have a bean fubar, the ejbjar task looks for the following files Fubar-ejb-jar.xml Fubar-weblogic-ejb-jar.xml Fubar-weblogic-cmp-rdbms-jar.xml When ejbjar builds its jarfile, however, it maps these files, wherever they occur on your filesystem to logical names within the jar file as follows Fubar-ejb-jar.xml -> META-INF/ejb-jar.xml Fubar-weblogic-ejb-jar.xml -> META-INF/weblogic-ejb-jar.xml Fubar-weblogic-cmp-rdbms-jar.xml -> META-INF/weblogic-cmp-rdbms-jar.xml There is no need to have these in a META-INF directory, for example. Now since there can be only one weblogic-cmp-rdbms-jar.xml file and it can only support one bean, ejbjar still really works best on a bean-per-jar basis. In fact, the Fubar-weblogic-ejb-jar.xml files will need to have an entry <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage> even though the content is in a file Fubar-weblogic-cmp-rdbms-jar.xml. How to fix it? One way would be to have ejbjar parse the weblogic-ejb-jar.xml file and determine the cmp files required. These could then be included automatically with or without some form of standard mapping / naming convention. The second would be to allow additional directories/files to be specified which could be added to the final jar. This may be the quickest solution but is, in a way, less appealing to me. It seems to say that the task is doing the wrong thing and we are really fooling it (since it is looking for the wrong CMP file) and then manually adding in the bits the task should have added. Thoughts? Conor > -----Original Message----- > From: Jason Dillon [mailto:[EMAIL PROTECTED] > Sent: Wednesday, 4 October 2000 5:57 > To: [EMAIL PROTECTED] > Subject: RE: Problem with WeblogicDeploymentTool & multiple entity beans > > > I am currently using ejbjar to build one jar file that contains multipule > beans (currently one entity and 1+ session beans) and it works fine. I > just now ran into the problem when trying to add more than one entity > bean. The problem is that WebLogic's weblogic-rdbms-bean xml file format > does not support more than one entity bean (rather silly if you ask me). > > I was thinking about a mechanism to specify extra files to include in the > jar file. WeblogicDeploymentTool could then use this information (tack on > the prefix that it is using) and include files that are available. > > --jason > > On Wed, 4 Oct 2000, Conor MacNeill wrote: > > > Jason, > > > > ejbjar was originally intended to build 1 bean per jar. That is > the way we > > use it and all deployment descriptors, both the standard one and the > > weblogic extension ones, are prefixed with the bean name. > > > > John Hall provided a patch to ejbjar to allow it to generate a > single jar. I > > haven't used that capability, however, and I am not quite sure > how it would > > handle your situation. > > > > Conor > > > > > -----Original Message----- > > > From: Jason Dillon [mailto:[EMAIL PROTECTED] > > > Sent: Tuesday, 3 October 2000 14:26 > > > To: [EMAIL PROTECTED] > > > Subject: Problem with WeblogicDeploymentTool & multiple entity beans > > > > > > > > > Hey, I noticed that the WeblogicDeploymentTool doesn't seem > to have any > > > support for generating a jar file with more than one > > > *-weblogic-cmp-rdbms-jar.xml file. It looks like WebLogic's > cmp xml file > > > can only contain field mappings for one entity bean. Thus you can not > > > build an ejb-jar file from ant if you have more than one enity bean. > > > > > > I was wondering what you think might be the best solution to > this? I was > > > thinking to just add something to WeblogicDeploymentTool, but > I could see > > > that tools others might want to have other files included as well. > > > > > > Any ideas? > > > > > > --jason > > > > > > >
