-
1. Re: Using Anonymous class as argument to SSB
adrian.brock Dec 11, 2002 9:27 PM (in response to javajohnson)The server needs some code to execute, it can't
run an interface.
You could pass a remote object that calls back on the
client, but is that what you really want to do?
Regards,
Adrian -
2. Re: Using Anonymous class as argument to SSB
javajohnson Dec 12, 2002 8:57 AM (in response to javajohnson)I'll expand a bit from my first question about the class being anonymous. That appears to be irrelevant. I made the anonymous class a named inner class and still got the same issue.... hmm, wonder if I make it a regular non-inner class this may work... I'll try that, but anyway....
I know that the server cannot execute an interface, but the I thought the client would send across the bytecodes the server would need to operate on the object.
However, i can see a huge security hole by doing that!
Let me see if I can explain what I am trying to do.
I have a Stateless Session Bean in my application that takes an argument (actually 2, but I'll simplify it for example), that is a interface. This method is called both from my application, running on JBoss, and from an ANT task, obviously running in a seperate VM.
The J2EE application has its own object that implements the interface and passes it to the SSB. Same goes with the ANT task.
However, the actual object .class file is only in the SSB's classpath in the first case, where my application calls it. The ANT task is in a completely seperate classpath, and the .class file is inaccessible to JBoss.
Can I export the bytecode to the SSB somehow without adding the classpath of the ANT task?
Or am I missing something fundamentally easy? I hope thats the case :)
--Mark -
3. Re: Using Anonymous class as argument to SSB
adrian.brock Dec 13, 2002 6:37 PM (in response to javajohnson)You might want to investigate "codebase"
in the RMI specification.
Regards,
Adrian