The Source for Java Technology Collaboration
Webmaster Alert: Posting to Jive Forums is currently not working. Estimated time for fix is unknown.

Home » java.net Forums » GlassFish » GlassFish

Thread: Glassfish v3 and EJB

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
This question is answered. Helpful answers available: 2. Correct answers available: 1.

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 29 - Last Post: Dec 9, 2008 3:00 AM by: samaudruz
rpolozov

Posts: 12
Glassfish v3 and EJB
Posted: Nov 11, 2008 3:59 PM
 
  Click to reply to this thread Reply

Hello,

I have installed Glassfish v3 Prelude and glassfish-ejb component by using Update Tool.
When I try to deploy my ejb jar file by asadmin command, I receive next exception:

remote failure: There is no installed container capable of handling this application
Command deploy failed.

What should I do to deploy my ejb application?
Should I register ejb-container somehow?

Best regards,
Roman

Snjezana Sevo-Z...
Re: Glassfish v3 and EJB
Posted: Nov 11, 2008 4:51 PM   in response to: rpolozov
  Click to reply to this thread Reply

Did you restart your GlassFish domain after installing glassfish-ejb
package?

glassfish@javadesktop.org wrote:

>Hello,
>
>I have installed Glassfish v3 Prelude and glassfish-ejb component by using Update Tool.
>When I try to deploy my ejb jar file by asadmin command, I receive next exception:
>
>remote failure: There is no installed container capable of handling this application
>Command deploy failed.
>
>What should I do to deploy my ejb application?
>Should I register ejb-container somehow?
>
>Best regards,
>Roman
>[Message sent by forum member 'rpolozov' (rpolozov)]
>
>http://forums.java.net/jive/thread.jspa?messageID=316160
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


rpolozov

Posts: 12
Re: Glassfish v3 and EJB
Posted: Nov 11, 2008 5:20 PM   in response to: Snjezana Sevo-Z...
 
  Click to reply to this thread Reply

Yes, I did restart it, but it did not help.

Marina Vatkina
Re: Glassfish v3 and EJB
Posted: Nov 11, 2008 5:29 PM   in response to: rpolozov
  Click to reply to this thread Reply

Do you have now 'ejb' directory under glassfish/modules?

thanks,
-marina

glassfish@javadesktop.org wrote:
> Yes, I did restart it, but it did not help.
> [Message sent by forum member 'rpolozov' (rpolozov)]
>
> http://forums.java.net/jive/thread.jspa?messageID=316172
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


Tim Quinn
Re: Glassfish v3 and EJB
Posted: Nov 11, 2008 5:40 PM   in response to: Marina Vatkina
  Click to reply to this thread Reply

Hi, Marina.

Did I misunderstand, or is this person trying to deploy a "regular" ejb
jar file, as opposed to a war containing ejbs?

Prelude does not support regular EJB modules, right?

- Tim

Marina Vatkina wrote:
> Do you have now 'ejb' directory under glassfish/modules?
>
> thanks,
> -marina
>
> glassfish@javadesktop.org wrote:
>> Yes, I did restart it, but it did not help.
>> [Message sent by forum member 'rpolozov' (rpolozov)]
>>
>> http://forums.java.net/jive/thread.jspa?messageID=316172
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>> For additional commands, e-mail: users-help@glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


Marina Vatkina
Re: Glassfish v3 and EJB
Posted: Nov 11, 2008 5:50 PM   in response to: Tim Quinn
  Click to reply to this thread Reply

Hi Tim,

