On Wed, Mar 07, 2001 at 06:06:43PM -0600, Dan Kearns wrote:
> Hey there,
>
> thanks for the super-speedy fix for the null attributes! now I get to
> graduate to uglier problems...
Excellent!
> my jca adapter supports CCI, which defines the interfaces you have to use
> with your connections but leaves them devoid of any methods, thereby forcing
> you to do a narrowing conversion on the JCA adapter inbound, and in the
> client outbound. To the bean it looks like:
>
> Record output = getconnection().getinteraction().execute(InteractionSpec
> ispec, Record input)
>
> and in my case, the interaction keeps a reference to the real connection and
> passes the execute invocation directly to it.
>
> so, my client is an EJB stateless session bean "MetaBean" (I couldn't seem
> to get a reference from jndi to the connection factory from any client code
> outside of jboss - is that intentional?) and when I run it, I get a
It's a result of using the java:/ namespace, which is only visible inside
the JBoss VM. The reason for this is that there is no guarantee that
connections are serialisable or otherwise able to pass between JVMs.
Would it make sense for your connection objects to work across VMs? I
could make it an option to bind the factory to the global namesapce.
> ClassCastException on the JCA-side when I go to do
Sorry, what does "on the JCA-side" mean? Is this inside your resource
adapter code, or in your EJB code?
> SInteractionSpec sis = (SInteractionSpec)ispec;
>
> (which is is built like: InteractionSpec <-- SInteractionSpec <--
> SInteractionSpecImpl )
>
> Here's the console logging:
>
> [TRACE] com.xxx.impl.MetaBeanImpl: Got a Connection
> [TRACE] com.xxx.jca.cci.SNoTxInteraction: new
> SNoTxInteraction(com.siebel.sji.jca.cci.SNoTxConnection@4792d4)
> [TRACE] com.xxx.impl.MetaBeanImpl: Got an Interaction
> [TRACE] com.xxx.jca.cci.SNoTxInteraction: Record
> execute(com.xxx.jca.cci.SInteractionSpecImpl@78dc4c,
> com.xxx.impl.SRecordImpl@51283116)
>
> [TRACE] ispec class is:com.xxx.jca.cci.SInteractionSpecImpl
> [TRACE] ispec classloader is:java.net.URLClassLoader@3bdd48
>
> [TRACE] input class is:com.xxx.impl.SRecordImpl
> [TRACE] input classloader is:java.net.URLClassLoader@3bdd48
>
> [TRACE] My classloader is:java.net.URLClassLoader@3a1834
> [ERROR] com.xxx.jca.cci.SNoTxInteraction:
> Exception in class-cast:java.lang.ClassCastException:
> com.xxx.jca.cci.SInteractionSpecImpl
> [MetaBean] java.lang.ClassCastException:
> com.xxx.jca.cci.SInteractionSpecImpl
I don't understand where these messages are from. Can you post some code
that shows what you are actually logging?
> Is there a place I can put the classes which are shared between the bean and
> the rar? I tried lib/ext, and it did not work (threw class not found
> exceptions). Otherwise, is something wrong with the classloader setup? Or am
> I just doing something stupid?
At the moment, there is no way for an EJB to load classes from the RAR. If you
want to pass around anything other than standard interfaces then you'll need
to put those interfaces and/or classes somewhere accessible to both the EJB
classloader and the RAR classloader. The system classpath or lib/ext should
work.
Can you elaborate a bit on the structure of your app? E.g. in which files
are these classes located, and what the code in the bean looks like and
what the code in the RA looks like. Also, include stack traces.
Toby.
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]