[jboss-user] [IronJacamar] - Re: Embedded JCA with Glassfish

John SMITH do-not-reply at jboss.com
Tue Nov 30 10:46:43 EST 2010


stackpeek [http://community.jboss.org/people/stackpeek] created the discussion

"Re: Embedded JCA with Glassfish"

To view the discussion, visit: http://community.jboss.org/message/573674#573674

--------------------------------------------------------------
Hi Jesper,

Thanks for your help. I used "new EmbeddedJCA(false)" to boot a clean environment, and deployed the following XML files: transaction.xml, stdio.xml, jca.xml.

I didn't deploy the naming.xml and comment all the dependencies to the "NamingServer" bean in each of these XML files.
I assume IronJacamar (IJ) can find the local naming environment (the Glassfish one), cause I could see the bindings of the different tx beans (UserTransaction, TransactionPropagationContextImporter, TransactionPropagationContextExporter, TransactionSynchronizationRegistry, TransactionManager) in the JNDI tree.

I still get the NotSerializableException from org.jboss.jca.core.connectionmanager.ccm.CachedConnectionManager (@see the stack at the end of this post).

I don't get any error at archive validation (I changed the BeanValidation namespace in order to prevent NamingException with java:comp namespace modification). I only get a warning when I use IJ in standalone, but the deployment is OK. I could browse the IJ administration console, and view my connection factory and its different configuration properties.


Below the initialization of the JCA container:

{code}
embeddedJca = new EmbeddedJCA(false);
embeddedJca.startup();

embeddedJca.deploy(getUrl("transaction.xml"));
embeddedJca.deploy(getUrl("stdio.xml"));
embeddedJca.deploy(getUrl("jca.xml"));

RAActivator raa = embeddedJca.lookup("RAActivator", RAActivator.class);
if (null == raa) throw new IllegalStateException("RAActivator not defined");
raa.setEnabled(false);

embeddedJca.deploy(getUrl("MyArchive.rar"));
embeddedJca.deploy(getUrl("my-ra.xml"));

raa.setEnabled(true);
{code}


Content of my-ra.xml:

<?xml version="1.0" encoding="UTF-8"?>
<resource-adapters>
    <resource-adapter>
        <archive>MyArchive.rar</archive>
        <transaction-support>XATransaction</transaction-support>
        <connection-definitions>
            <connection-definition jndi-name="eis/MyArchive" use-java-context="false" enabled="true" class-name="com.xxx.MCF">
            </connection-definition>
        </connection-definitions>
    </resource-adapter>
</resource-adapters>


Thanks for your help.


Caused by: java.lang.RuntimeException: com.github.fungal.spi.deployers.DeployException: Deployment file:/.../my-ra.xml failed
        ...
Caused by: com.github.fungal.spi.deployers.DeployException: Deployment file:/.../application-ra.xml failed
        at org.jboss.jca.deployers.fungal.RaXmlDeployer.doDeploy(RaXmlDeployer.java:291)
        at org.jboss.jca.deployers.fungal.RaXmlDeployer.deploy(RaXmlDeployer.java:174)
        at com.github.fungal.impl.MainDeployerImpl.deploy(MainDeployerImpl.java:162)
        at com.github.fungal.impl.MainDeployerImpl.deploy(MainDeployerImpl.java:77)
        at org.jboss.jca.embedded.EmbeddedJCA.deploy(EmbeddedJCA.java:169)
        ...
        ... 72 more
Caused by: java.lang.RuntimeException: Cant copy Serializable object:
        at com.sun.enterprise.naming.NamingUtils.makeCopyOfObject(NamingUtils.java:82)
        at com.sun.enterprise.naming.LocalSerialContextProviderImpl.bind(LocalSerialContextProviderImpl.java:89)
        at com.sun.enterprise.naming.SerialContext.bind(SerialContext.java:472)
        at org.jboss.util.naming.Util.bind(Util.java:105)
        at org.jboss.util.naming.Util.bind(Util.java:91)
        at org.jboss.jca.core.naming.ExplicitJndiStrategy.bindConnectionFactories(ExplicitJndiStrategy.java:140)
        at org.jboss.jca.deployers.fungal.AbstractFungalRADeployer.bindConnectionFactory(AbstractFungalRADeployer.java:209)
        at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:1344)
        at org.jboss.jca.deployers.fungal.RaXmlDeployer.doDeploy(RaXmlDeployer.java:273)
        ... 77 more
Caused by: java.io.NotSerializableException: org.jboss.jca.core.connectionmanager.ccm.CachedConnectionManager
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
        at com.sun.enterprise.naming.NamingUtils.makeCopyOfObject(NamingUtils.java:64)
        ... 85 more
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/573674#573674]

Start a new discussion in IronJacamar at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2098]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20101130/82fe26d8/attachment.html 


More information about the jboss-user mailing list