Yes, you are right - I missed this important part :(.

thanks,
-marina

Tim Quinn wrote:
> Hi, Marina.
>
> Did I misunderstand, or is this person trying to deploy a "regular" ejb
> jar file, as opposed to a war containing ejbs?
>
> Prelude does not support regular EJB modules, right?
>
> - Tim
>
> Marina Vatkina wrote:
>
>> Do you have now 'ejb' directory under glassfish/modules?
>>
>> thanks,
>> -marina
>>
>> glassfish@javadesktop.org wrote:
>>
>>> Yes, I did restart it, but it did not help.
>>> [Message sent by forum member 'rpolozov' (rpolozov)]
>>>
>>> http://forums.java.net/jive/thread.jspa?messageID=316172
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>>> For additional commands, e-mail: users-help@glassfish.dev.java.net
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>> For additional commands, e-mail: users-help@glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


rpolozov

Posts: 12
Re: Glassfish v3 and EJB
Posted: Nov 11, 2008 7:58 PM   in response to: Tim Quinn
 
  Click to reply to this thread Reply

Thank you very much!
I did not see this in release notes
Now I understand.

But will that new approach be recommended for future projects or it is just temporarily limitations of Prelude?
Could you recommend some place where can I read about creating that special war files, containing ejbs? I am using Netbeans 6.5 now.

Best regards,
Roman

Ludovic Champen...
Re: Glassfish v3 and EJB
Posted: Nov 12, 2008 7:36 AM   in response to: rpolozov
  Click to reply to this thread Reply

glassfish@javadesktop.org wrote:
> Thank you very much!
> I did not see this in release notes
> Now I understand.
>
> But will that new approach be recommended for future projects or it is just temporarily limitations of Prelude?
> Could you recommend some place where can I read about creating that special war files, containing ejbs? I am using Netbeans 6.5 now.
>
Witt nb 6.5 (rc) and v3 prelude, you can
1/ make sure the optional ejb container preview is installed in v3 via
update center of Prelude
2/ create a web app project
3/ if you are on windows (bug not on unix), add the ejb apis jar from
gfinstall/modules/ejb in the libraries of you project
4/ create a servlet in your web project
5/ create a java class in your web project
6/ add the annotation(s) to make this pojo class an EJB (@stateless,...)

In ejb3.x, Ejbs are simple Pojos with annotations, so the need for a
complex IDE wizard is not mandatory. The key point for this preview ejb
3.1 in prelude is to test what will be the future EE 6 spec, and it is
easy to try it.
So far, no MBD or Stateful beans, only Stateless beans work in the
optional preview.
When EE 6 is ready, NetBeans will offer wizards to help you creating and
using EJBs inside your web app, without the need for ejbmodules or EAR
applications. Packaging will be really really simple.

Ludo
> Best regards,
> Roman
> [Message sent by forum member 'rpolozov' (rpolozov)]
>
> http://forums.java.net/jive/thread.jspa?messageID=316194
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


vladperl

Posts: 94
Re: Glassfish v3 and EJB
Posted: Nov 13, 2008 8:33 PM   in response to: Ludovic Champen...
 
  Click to reply to this thread Reply

> Witt nb 6.5 (rc) and v3 prelude, you can
> 1/ make sure the optional ejb container preview is
> installed in v3 via
> update center of Prelude
> 2/ create a web app project
> 3/ if you are on windows (bug not on unix), add the
> ejb apis jar from
> gfinstall/modules/ejb in the libraries of you project
> 4/ create a servlet in your web project
> 5/ create a java class in your web project
> 6/ add the annotation(s) to make this pojo class an
> EJB (@stateless,...)
>
> In ejb3.x, Ejbs are simple Pojos with annotations, so
> the need for a
> complex IDE wizard is not mandatory. The key point
> for this preview ejb
> 3.1 in prelude is to test what will be the future EE
> 6 spec, and it is
> easy to try it.
> So far, no MBD or Stateful beans, only Stateless
> beans work in the
> optional preview.
> When EE 6 is ready, NetBeans will offer wizards to
> help you creating and
> using EJBs inside your web app, without the need for
> ejbmodules or EAR
> applications. Packaging will be really really simple.

Ok, that is good explanation, but missed one small detail :)
What about using regular jar file that contains just persistence entities, referenced in persistence.xml (<jar-file>my-entities.jar</jar-file>) and located under WEB-INF/lib .

Can I use this jar file in war ejb3.1 oriented application?
And I'm not asking about ejb module because stateless bean should be located under WEB-INF/classes and persistence.xml under WEB-INF/classes/META-INF

Thank you in advance for your help

Marina Vatkina
Re: Glassfish v3 and EJB
Posted: Nov 13, 2008 8:44 PM   in response to: vladperl
  Click to reply to this thread Reply

You can use JPA packaged as before. It'll be shared between the EJB and web
components in the same WAR file.

Regards,
-marina

glassfish@javadesktop.org wrote:
>>Witt nb 6.5 (rc) and v3 prelude, you can
>>1/ make sure the optional ejb container preview is
>>installed in v3 via
>>update center of Prelude
>>2/ create a web app project
>>3/ if you are on windows (bug not on unix), add the
>>ejb apis jar from
>>gfinstall/modules/ejb in the libraries of you project
>>4/ create a servlet in your web project
>>5/ create a java class in your web project
>>6/ add the annotation(s) to make this pojo class an
>>EJB (@stateless,...)
>>
>>In ejb3.x, Ejbs are simple Pojos with annotations, so
>>the need for a
>>complex IDE wizard is not mandatory. The key point
>>for this preview ejb
>>3.1 in prelude is to test what will be the future EE
>>6 spec, and it is
>>easy to try it.
>>So far, no MBD or Stateful beans, only Stateless
>>beans work in the
>>optional preview.
>>When EE 6 is ready, NetBeans will offer wizards to
>>help you creating and
>>using EJBs inside your web app, without the need for
>>ejbmodules or EAR
>>applications. Packaging will be really really simple.
>
>
> Ok, that is good explanation, but missed one small detail :)
> What about using regular jar file that contains just persistence entities, referenced in persistence.xml (<jar-file>my-entities.jar</jar-file>) and located under WEB-INF/lib .
>
> Can I use this jar file in war ejb3.1 oriented application?
> And I'm not asking about ejb module because stateless bean should be located under WEB-INF/classes and persistence.xml under WEB-INF/classes/META-INF
>
> Thank you in advance for your help
> [Message sent by forum member 'vladperl' (vladperl)]
>
> http://forums.java.net/jive/thread.jspa?messageID=316699
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


Ludovic Champen...
Re: Glassfish v3 and EJB
Posted: Nov 13, 2008 8:51 PM   in response to: Marina Vatkina
  Click to reply to this thread Reply

Marina Vatkina wrote:
> You can use JPA packaged as before. It'll be shared between the EJB
> and web components in the same WAR file.
>
> Regards,
> -marina
Merci:-)
Ludo


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


vladperl

Posts: 94
Re: Glassfish v3 and EJB
Posted: Nov 14, 2008 7:05 AM   in response to: Marina Vatkina
 
  Click to reply to this thread Reply

> You can use JPA packaged as before. It'll be shared
> between the EJB and web
> components in the same WAR file.

Thank you very much for your quick response.
I tried this case using glassfish prelude b28c and it didn't work for me.
Maybe I did something wrong in my application who knows ;)
Could you point me where to find this kind of example?
If this demo not available can I prepare test case and post here for review?

Thank you

Marina Vatkina
Re: Glassfish v3 and EJB
Posted: Nov 14, 2008 9:50 AM   in response to: vladperl
  Click to reply to this thread Reply

There might be a bug in processing jars in web-inf/lib. Does it work when JPA is
flatten under meta-inf/classes?

thanks,
-marina

glassfish@javadesktop.org wrote:
>>You can use JPA packaged as before. It'll be shared
>>between the EJB and web
>>components in the same WAR file.
>
>
> Thank you very much for your quick response.
> I tried this case using glassfish prelude b28c and it didn't work for me.
> Maybe I did something wrong in my application who knows ;)
> Could you point me where to find this kind of example?
> If this demo not available can I prepare test case and post here for review?
>
> Thank you
> [Message sent by forum member 'vladperl' (vladperl)]
>
> http://forums.java.net/jive/thread.jspa?messageID=316780
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


vladperl

