Re: [JBoss-user] Ear scoped classloading and scheduler service

2003-02-20 Thread Scott M Stark
Where is the scheduler deployed and why does it need AppClient.jar added
to its classpath? It would be best to provide an example of what you are
trying to do in a bug report on sourceforge.


Scott Stark
Chief Technology Officer
JBoss Group, LLC


- Original Message - 
From: Krishnakumar N [EMAIL PROTECTED]
To: Jboss-User (E-mail) [EMAIL PROTECTED]
Sent: Wednesday, February 19, 2003 11:03 PM
Subject: [JBoss-user] Ear scoped classloading and scheduler service


 Hello all,
 
  I have a j2ee application which works fine as a single instance
 application. Now I am trying to support multiple instances of that
 application on the same jboss server. The documented way is to do the usual
 changes (database datasource name, jndi branches to which the ejb names are
 bound, security contexts and the web contexts under which the wars are
 deployed) and create multiple ears. I have done all that. There is a
 property file which is different for each ear so the flat classloading which
 happens by default is not enough. To overcome this, I have used the
 jboss-app.xml to load the classes with ear scope. All this works fine.
 
  The problem arises when there is a scheduled task for each application
 which needs to be configured using the scheduler plug-in. The classpath for
 the scheduled task is specified as something like this in the *-service.xml
 
 snip
 
  classpath codebase=lib archives=scheduler-plugin.jar/  
  classpath codebase=./lib/myapp archives=AppClient.jar/  
 
 /snip
 
 where AppClient.jar is the client jar file containing ejb interfaces etc.
 
 When the deployment happens, I get several errors such as:
 
 Bean   : AccessLocationEJB
 Method : public abstract AccessLocation create(AccessProvider, String,
 String, String, String, State, Country, Integer, Double, Double,
 AccessLocationConfiguration, String, String, Integer, Double, String,
 String, String, String, String) throws CreateException, NamingException,
 AccessProviderException
 Section: 12.2.11
 Warning: Each create(...) method in the entity bean's local home interface
 must have a matching ejbCreate(...) method in the entity bean's class.
 
  which seem to happen because when jboss deploys the scheduler service, it
 seems to load the AppClient.jar into the default class loader and when the
 ears are deployed, even though they are self-contained, the interface class
 definitions are used from the parent classloader instead of the ear-scoped
 classloader.
 
  Is this the problem? Any solution to this problem? (Can I get the ears to
 deploy first and then the scheduler services?)
 
  I heard in a recent thread that there will be a configuration switch which
 will allow the classloaders to check whether they can load the class
 themselves and only on failure delegate to the parent classloader. Will this
 solve the above problem?
 
 Cheers,
 Krishna



---
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] Ear scoped classloading and scheduler service

2003-02-19 Thread Krishnakumar N
Hello all,

 I have a j2ee application which works fine as a single instance
application. Now I am trying to support multiple instances of that
application on the same jboss server. The documented way is to do the usual
changes (database datasource name, jndi branches to which the ejb names are
bound, security contexts and the web contexts under which the wars are
deployed) and create multiple ears. I have done all that. There is a
property file which is different for each ear so the flat classloading which
happens by default is not enough. To overcome this, I have used the
jboss-app.xml to load the classes with ear scope. All this works fine.

 The problem arises when there is a scheduled task for each application
which needs to be configured using the scheduler plug-in. The classpath for
the scheduled task is specified as something like this in the *-service.xml

snip

 classpath codebase=lib archives=scheduler-plugin.jar/  
 classpath codebase=./lib/myapp archives=AppClient.jar/  

/snip

where AppClient.jar is the client jar file containing ejb interfaces etc.

When the deployment happens, I get several errors such as:

Bean   : AccessLocationEJB
Method : public abstract AccessLocation create(AccessProvider, String,
String, String, String, State, Country, Integer, Double, Double,
AccessLocationConfiguration, String, String, Integer, Double, String,
String, String, String, String) throws CreateException, NamingException,
AccessProviderException
Section: 12.2.11
Warning: Each create(...) method in the entity bean's local home interface
must have a matching ejbCreate(...) method in the entity bean's class.

 which seem to happen because when jboss deploys the scheduler service, it
seems to load the AppClient.jar into the default class loader and when the
ears are deployed, even though they are self-contained, the interface class
definitions are used from the parent classloader instead of the ear-scoped
classloader.

 Is this the problem? Any solution to this problem? (Can I get the ears to
deploy first and then the scheduler services?)

 I heard in a recent thread that there will be a configuration switch which
will allow the classloaders to check whether they can load the class
themselves and only on failure delegate to the parent classloader. Will this
solve the above problem?

Cheers,
Krishna


---
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user