[JBoss-user] [Beginners Corner] - JNDI lookup does not work anymore *confused*

2004-11-17 Thread Bug-C
Hello,

Unfortunately the lookup for the Home object of my SessionBeans do not work 
anymore. I cannot figure out what the problem is. I deployed my ear archive. 
According to the JMX JNDI console, my beans are deployed correctly (see below 
the snippet of the JMX JNDI console).

When I now deploy my JUnitEE servlet and try to lookup the home interfaces, I 
always get a ClassCastException. The code I use is as follows:


  | javax.naming.InitialContext initialContext = new 
javax.naming.InitialContext();
  | Object objRef = 
initialContext.lookup("ejb/de.novatec.novacrm.administration.AdministrationInterface/Remote");
  | Object narrowed = javax.rmi.PortableRemoteObject.narrow(objRef, 
de.novatec.novacrm.administration.AdministrationInterfaceHome.class);
  | AdministrationInterfaceHome homeTest = (AdministrationInterfaceHome) 
narrowed;
  | 

The narrowing always throws an exception. I do not understand why this is 
happening. 

Thanks for your time,
Stefan


-- JNDI JMX Console information GLOBAL JNDI NAMESPACE -

  |   +- ejb (class: org.jnp.interfaces.NamingContext)
  |   |   +- de.novatec.novacrm.administration.AdministrationInterface (class: 
org.jnp.interfaces.NamingContext)
  |   |   |   +- Remote (proxy: $Proxy58 implements interface 
de.novatec.novacrm.administration.AdministrationInterfaceHome,interface 
javax.ejb.Handle)
  | 
-- JNDI JMX Console information end -

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3855504#3855504

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3855504


---
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Security & JAAS/JBoss] - Re: getCallerPrincipal() throws IllegalStateException: No se

2004-11-16 Thread Bug-C
Thanks a lot for this fast reply :) and even better you are correct and fixed 
my error :)

The problem is that I use AndroMDA (MDA generator) to create my beans and this 
tool creates a stateful session bean if attributes are given to the class. 
Unfortunately I removed all attributes (because I did not need them) and 
therefore a stateless session bean was created. I was not aware of the fact 
that I am not allowed to call the getCallerPrincipal()  inside the ejbCreate() 
method in case of a stateless session bean.

Thanks again,
Stefan

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3855337#3855337

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3855337


---
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Security & JAAS/JBoss] - getCallerPrincipal() throws IllegalStateException: No securi

2004-11-16 Thread Bug-C
Hello,

I have a problem with the getCallerPrincipal method with Jboss 3.2.6. When I 
try to call this method the container throws an IllegalStateException saying 
that no security context was set. I already searched the internet and saw that 
other people also have the same problem. Is this a bug with Jboss 3.2.6?

My code looks like that:
public void ejbCreate() {
  String principalName = context.getCallerPrincipal().getName();
  [... do some additional stuff with the user ...]
}

the setSessionContext method is implemented and sets the context variable.

Thanks for your time,
Regards, Stefan

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3855334#3855334

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3855334


---
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Possible to refer to classes that will be generated late

2004-09-10 Thread Bug-C
"chiba" wrote : As you know, you cannot unload a class from
  | the JVM.

*hmm* that's bad. I thought that this is perhaps also possible. Thanks a lot for your 
answers :)

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3847787#3847787

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3847787


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Possible to refer to classes that will be generated late

2004-09-08 Thread Bug-C
Hi Chiba,

Yes exactly like that. I have a class A that contains a reference to an instance  of 
class B and a class B which has a refence to A. Thanks for your answer, I think it 
could do it like that.

One final question:
Is is possible to unload created classes later on? I just ask as I also would need 
that for my application, but I do not find an unloadClass method (or the like) in the 
ClassPool class.

Thanks,
Stefan

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3847527#3847527

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3847527


---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user