Posts: 94
Re: Glassfish v3 and EJB
Posted: Nov 14, 2008 10:01 AM   in response to: Marina Vatkina
 
  Click to reply to this thread Reply

> There might be a bug in processing jars in
> web-inf/lib. Does it work when JPA is
> flatten under meta-inf/classes?

It works if entities under WEB-INF/classes

Thank you!

vladperl

Posts: 94
Re: Glassfish v3 and EJB
Posted: Nov 14, 2008 12:56 PM   in response to: Marina Vatkina
 
  Click to reply to this thread Reply

Marina,
I have created new test project and suddenly everything is working now.
Even it works when persistence.xml located inside entities jar.
My apology that I didn't check more carefully before saying it doesn't work.
First time I tried work out the scenario I used complicated Enterprise Application as start point. That probably is the reason I mixed-up something.
Next time I will create test project before making statement.

Thank you,
Vladimir

Marina Vatkina
Re: Glassfish v3 and EJB
Posted: Nov 14, 2008 1:16 PM   in response to: vladperl
  Click to reply to this thread Reply

Great! Thank you for the update.

Regards,
-marina

glassfish@javadesktop.org wrote:
> Marina,
> I have created new test project and suddenly everything is working now.
> Even it works when persistence.xml located inside entities jar.
> My apology that I didn't check more carefully before saying it doesn't work.
> First time I tried work out the scenario I used complicated Enterprise Application as start point. That probably is the reason I mixed-up something.
> Next time I will create test project before making statement.
>
> Thank you,
> Vladimir
> [Message sent by forum member 'vladperl' (vladperl)]
>
> http://forums.java.net/jive/thread.jspa?messageID=316853
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


Ludovic Champen...
Re: Glassfish v3 and EJB
Posted: Nov 13, 2008 8:49 PM   in response to: vladperl
  Click to reply to this thread Reply

glassfish@javadesktop.org wrote:
>> Witt nb 6.5 (rc) and v3 prelude, you can
>> 1/ make sure the optional ejb container preview is
>> installed in v3 via
>> update center of Prelude
>> 2/ create a web app project
>> 3/ if you are on windows (bug not on unix), add the
>> ejb apis jar from
>> gfinstall/modules/ejb in the libraries of you project
>> 4/ create a servlet in your web project
>> 5/ create a java class in your web project
>> 6/ add the annotation(s) to make this pojo class an
>> EJB (@stateless,...)
>>
>> In ejb3.x, Ejbs are simple Pojos with annotations, so
>> the need for a
>> complex IDE wizard is not mandatory. The key point
>> for this preview ejb
>> 3.1 in prelude is to test what will be the future EE
>> 6 spec, and it is
>> easy to try it.
>> So far, no MBD or Stateful beans, only Stateless
>> beans work in the
>> optional preview.
>> When EE 6 is ready, NetBeans will offer wizards to
>> help you creating and
>> using EJBs inside your web app, without the need for
>> ejbmodules or EAR
>> applications. Packaging will be really really simple.
>>
>
> Ok, that is good explanation, but missed one small detail :)
> What about using regular jar file that contains just persistence entities, referenced in persistence.xml (<jar-file>my-entities.jar</jar-file>) and located under WEB-INF/lib .
>
> Can I use this jar file in war ejb3.1 oriented application?
>
I don't know, I only tried stateless EJBs inside a web app and called
via servlet and it worked well.
Did you try your scenario? I think it would not take long to see if the
container preview can support it or not.
Unless somebody (BCCed) developing this container already knows the
answer and is reading this thread.
Remember, it is a preview for prelude.
Nightly and promoted builds for v3 itself have the latest evolving
implementation.
Any taker?

Ludo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


vladperl

Posts: 94
Re: Glassfish v3 and EJB
Posted: Nov 14, 2008 7:32 AM   in response to: Ludovic Champen...
 
  Click to reply to this thread Reply

