dev@glassfish.java.net

Re: building an ejb jar as part of the v3 build

From: Lloyd Chambers <Lloyd.Chambers_at_Sun.COM>
Date: Thu, 09 Apr 2009 13:32:51 -0700

Thanks...but it seems that for a webapp these are supposed to go into
src/main/webapp/WEB-INF

Not sure about an ejb jar yet, which requires ejb-jar.xml

I've set it up as follows:

     <packaging>ejb</packaging>

And created:
src/main/ejb/META-INF/


But that's wrong:

[INFO] Error assembling EJB: META-INF/ejb-jar.xml is required for
ejbVersion 2.x


—Lloyd


On Apr 9, 2009, at 1:28 PM, Snjezana Sevo-Zenzerovic wrote:

> It should be enough to place those files into src/main/resources
> directory and jar plugin should pick them up and place into your
> jar. This might help:
>
> http://maven.apache.org/guides/getting-started/index.html#How_do_I_add_resources_to_my_JAR
>
>
>
> Lloyd Chambers wrote:
>
>> Snjezana,
>>
>> Easy enough, but an EJB jar needs a manifest, descriptor etc, and
>> I'm not sure how to set that up in the build.
>>
>> For example, doesn't it need an application.xml eg:
>>
>> <application xmlns="http://java.sun.com/xml/ns/j2ee" version="1.4"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd
>> ">
>> <description>J2EE Management EJB Component based on jsr77 spec</
>> description>
>> <display-name>MEjbApp</display-name>
>> <module>
>> <ejb>mejb.jar</ejb>
>> </module>
>> </application>
>>
>>
>> There are at least 4 artifacts I found in V2, not sure what I need
>> for v3. I certainly need ejb-jar. xml it appears, sinc eit has
>> all the roles, methods, etc.
>>
>> -rw-r--r-- 1 llc admin 2325 May 4 2007 application.xml
>> -rw-r--r-- 1 llc admin 16226 May 4 2007 ejb-jar.xml
>> -rw-r--r-- 1 llc admin 2270 May 4 2007 sun-application.xml
>> -rw-r--r-- 1 llc admin 2907 May 4 2007 sun-ejb-jar.xml
>> -rw-r--r-- 1 llc admin 2980 May 4 2007 sun-j2ee-ri.xml
>>
>>
>>
>>
>> Lloyd
>>
>> On Apr 9, 2009, at 12:42 PM, Snjezana Sevo-Zenzerovic wrote:
>>
>>> Lloyd,
>>>
>>> if you don't specify packaging at all, Maven will by default
>>> handle it as "jar". Otherwise,
>>>
>>> <packaging>jar</packaging>
>>>
>>> Thanks,
>>>
>>> Snjezana
>>>
>>> Lloyd Chambers wrote:
>>>
>>>> Ken,
>>>>
>>>> Thanks,
>>>>
>>>> So do I just specify:
>>>>
>>>> <packaging>-jar</packaging>
>>>>
>>>> ?
>>>>
>>>>
>>>> Lloyd
>>>>
>>>> On Apr 9, 2009, at 12:34 PM, Kenneth Saks wrote:
>>>>
>>>>>
>>>>> On Apr 9, 2009, at 3:31 PM, Lloyd Chambers wrote:
>>>>>
>>>>>> I'm hoping someone has an answer for this—
>>>>>>
>>>>>> I am implementing JSR 77, which means than an EJB jar
>>>>>> containing the required management EJB (MEJB) needs to be
>>>>>> built.
>>>>>>
>>>>>> Obviously, this isn't an hk2-jar, but also it's been many
>>>>>> years since I dealt with EJBs, and I recall there are some
>>>>>> stub and tie classes involved, I'm not sure how these can be
>>>>>> done in our maven- based build.
>>>>>
>>>>>
>>>>>
>>>>> Hi Lloyd,
>>>>>
>>>>> There are no statically generated stub/tie classes for Remote
>>>>> EJB components anymore. All of these artifacts are now
>>>>> generated dynamically at runtime by our ORB.
>>>>>
>>>>> --ken
>>>>>
>>>>>>
>>>>>> Any suggestions are welcome.
>>>>>>
>>>>>> —Lloyd
>>>>>>
>>>>>>
>>>>>> Lloyd Chambers
>>>>>> lloyd.chambers_at_sun.com
>>>>>> GlassFish Team
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>>
>>>>
>>>> Lloyd Chambers
>>>> lloyd.chambers_at_sun.com
>>>> GlassFish Team
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>
>> Lloyd Chambers
>> lloyd.chambers_at_sun.com
>> GlassFish Team
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>

Lloyd Chambers
lloyd.chambers_at_sun.com
GlassFish Team