Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Class Reloader limitations
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
DavidNia  
View profile  
 More options Feb 20 2010, 5:20 pm
From: DavidNia <da...@3dex.com>
Date: Sat, 20 Feb 2010 14:20:59 -0800 (PST)
Local: Sat, Feb 20 2010 5:20 pm
Subject: Class Reloader limitations
I understand that the class reloader can not reload classes if the
application is deployed using a war file.

But is it the reloader that loads classes the first time classes are
accessed (like when the servlet container is started for the first
time)?

I am having the issue where I can't even deploy my application (which
is in WAR form) because the class reloader can't find a class inside
my WAR.  The fact that it can't find the class is not the surprise.  I
am surprised that the reloader is 'reloading' a class when this is the
first time the class is being accessed.

I got around this by adding the class path to the exploded directory
on the server - but this makes the induction xml much less portable.

Is the class reloader the only way classes are loaded into induction?

If so, then is it the case that no application should be deployed in
WAR format for now?

thanks,
david


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adinath  
View profile  
 More options Feb 20 2010, 11:24 pm
From: Adinath <adin...@acciente.com>
Date: Sat, 20 Feb 2010 21:24:57 -0700
Local: Sat, Feb 20 2010 11:24 pm
Subject: Re: Class Reloader limitations

On Sat, Feb 20, 2010 at 3:20 PM, DavidNia <da...@3dex.com> wrote:
> I understand that the class reloader can not reload classes if the
> application is deployed using a war file.

Yes, since it does not really make sense to reload from a .war, since when a
war is deployed the application gets redeployed anyways.

> But is it the reloader that loads classes the first time classes are
> accessed (like when the servlet container is started for the first
> time)?

I am having the issue where I can't even deploy my application (which

> is in WAR form) because the class reloader can't find a class inside
> my WAR.  The fact that it can't find the class is not the surprise.  I
> am surprised that the reloader is 'reloading' a class when this is the
> first time the class is being accessed.

> I got around this by adding the class path to the exploded directory
> on the server - but this makes the induction xml much less portable.

> Is the class reloader the only way classes are loaded into induction?

Induction is designed so that the reloading classloader does not even
activate if you omit the <java-class-path> or leave it empty. Are you
leaving <java-class-path> section empty?

> If so, then is it the case that no application should be deployed in
> WAR format for now?

Absolutely not! Induction is designed and has been tested and deployed in
production with .WAR files!

Regards,
Adi

--
Acciente, LLC
Systems Architecture and Software Design

www.acciente.com
www.inductionframework.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
DavidNia  
View profile  
 More options Feb 21 2010, 12:47 pm
From: DavidNia <da...@3dex.com>
Date: Sun, 21 Feb 2010 09:47:40 -0800 (PST)
Local: Sun, Feb 21 2010 12:47 pm
Subject: Re: Class Reloader limitations
Yes, I do have a <java-class-path>.
My application loads resources (property file) through the
ClassLoader.getResourceAsStream().

I think I can get around this by putting the resource I am accessing
the 'classes' folder.  That way I can get rid of the <java-class-path>
altogether.

I will submit the result of what happens when I put the resource in
the 'classes' folder.

david

On Feb 20, 9:24 pm, Adinath <adin...@acciente.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adinath  
View profile  
 More options Feb 21 2010, 3:04 pm
From: Adinath <adin...@acciente.com>
Date: Sun, 21 Feb 2010 13:04:33 -0700
Local: Sun, Feb 21 2010 3:04 pm
Subject: Re: Class Reloader limitations

On Sun, Feb 21, 2010 at 10:47 AM, DavidNia <da...@3dex.com> wrote:
> Yes, I do have a <java-class-path>.
> My application loads resources (property file) through the
> ClassLoader.getResourceAsStream().

> I think I can get around this by putting the resource I am accessing
> the 'classes' folder.  That way I can get rid of the <java-class-path>
> altogether.

> I will submit the result of what happens when I put the resource in
> the 'classes' folder.

Correct, you do not need a an Induction classpath (specified in
<java-class-path>) for ClassLoader.getResourceAsStream() to work, that works
via any classloader.

Adi

--
Acciente, LLC
Systems Architecture and Software Design

www.acciente.com
www.inductionframework.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
DavidNia  
View profile  
 More options Feb 21 2010, 4:08 pm
From: DavidNia <da...@3dex.com>
Date: Sun, 21 Feb 2010 13:08:39 -0800 (PST)
Local: Sun, Feb 21 2010 4:08 pm
Subject: Re: Class Reloader limitations
I still have problems...here is a detailed description of what I did
and the result:

To describe the scenario visually i also draw 'stick' figures

Scenario 1:
- I had all my resources (including induction.xml) in the WEB-INF
folder.
- In inductionl.xml I had in <java-class-path> the paths to WEB-INF,
WEB-INF/classes

visual representation of scenario 1:

---------------------------------------------------------
\WEB-INF (java-class-path points here)

   [xml resources here, induction.xml here]

   \classes (java-class-path points here)
---------------------------------------------------------

this WORKS, but I want to get rid of all java-class-path entries

Scenario 2:
- I put all resources (including induction.xml) in WEB-INF\classes
folder
- I removed all <java-class-path> entries from induction.xml

visual representation of scenario 2:

---------------------------------------------------------
\WEB-INF

   \classes

         [xml resources here, induction.xml here (induction.xml could
not be found!) ]
---------------------------------------------------------

this DID NOT work - I got an error from the XMLConfigLoader when it
tried to load induction.xml..it could not find induction.xml

Scenario 3:
- I moved induction.xml to WEB-INF without changing anything else.
- So at this point there is still no <java-class-path> entries in
Induction.xml
- Also all my other resources are in the WEB-INF classes folder

visual representation of scenario 3:

---------------------------------------------------------
\WEB-INF

   [induction.xml here]

   \classes

         [xml resources here]
         (error - could not find application classes!)
---------------------------------------------------------

this DID NOT work - it could not find my application class files (even
though they are in the WEB-INF/classes folder)

Scenario 4:
- i added <java-class-path> for WEB-INF/classes only

visual representation of scenario 3:

---------------------------------------------------------
\WEB-INF

   [induction.xml here]

   \classes  (java-class-path points here)

         [xml resources here]

---------------------------------------------------------

this WORKS

This is a big improvement over scenario 1 where I only have java-class-
path for WEB-INF classes.
All resources except for induction.xml are in resources.

Summary:

- if resources are in WEB-INF you need java-class-path to WEB-INF
- i could not find a scenario where i did not need to specify WEB-INF
classes in java-class-path

david

On Feb 21, 1:04 pm, Adinath <adin...@acciente.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »