geronimo-xbean-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From javahan <jihai...@gmail.com>
Subject Re: [jira] Closed: (XBEAN-118) how remote access datasource by jndi
Date Mon, 15 Dec 2008 08:33:34 GMT



JIRA jira@apache.org wrote:
> 
> 
>      [
> https://issues.apache.org/jira/browse/XBEAN-118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
> ]
> 
> David Jencks closed XBEAN-118.
> ------------------------------
> 
>     Resolution: Won't Fix
> 
> This is out of scope for xbean-jndi.  xbean-jndi is designed to be an
> in-memory naming system.
> 
> The problem with trying to serialize and deserialize a datasource deployed
> in a javaee container is... you have 2 choices:
> 
> 1. set up the connection pool, managed connection factory, and transaction
> manager in the new vm.  This is never going to work..... e.g. what is the
> tm id going to be.
> 
> 2. proxy the connections back to the javaee server.  This also is
> ridiculous.  If you want db connectivity in a particular vm set up a
> datasource there adapted to the resources available in that vm.
> 
>> how remote access datasource by jndi
>> ------------------------------------
>>
>>                 Key: XBEAN-118
>>                 URL: https://issues.apache.org/jira/browse/XBEAN-118
>>             Project: XBean
>>          Issue Type: Wish
>>          Components: naming
>>    Affects Versions: 3.5
>>            Reporter: javahan
>>            Priority: Critical
>>
>> I'm trying to remote lookup a datasource object by jndi,but i can  get
>> the following exception.How do I do?
>> java.rmi.UnmarshalException: error unmarshalling return; nested exception
>> is: 
>> 	java.io.WriteAbortedException: writing aborted;
>> java.io.NotSerializableException: org.tranql.connector.jdbc.DataSource
>> 	at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:157)
>> 	at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
>> 	at javax.management.remote.rmi.RMIConnectionImpl_Stub.invoke(Unknown
>> Source)
>> 	at
>> javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.invoke(RMIConnector.java:972)
>> 	at
>> com.cvicse.inforsuite.system.jmx.KernelDelegate.invokeKernel(KernelDelegate.java:1188)
>> 	at
>> com.cvicse.inforsuite.system.jmx.KernelDelegate.invoke(KernelDelegate.java:697)
>> 	at
>> com.cvicse.inforsuite.kernel.basic.KernelOperationInvoker.invoke(KernelOperationInvoker.java:46)
>> 	at
>> com.cvicse.inforsuite.system.jmx.JMXProxyMethodInterceptor.intercept(JMXProxyMethodInterceptor.java:117)
>> 	at
>> com.cvicse.inforsuite.gjndi.GlobalContextGBean$$EnhancerByCGLIB$$6d77930b.lookup(<generated>)
>> 	at com.jmx.test.JndiServiceTest.testJndiObject(JndiServiceTest.java:55)
>> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> 	at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>> 	at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> 	at java.lang.reflect.Method.invoke(Method.java:585)
>> 	at junit.framework.TestCase.runTest(TestCase.java:154)
>> 	at junit.framework.TestCase.runBare(TestCase.java:127)
>> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
>> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
>> 	at junit.framework.TestResult.run(TestResult.java:109)
>> 	at junit.framework.TestCase.run(TestCase.java:118)
>> 	at
>> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
>> 	at
>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>> 	at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>> 	at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>> 	at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>> 	at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
>> Caused by: java.io.WriteAbortedException: writing aborted;
>> java.io.NotSerializableException: org.tranql.connector.jdbc.DataSource
>> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1309)
>> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
>> 	at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:290)
>> 	at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:139)
>> 	... 25 more
>> Caused by: java.io.NotSerializableException:
>> org.tranql.connector.jdbc.DataSource
>> 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
>> 	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
>> 	at sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:258)
>> 	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:304)
>> 	at sun.rmi.transport.Transport$1.run(Transport.java:153)
>> 	at java.security.AccessController.doPrivileged(Native Method)
>> 	at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
>> 	at
>> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
>> 	at
>> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
>> 	at java.lang.Thread.run(Thread.java:595)
> 
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-jira--Created%3A-%28XBEAN-118%29-how-remote-access-datasource-by-jndi-tp20949717p21009992.html
Sent from the xbean-dev mailing list archive at Nabble.com.


Mime
View raw message