Skip to main content

Embedded glassfish ScatteredArchive question

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
2 replies [Last post]
ljnelson
Offline
Joined: 2003-08-04

In an embedded Glassfish
ScatteredArchive,
if I add a File to the
classpath,
and if that File is either a .jar file or a directory and contains an EJB
class, is it expected that that EJB will be deployed?

Or is it a classpath "only"--i.e. is used only to package up dependent
libraries and whatnot?

Best,
Laird

--
http://about.me/lairdnelson

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

EJB embedded uses SA if there is only one EJB module (for more than one,
it creates a temp exploded ear directory). But SA needs to know that
it's an EJB module, so add it as the 1st element, in addition to the JAR
type.

-marina

Laird Nelson wrote:
> In an embedded Glassfish ScatteredArchive
> ,
> if I add a File to the classpath
> ,
> and if that File is either a .jar file or a directory and contains an
> EJB class, is it expected that that EJB will be deployed?
>
> Or is it a classpath "only"--i.e. is used only to package up dependent
> libraries and whatnot?
>
> Best,
> Laird
>
> --
> http://about.me/lairdnelson
>

Bhavanishankar ...
Offline
Joined: 2011-04-06

Hi Laird,

If such a scattered archive is deployed using deployer.deploy
(scatteredArchive.toURI()
),
the EJB should get deployed.

Thanks,

Bhavani

On 09/29/2011 02:36 AM, Laird Nelson wrote:
> In an embedded Glassfish ScatteredArchive
> ,
> if I add a File to the classpath
> ,
> and if that File is either a .jar file or a directory and contains an
> EJB class, is it expected that that EJB will be deployed?
>
> Or is it a classpath "only"--i.e. is used only to package up dependent
> libraries and whatnot?
>
> Best,
> Laird
>
> --
> http://about.me/lairdnelson
>