ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hall, John" <jh...@solant.com>
Subject RE: Weblogic 5.1 task (ejbc alternative)
Date Wed, 16 Aug 2000 15:04:52 GMT
Hey Wolfgang,

The current ejbjar task works like this:

Using your example below, the task is expecting you to use a naming standard
for your XML descriptors:
Person-ejb-jar.xml
Person-weblogic-ejb-jar.xml
This will create a jar file with the name Person-wl.jar (assuming you are
using the wl suffix).

The srcdir parameter for the task is the root of your source tree AND the
expected location of all of your deployment descriptors.

So in order to use the task you will have to copy your descriptors from
<base>/src/de/picturesafe/adam/ejb/person/WEB-INF/ to <base>/src using the
copyfile task (your destination file name will need to comply with the
expected naming standard).

Our source code tree is set up in the same manner as yours.  I know that
Conor (and possibly the original task author, Tim Fennell) is exploring the
idea of altering the task to support this kind of source tree. But there
were some other changes involving support for multiple ClassLoaders for ejbc
that needed to get in first.  Hopefully this change will go into a near-term
future release.

john

-----Original Message-----
From: Wolfgang Werner [mailto:wwerner@picturesafe.de]
Sent: Wednesday, August 16, 2000 4:32 AM
To: ant-dev@jakarta.apache.org
Subject: AW: Weblogic 5.1 task (ejbc alternative)


Hi Conor,

> There is a task already for EJB 1.1 jars. It is known as ejbjar. It does
> make certain assumptions about the layout of your source tree and
> the naming
> of deployment descriptor xml files. Not everyone uses this
> convention and it
> is this issue that the com.rocket.* submission is addressing. Personally I
> would like to see a single task which can accommodate the various
> approaches
> to structuring EJB source trees and their deployment descriptors.

thanks for the fast reply. I managed to get the EjbJar task compiled in
(oh yes, the -Dejb.build=true setting...) but I do not get it to work.

My source layout looks like this: There is a directory for every bean:

	<base>/build.xml
	<base>/src/de/picturesafe/adam/ejb/person

In this directory are these files;

	Home interface         PersonHome.java
	Remote interface       Person.java
	Business interface     PersonBusiness.java
	Bean implementation    PersonBean.java
	PK                     PersonPK.java


	WEB-INF/ejb-jar.xml
	WEB-INF/weblogic-ejb-jar.xml

I would like to have this setup for every single ejb.

Can you give me a hint what I do have to put in my build.xml file? I tried

    <ejbjar
    	srcdir="src"
      destdir="../build/classes"
      generateweblogic = "true"
      keepgeneric = "true"
    	basenameterminator = "-"
    	genericjarsuffix = "-generic.jar"
    	weblogicjarsuffix = "-wl.jar"
    />

But I get an Exception:

--> I do have only one DD!!

  [ejbjar] 476 deployment descriptors located.

BUILD FAILED

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
       at java.lang.String.substring(Unknown Source)
       at
org.apache.tools.ant.taskdefs.optional.ejb.EjbJar.execute(EjbJar.java:505)
       at org.apache.tools.ant.Target.execute(Target.java:132)
       at org.apache.tools.ant.Project.runTarget(Project.java:717)
       at org.apache.tools.ant.Project.executeTarget(Project.java:448)
       at org.apache.tools.ant.Project.executeTargets(Project.java:422)
       at org.apache.tools.ant.Main.runBuild(Main.java:279)
       at org.apache.tools.ant.Main.main(Main.java:107)

total time: 7 seconds

> As for the issue you are seeing, it is indeed due to the XML parser trying
> to download the EJB dtd. I have addressed this with the ejbjar task by
> resolving the DTD entity to a local copy. The location of the
> local copy is
> vendor specific and I have provided a Weblogic option which knows where to
> find this DTD in the Weblogic class hierarchy.

Great.

>
> Please note that the current documentation of the ejbjar task is not up to
> date :-( I'll address that as soon as I can. If you need specific
> help, give
> me a yell.

yell-yell-yell!

Thanxs,

	Wolfgang Werner



Mime
View raw message