Re: [JBoss-user] Two ears and classcastexception :( please, help!!

2004-02-11 Thread Francisco Figueiredo Jr.
Scott M Stark wrote:
A client in one ear calling an ejb in another ear is a circumstance
where you do not want a custom loader-repository. For this you want
the default flat visibility since you are sharing types between
deployments. You'll have to explain why the client is in ear1
calling ear2 rather than being in ear2.


Hi Scott. Thanks for the help. Sorry for late answer. I was having some 
problems getting my messages to the list and just now I saw it was 
working again...

Jae Gangemi sent me some explanations about how to get them working. I 
have to have the class used by both ears in the flat visibility as you 
are saying too.

The client is in fact using the ear2 which is using as a client the ear1.

The ear1 is holding components which will be used by more than one ear 
appication and so I decided to put them in a separate ear.

Regards,

Francisco Figueiredo Jr.

---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Two ears and classcastexception :( please, help!!

2004-01-30 Thread Simone Milani
In that case just put your common jar file inside the server/lib directory
but you loose the re-deploy ability for that jar.

Simone
- Original Message - 
From: Francisco Figueiredo Jr. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 28, 2004 9:27 PM
Subject: Re: [JBoss-user] Two ears and classcastexception :( please, help!!


 Simone Milani wrote:
  Just put your 2 ears inside a sar module and put the common classes in
a
  jar contained in the sar.
 

 Put the ears inside a sar?

 But what if I want to deploy them independently?


 Thanks in advance.


  Simone
  - Original Message - 
  From: Francisco Figueiredo Jr. [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Friday, January 23, 2004 8:24 PM
  Subject: [JBoss-user] Two ears and classcastexception :( please, help!!
 
 
 
 
 Hi all,
 
 I'm trying to get one application inside an .ear to use beans inside
 
  another
 
 .ear.
 
 On both ear's I'm using custom class loader through the
 
  loader-repository tag
 
 in jboss-app.xml.
 
 On both ears, in their application.xml I expose a jar containing the ejb
 interfaces using the module tag.
 
 The problem is that when I try to call a getHome in one ear, it throws
 classcastexception when trying to call narrow method in
 
  PortableRemoteObject
 
 class.
 
 
 Am I doing something wrong?
 
 I'm sure the classcastexception is generated because of the different
 
  class
 
 loaders.  I read the JBOSS admin guide in the section about classloaders
 
  and
 
 indeed I did a modification in the code which calls the narrow method
and
 
  I
 
 could check they are from different classloaders.
 
 what I get from calling narrow is this:
 
 [EMAIL PROTECTED]
 
 
 
url=file:/opt/jboss-3.2.3/server/default/tmp/deploy/tmp43175corporativo.ear
 
 ,addedOrder=45}
 
 what I get from the ear calling the get home is this:
 
 [EMAIL PROTECTED]
 url=file:/opt/jboss-3.2.3/server/default/tmp/deploy/tmp43176temis.ear
 ,addedOrder=46}
 
 
 I can see that the class loaders are in fact different. But from my two
 disparate ears!
 
 
 
 I mean, I thought if I used custom classloaders, it would not be visible
 
  by
 
 other applications in other classloaders.
 
 Am I missing something?
 
 What can I do to solve that?
 
 Please, help me. I'm desperate! :)
 
 Thanks in advance.
 
 Regards,
 
 Francisco Figueiredo Jr.
 
 
 __
 
 Yahoo! GeoCities: a maneira mais fácil de criar seu web site grátis!
 http://br.geocities.yahoo.com/
 
 
 ---
 The SF.Net email is sponsored by EclipseCon 2004
 Premiere Conference on Open Tools Development and Integration
 See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
 http://www.eclipsecon.org/osdn
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 
 
 
 
  ---
  The SF.Net email is sponsored by EclipseCon 2004
  Premiere Conference on Open Tools Development and Integration
  See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
  http://www.eclipsecon.org/osdn
  ___
  JBoss-user mailing list
  [EMAIL PROTECTED]
  https://lists.sourceforge.net/lists/listinfo/jboss-user
 


 -- 
 Regards,

 Francisco Figueiredo Jr.
 Membro Fundador do Projeto MonoBrasil - MonoBrasil Project Founding Member


 -
 Science without religion is lame;
 religion without science is blind.

~ Albert Einstein


 ---
 The SF.Net email is sponsored by EclipseCon 2004
 Premiere Conference on Open Tools Development and Integration
 See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
 http://www.eclipsecon.org/osdn
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user



---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] Two ears and classcastexception :( please, help!!

2004-01-29 Thread Scott M Stark
A client in one ear calling an ejb in another ear is a circumstance
where you do not want a custom loader-repository. For this you want
the default flat visibility since you are sharing types between
deployments. You'll have to explain why the client is in ear1
calling ear2 rather than being in ear2.




Scott Stark
Chief Technology Officer
JBoss Group, LLC
 
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Francisco
Figueiredo Jr.
Sent: Monday, January 26, 2004 11:22 AM
To: [EMAIL PROTECTED]
Subject: [JBoss-user] Two ears and classcastexception :( please, help!!


Hi all,

I'm trying to get one application inside an .ear to use beans inside
another .ear.

On both ear's I'm using custom class loader through the
loader-repository tag in jboss-app.xml.

On both ears, in their application.xml I expose a jar containing the ejb
interfaces using the module tag.

The problem is that when I try to call a getHome in one ear, it throws
classcastexception when trying to call narrow method in
PortableRemoteObject class.


Am I doing something wrong?

I'm sure the classcastexception is generated because of the different
class loaders.  I read the JBOSS admin guide in the section about
classloaders and indeed I did a modification in the code which calls the
narrow method and I could check they are from different classloaders.

what I get from calling narrow is this:

[EMAIL PROTECTED]
url=file:/opt/jboss-3.2.3/server/default/tmp/deploy/tmp43175corporativo.
ear
,addedOrder=45}

what I get from the ear calling the get home is this:

[EMAIL PROTECTED]
url=file:/opt/jboss-3.2.3/server/default/tmp/deploy/tmp43176temis.ear
,addedOrder=46}


I can see that the class loaders are in fact different. But from my two
disparate ears!



I mean, I thought if I used custom classloaders, it would not be visible
by other applications in other classloaders.

Am I missing something?

What can I do to solve that?

Please, help me. I'm desperate! :)

Thanks in advance.

Regards,

Francisco Figueiredo Jr.

=
Regards,
Francisco Figueiredo Jr.



---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Two ears and classcastexception :( please, help!!

2004-01-28 Thread Simone Milani
Just put your 2 ears inside a sar module and put the common classes in  a
jar contained in the sar.

Simone
- Original Message - 
From: Francisco Figueiredo Jr. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, January 23, 2004 8:24 PM
Subject: [JBoss-user] Two ears and classcastexception :( please, help!!




 Hi all,

 I'm trying to get one application inside an .ear to use beans inside
another
 .ear.

 On both ear's I'm using custom class loader through the
loader-repository tag
 in jboss-app.xml.

 On both ears, in their application.xml I expose a jar containing the ejb
 interfaces using the module tag.

 The problem is that when I try to call a getHome in one ear, it throws
 classcastexception when trying to call narrow method in
PortableRemoteObject
 class.


 Am I doing something wrong?

 I'm sure the classcastexception is generated because of the different
class
 loaders.  I read the JBOSS admin guide in the section about classloaders
and
 indeed I did a modification in the code which calls the narrow method and
I
 could check they are from different classloaders.

 what I get from calling narrow is this:

 [EMAIL PROTECTED]

url=file:/opt/jboss-3.2.3/server/default/tmp/deploy/tmp43175corporativo.ear
 ,addedOrder=45}

 what I get from the ear calling the get home is this:

 [EMAIL PROTECTED]
 url=file:/opt/jboss-3.2.3/server/default/tmp/deploy/tmp43176temis.ear
 ,addedOrder=46}


 I can see that the class loaders are in fact different. But from my two
 disparate ears!



 I mean, I thought if I used custom classloaders, it would not be visible
by
 other applications in other classloaders.

 Am I missing something?

 What can I do to solve that?

 Please, help me. I'm desperate! :)

 Thanks in advance.

 Regards,

 Francisco Figueiredo Jr.


 __

 Yahoo! GeoCities: a maneira mais fácil de criar seu web site grátis!
 http://br.geocities.yahoo.com/


 ---
 The SF.Net email is sponsored by EclipseCon 2004
 Premiere Conference on Open Tools Development and Integration
 See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
 http://www.eclipsecon.org/osdn
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user



---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Two ears and classcastexception :( please, help!!

2004-01-28 Thread Francisco Figueiredo Jr.
Simone Milani wrote:
Just put your 2 ears inside a sar module and put the common classes in  a
jar contained in the sar.
Put the ears inside a sar?

But what if I want to deploy them independently?

Thanks in advance.


Simone
- Original Message - 
From: Francisco Figueiredo Jr. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, January 23, 2004 8:24 PM
Subject: [JBoss-user] Two ears and classcastexception :( please, help!!



Hi all,

I'm trying to get one application inside an .ear to use beans inside
another

.ear.

On both ear's I'm using custom class loader through the
loader-repository tag

in jboss-app.xml.

On both ears, in their application.xml I expose a jar containing the ejb
interfaces using the module tag.
The problem is that when I try to call a getHome in one ear, it throws
classcastexception when trying to call narrow method in
PortableRemoteObject

class.

Am I doing something wrong?

I'm sure the classcastexception is generated because of the different
class

loaders.  I read the JBOSS admin guide in the section about classloaders
and

indeed I did a modification in the code which calls the narrow method and
I

could check they are from different classloaders.

what I get from calling narrow is this:

[EMAIL PROTECTED]

url=file:/opt/jboss-3.2.3/server/default/tmp/deploy/tmp43175corporativo.ear

,addedOrder=45}

what I get from the ear calling the get home is this:

[EMAIL PROTECTED]
url=file:/opt/jboss-3.2.3/server/default/tmp/deploy/tmp43176temis.ear
,addedOrder=46}
I can see that the class loaders are in fact different. But from my two
disparate ears!


I mean, I thought if I used custom classloaders, it would not be visible
by

other applications in other classloaders.

Am I missing something?

What can I do to solve that?

Please, help me. I'm desperate! :)

Thanks in advance.

Regards,

Francisco Figueiredo Jr.

__

Yahoo! GeoCities: a maneira mais fácil de criar seu web site grátis!
http://br.geocities.yahoo.com/
---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


--
Regards,
Francisco Figueiredo Jr.
Membro Fundador do Projeto MonoBrasil - MonoBrasil Project Founding Member
-
Science without religion is lame;
religion without science is blind.
  ~ Albert Einstein

---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] Two ears and classcastexception :( please, help!!

2004-01-28 Thread Jae Gangemi

  if you want to have two scoped ears in the same VM communicate w/ each other, then 
you need to 
extract the common interfaces out of both of the scoped ears and either deploy them as 
standalone jars,
or package them up into an *unscoped* ear.  

  ie: 

  A.ear is scoped and exposes it's interface via a class called Foo.

  B.ear is scoped and needs to use interface Foo to access A.ear

  remove class Foo from both A.ear and B.ear and either deploy it in a standalone jar 
or 
repackage it up in the unscoped ear and you'll be good to go. the whiteboard picture 
would
look something like this: 

Foo.jar or Foo.ear (unscoped)

A.ear (scoped)  B.ear (scoped)

  so when A.ear asks for interface Foo, it sees that it is not available via it's 
classloader and
then asks for it from the top level class loader. the same thing occurs w/ B.ear - it 
can't find
the class, and asks the top level loader, leaving both ears to get the same class 
loader definition. 
this also now allows you to hot deploy A.ear and/or B.ear w/o having to restart jboss.

-jae 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Francisco Figueiredo Jr.
Sent: Monday, January 26, 2004 2:22 PM
To: [EMAIL PROTECTED]
Subject: [JBoss-user] Two ears and classcastexception :( please, help!!



Hi all,

I'm trying to get one application inside an .ear to use beans inside another .ear.

On both ear's I'm using custom class loader through the loader-repository tag in 
jboss-app.xml.

On both ears, in their application.xml I expose a jar containing the ejb interfaces 
using the module tag.

The problem is that when I try to call a getHome in one ear, it throws 
classcastexception when trying to call narrow method in PortableRemoteObject class.


Am I doing something wrong?

I'm sure the classcastexception is generated because of the different class loaders.  
I read the JBOSS admin guide in the section about classloaders and 
indeed I did a modification in the code which calls the narrow method and I could 
check they are from different classloaders.

what I get from calling narrow is this:

[EMAIL PROTECTED]
url=file:/opt/jboss-3.2.3/server/default/tmp/deploy/tmp43175corporativo.ear
,addedOrder=45}

what I get from the ear calling the get home is this:

[EMAIL PROTECTED]
url=file:/opt/jboss-3.2.3/server/default/tmp/deploy/tmp43176temis.ear
,addedOrder=46}


I can see that the class loaders are in fact different. But from my two disparate ears!



I mean, I thought if I used custom classloaders, it would not be visible by other 
applications in other classloaders.

Am I missing something?

What can I do to solve that?

Please, help me. I'm desperate! :)

Thanks in advance.

Regards,

Francisco Figueiredo Jr.

=
Regards,
Francisco Figueiredo Jr.
---
My grandfather once told me that there are two kinds of people: those who work and 
those who take the credit. He told me to try to be in the first group; there was less 
competition there.
- Indira Gandhi

__

Yahoo! GeoCities: a maneira mais fácil de criar seu web site grátis! 
http://br.geocities.yahoo.com/


---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of 
Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn 
___
JBoss-user mailing list
[EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user


---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] Two ears and classcastexception :( please, help!!

2004-01-27 Thread Francisco Figueiredo Jr.


Hi all,

I'm trying to get one application inside an .ear to use beans inside another
.ear.

On both ear's I'm using custom class loader through the loader-repository tag
in jboss-app.xml.

On both ears, in their application.xml I expose a jar containing the ejb
interfaces using the module tag.

The problem is that when I try to call a getHome in one ear, it throws
classcastexception when trying to call narrow method in PortableRemoteObject
class.


Am I doing something wrong?

I'm sure the classcastexception is generated because of the different class
loaders.  I read the JBOSS admin guide in the section about classloaders and 
indeed I did a modification in the code which calls the narrow method and I
could check they are from different classloaders.

what I get from calling narrow is this:

[EMAIL PROTECTED]
url=file:/opt/jboss-3.2.3/server/default/tmp/deploy/tmp43175corporativo.ear
,addedOrder=45}

what I get from the ear calling the get home is this:

[EMAIL PROTECTED]
url=file:/opt/jboss-3.2.3/server/default/tmp/deploy/tmp43176temis.ear
,addedOrder=46}


