Skip to main content

Declaring singleton EJB in ejb-jar.xml

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
3 replies [Last post]
Comerford, Sean...
Offline
Joined: 2010-11-05

Our basketball MDB ingest application uses the metadata-complete="true" attribute b/c it includes a "common" jar that contains @MesssageDriven annotated classes we don't want to run in this particular app.

Hence we specify in the ejb-jar.xml file which MDBs we want to run.

We're having a problem figuring out how to declare an @Startup @Singleton bean via the ejb-jar.xml.

Can someone point me to an example for that?

---
Sean Comerford
ESPN.com Architecture & Platforms

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
mvatkina
Offline
Joined: 2005-04-04

https://svn.java.net/svn/glassfish~svn/trunk/v2/appserv-tests/devtests/e...

-marina

On 6/20/13 11:21 AM, Comerford, Sean wrote:
> Our basketball MDB ingest application uses the
> metadata-complete="true" attribute b/c it includes a "common" jar that
> contains @MesssageDriven annotated classes we don't want to run in
> this particular app.
>
> Hence we specify in the ejb-jar.xml file which MDBs we want to run.
>
> We're having a problem figuring out how to declare an @Startup
> @Singleton bean via the ejb-jar.xml.
>
> Can someone point me to an example for that?
>
> ---
> Sean Comerford
> ESPN.com Architecture & Platforms
>

Comerford, Sean...
Offline
Joined: 2010-11-05

Hi Marina,

That got us a little further but we're still having issues declaring the Singleton Startup via the xml descriptor.

Dan can you reply with the error you're seeing?

---
Sean Comerford
ESPN.com Architecture & Platforms

From: Marina Vatkina >
Reply-To: "marina.vatkina..." >
Date: Thu, 20 Jun 2013 14:34:16 -0400
To: "users@glassfish.java.net" >
Cc: Sean Comerford >
Subject: Re: Declaring singleton EJB in ejb-jar.xml

https://svn.java.net/svn/glassfish~svn/trunk/v2/appserv-tests/devtests/e...

-marina

On 6/20/13 11:21 AM, Comerford, Sean wrote:
Our basketball MDB ingest application uses the metadata-complete="true" attribute b/c it includes a "common" jar that contains @MesssageDriven annotated classes we don't want to run in this particular app.

Hence we specify in the ejb-jar.xml file which MDBs we want to run.

We're having a problem figuring out how to declare an @Startup @Singleton bean via the ejb-jar.xml.

Can someone point me to an example for that?

---
Sean Comerford
ESPN.com Architecture & Platforms

mgainty
Offline
Joined: 2004-05-21

Hey Sean

"As is the case
for web fragments, you use the element in
the web.xml file to instruct the web
container whether to look for annotations.

If you set to false or do not
specify the element in your file,
then during deployment, the container must scan annotations as well as web
fragments to build the effective metadata for the web application.

However, if
you set to true, the deployment
descriptors provide all the configuration information for the web application.
In this case, the web container does not search for annotations and web
fragments"

http://tamanmohamed.blogspot.com/2012/01/part-3-java-ee-6-platform-intro...

Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.

Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.

From: Sean.Comerford@espn.com
To: ; users@glassfish.java.net
CC: Daniel.Shea@espn.com
Date: Wed, 26 Jun 2013 15:07:46 -0400
Subject: Re: Declaring singleton EJB in ejb-jar.xml

Hi Marina,
That got us a little further but we're still having issues declaring the Singleton Startup via the xml descriptor.
Dan can you reply with the error you're seeing?
---Sean ComerfordESPN.com Architecture & Platforms

From: Marina Vatkina
Reply-To: "marina.vatkina..."
Date: Thu, 20 Jun 2013 14:34:16 -0400
To: "users@glassfish.java.net"
Cc: Sean Comerford
Subject: Re: Declaring singleton EJB in ejb-jar.xml

https://svn.java.net/svn/glassfish~svn/trunk/v2/appserv-tests/devtests/e...

-marina

On 6/20/13 11:21 AM, Comerford, Sean
wrote:

Our basketball MDB ingest application uses the
metadata-complete="true" attribute b/c it includes a
"common" jar that contains @MesssageDriven annotated classes
we don't want to run in this particular app.

Hence we specify in the ejb-jar.xml file which MDBs we
want to run.

We're having a problem figuring out how to declare an
@Startup @Singleton bean via the ejb-jar.xml.

Can someone point me to an example for that?

---
Sean
Comerford
ESPN.com
Architecture & Platforms