> I don't know, I only tried stateless EJBs inside a
> web app and called
> via servlet and it worked well.
> Did you try your scenario? I think it would not take
> long to see if the
> container preview can support it or not.
> Unless somebody (BCCed) developing this container
> already knows the
> answer and is reading this thread.
> Remember, it is a preview for prelude.
> Nightly and promoted builds for v3 itself have the
> latest evolving
> implementation.
> Any taker?

Ludo, Thank very much you for response.
I tried this scenario but it doesn't work for some reason.
I tried b28c build and seems this is final build.
I'm waiting if Marina will suggest something or provide some proof that it indeed working :)

Best Regards,
Vladimir

mvatkina

Posts: 764
Re: Glassfish v3 and EJB
Posted: Nov 12, 2008 10:12 AM   in response to: rpolozov
 
  Click to reply to this thread Reply

Yes, this new packaging will be part of the EJB3.1 spec (and as such Java EE 6).

Regards,
-marina

rpolozov

Posts: 12
Re: Glassfish v3 and EJB
Posted: Nov 12, 2008 12:56 PM   in response to: mvatkina
 
  Click to reply to this thread Reply

Does it mean that old packaging will be deprecated in EJB 3.1?
As I understand, new packaging is convenient for web-applications only...
But if I plan to have several EJB-modules, several web-applications and also ordinary Java-applications working with EJB-modules, this could be not very convenient...
Could you give any comments about this?

Sorry for may be stupid questions - I am not very familiar with JEE technologies yet...

Best regards,
Roman

mvatkina

Posts: 764
Re: Glassfish v3 and EJB
Posted: Nov 12, 2008 1:13 PM   in response to: rpolozov
 
  Click to reply to this thread Reply

The new packaging is in addition to the old way.

Regards,
-marina

rpolozov

Posts: 12
Re: Glassfish v3 and EJB
Posted: Nov 12, 2008 1:59 PM   in response to: mvatkina
 
  Click to reply to this thread Reply

Thank you!

cdiesse

Posts: 6
Re: Glassfish v3 and EJB
Posted: Nov 26, 2008 11:58 AM   in response to: rpolozov
 
  Click to reply to this thread Reply

This is a very good thread ... As I spend many hours googling and trying to create a JEE application in NB6.5 and V3 prelude. Thanks for all the questions and replies.

I want to mention that, I hope the v3 prelude will not left at end as an incomplete container for EJB. So the need to have EJB3.1 Singleton, Statefull and other EJB is very important for the v3 prelude adoption.

It is valuable to have a web server ejb enabled in the development phase and for lite deployment. But when it will be the time to address enterprise scalabity, and code architectural organization, we will need the wole ejb and ear stack in v3 prelude server.

Thanks for the good job at Sun ... and hope the v3 prelude will be open for ever ...

samaudruz

Posts: 3
Re: Glassfish v3 and EJB
Posted: Dec 4, 2008 1:55 AM   in response to: rpolozov
 
  Click to reply to this thread Reply

On V3 with EJB3.1 support:

* Servlet in WEB-INF/classes
* Stateless session local session bean in WEB-INF/classes

Everything OK.

But if I try to deploy the SLSB inside WEB-INF/lib as a jar, V3 cannot find the bean.
Did I miss something or is this a known limitation ?

Thanks,
Steph.

Tim Quinn
Re: Glassfish v3 and EJB
Posted: Dec 4, 2008 5:06 AM   in response to: samaudruz
  Click to reply to this thread Reply

Steph,

Please take a look at this comparison of GlassFish v2 and v3 prelude
[1]. You'll see that GlassFish v3 prelude supports EJBs only within web
apps. (The blog entry in "The Aquarium" pointing to this page is the
first hit I got in a Google search for "glassfish v3 prelude ejb module.")

- Tim

[1] https://glassfish.dev.java.net/public/comparing_v2_and_v3.html