I can see that the class loaders are in fact different. But from my two
disparate ears!



I mean, I thought if I used custom classloaders, it would not be visible by
other applications in other classloaders.

Am I missing something?

What can I do to solve that?

Please, help me. I'm desperate! :)

Thanks in advance.

Regards,

Francisco Figueiredo Jr.


__

Yahoo! GeoCities: a maneira mais fácil de criar seu web site grátis!
http://br.geocities.yahoo.com/


---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] Two ears and classcastexception :( please, help!!

2004-01-27 Thread Francisco Figueiredo Jr.

Hi all,

I'm trying to get one application inside an .ear to use beans inside another
.ear.

On both ear's I'm using custom class loader through the loader-repository tag
in jboss-app.xml.

On both ears, in their application.xml I expose a jar containing the ejb
interfaces using the module tag.

The problem is that when I try to call a getHome in one ear, it throws
classcastexception when trying to call narrow method in PortableRemoteObject
class.


Am I doing something wrong?

I'm sure the classcastexception is generated because of the different class
loaders.  I read the JBOSS admin guide in the section about classloaders and 
indeed I did a modification in the code which calls the narrow method and I
could check they are from different classloaders.

what I get from calling narrow is this:

[EMAIL PROTECTED]
url=file:/opt/jboss-3.2.3/server/default/tmp/deploy/tmp43175corporativo.ear
,addedOrder=45}

what I get from the ear calling the get home is this:

[EMAIL PROTECTED]
url=file:/opt/jboss-3.2.3/server/default/tmp/deploy/tmp43176temis.ear
,addedOrder=46}


I can see that the class loaders are in fact different. But from my two
disparate ears!



I mean, I thought if I used custom classloaders, it would not be visible by
other applications in other classloaders.

Am I missing something?

What can I do to solve that?

Please, help me. I'm desperate! :)

Thanks in advance.

Regards,

Francisco Figueiredo Jr.

=
Regards,
Francisco Figueiredo Jr.
---
My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there.
- Indira Gandhi

__

Yahoo! GeoCities: a maneira mais fácil de criar seu web site grátis!
http://br.geocities.yahoo.com/


---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user