Sateesh kumar wrote:
> My name is sateesh.
> I am a beginer to xdoclet.

Welcome aboard!

> I have a simple CMP2.0 bean and i have a abstract
> method
> 
> public abstract Long getABa();
> 
> For this method XDoclet generates ABa as the cmp-field
> name in ejb-jar.xml
> But when i run weblogic's ejbc, i get an error
> complaining that
> first letter of cmp-field name has to be a lower case letter.

This was discussed a while ago, and I thought I saw a JIRA issued about
it that got completed (fixed). Perhaps it will be in the 1.2.1 release?

Anyway, you are correct. The field name must begin with a lowercase
letter. The problem (IIRC) is that XDoclet will *not* lowercase the
first letter if the second letter is also uppercase. This is the
problem, and the work-around is simple: Don't name your fields with two
initial capital letters.

As a side note, I decided long ago to follow InitCap style for acronyms.
I'm working on some OpenMG stuff but decided to go with the acronym to
shorten class names. One class generates a DMF (delivery metafile) to
instruct the client to download songs. In the past it would have been
called OMGDMFGenerateAction. Ugh. Is that "OM" "GDMF"? "OMGD" "MF"? It's
impossible to tell when run together.

Following the InitCap rule, however, makes it OmgDmfGenerateAction.
Sure, "Omg" looks like it's supposed to be a word rather than an
acronym, but at least it's no longer ambiguous (and seriously who would
think "Dmf" is a word?). This stops problems like the one you've found
from occurring, and it makes variable names nicer. What do you call an
instance of this class?

  OMGDMFGenerateAction oMGDMFGen = ...

Yikes, that's atrocious. The "o" looks like a Hungarian "Object" prefix,
obliterating the acronym.

Anyway, long story short, rename your method to "getAba" and you'll be
all set. Or get the 1.2.1 version (any day now) and see if it solves the
issue.

Good luck!

David Harkness
Sr. Software Engineer
Sony Pictures Digital Networks
(310) 482-4756


-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to