glassfish@javadesktop.org wrote:
> On V3 with EJB3.1 support:
>
> * Servlet in WEB-INF/classes
> * Stateless session local session bean in WEB-INF/classes
>
> Everything OK.
>
> But if I try to deploy the SLSB inside WEB-INF/lib as a jar, V3 cannot find the bean.
> Did I miss something or is this a known limitation ?
>
> Thanks,
> Steph.
> [Message sent by forum member 'samaudruz' (samaudruz)]
>
> http://forums.java.net/jive/thread.jspa?messageID=319960
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


Sahoo
Re: Glassfish v3 and EJB
Posted: Dec 4, 2008 7:19 AM   in response to: Tim Quinn
  Click to reply to this thread Reply

Tim,

When you say "GlassFish v3 prelude supports EJBs only within web apps,"
does it not mean that EJBs can be packaged in a jar file in WEB-INF/lib?
That's exactly what Steph is trying to do. It may be that "prelude" does
not support that style of packaging.

Thanks,
Sahoo

Tim Quinn wrote:
> Steph,
>
> Please take a look at this comparison of GlassFish v2 and v3 prelude
> [1]. You'll see that GlassFish v3 prelude supports EJBs only within
> web apps. (The blog entry in "The Aquarium" pointing to this page is
> the first hit I got in a Google search for "glassfish v3 prelude ejb
> module.")
>
> - Tim
>
> [1] https://glassfish.dev.java.net/public/comparing_v2_and_v3.html
>
> glassfish@javadesktop.org wrote:
>> On V3 with EJB3.1 support:
>>
>> * Servlet in WEB-INF/classes
>> * Stateless session local session bean in WEB-INF/classes
>>
>> Everything OK.
>>
>> But if I try to deploy the SLSB inside WEB-INF/lib as a jar, V3
>> cannot find the bean.
>> Did I miss something or is this a known limitation ?
>>
>> Thanks,
>> Steph.
>> [Message sent by forum member 'samaudruz' (samaudruz)]
>>
>> http://forums.java.net/jive/thread.jspa?messageID=319960
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>> For additional commands, e-mail: users-help@glassfish.dev.java.net
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


tjquinn

Posts: 661
Re: Glassfish v3 and EJB
Posted: Dec 4, 2008 7:30 AM   in response to: Sahoo
 
  Click to reply to this thread Reply

I had interpreted Steph's message to be that he has an EJB JAR in his WEB-INF/lib directory that works fine when deployed as part of the web app but that he was then trying to deploy that same JAR separately as a stand-alone EJB module.

Perhaps I misunderstood.

samaudruz

Posts: 3
Re: Glassfish v3 and EJB
Posted: Dec 8, 2008 8:15 AM   in response to: tjquinn
 
  Click to reply to this thread Reply

Sorry but you misunderstood.

My SLSB is injected in the servlet.

When this SLSB is in WEB-INF/classes everything works like a charm.
But when I have it inside another Maven project, and it is copied under WEB-INF/lib at this moment I get a nullpointerexception on the EJB.

But everything is still inside a web-app.

Should I use the ejb-ref in the servlet?
Or is it a limitation of EJB prelude?

Thanks all of you....

Steph

ksak

Posts: 481
Re: Glassfish v3 and EJB
Posted: Dec 8, 2008 9:31 AM   in response to: samaudruz
 
  Click to reply to this thread Reply

> Sorry but you misunderstood.
>
> My SLSB is injected in the servlet.
>
> When this SLSB is in WEB-INF/classes everything works
> like a charm.
> But when I have it inside another Maven project, and
> it is copied under WEB-INF/lib at this moment I get a
> nullpointerexception on the EJB.
>
> But everything is still inside a web-app.
>
> Should I use the ejb-ref in the servlet?
> Or is it a limitation of EJB prelude?

It's a limitation of the EJB prelude. For now, the EJB annotations are only
processed on classes in WEB-INF/classes.

>
> Thanks all of you....
>
> Steph

samaudruz

Posts: 3
Re: Glassfish v3 and EJB
Posted: Dec 9, 2008 3:00 AM   in response to: ksak
 
  Click to reply to this thread Reply

Merci, Thank you

I will use maven to copy classes there.




 XML java.net RSS