title: python cx_Oracle.Connection proxying to share between process - I get an error when creating a cursor on a shared connection object
body: <p>I am trying to write a load app on Oracle using python and I neeed some concurrency. 
  I am doing this by sharing a connection pool to be used by child processes but before going into that I tried to share a simple Connection object from a manager process to a child.</p>
  
  <p>The connection object is shared properly using the proxy object, but when I try to create a cursor on this connection I get smth like :
  ></p>
  
  <p>And the cursor is not usable.</p>
  
  <p>Here is my code :</p>
  
  <pre><code>import cx_Oracle
  from multiprocessing import managers
  from multiprocessing import current_process
  from multiprocessing import Process
  import time
  
  
  #function to setup the connection object in manager process
  def setupConnection(user,password,dsn):
      conn = cx_Oracle.connect(user=user,password=password,dsn=dsn)
      return conn
  
  #proxy object for my connection
  class connectionProxy(managers.BaseProxy):
      def close(self):
          return self._callmethod('close',args=())
      def ping(self):
          return self._callmethod('ping',args=())
      def cursor(self):
          return self._callmethod('cursor',args=())
  
  #connection manager
  class connectionManager(managers.BaseManager): pass
  
  #child process work function
  def child(conn_proxy):
      print(str(current_process().name) + "Working on connection : " + str(conn_proxy))
      cur = conn_proxy.cursor()
      print(cur)
      cur.execute('select 1 from dual');
  
  if __name__ == '__main__' :
      #db details
      user = 'N974783'
      password = '12345'
      dsn = '192.168.56.6:1521/orcl'
  
      #setup manager process and open the connection
      manager = connectionManager()
      manager.register('set_conn',setupConnection,proxytype=connectionProxy,exposed = ('close','ping','cursor'))
      manager.start()
  
      #pass the connection to the child process
      conn_proxy = manager.set_conn(user=user,password=password,dsn=dsn)
      p = Process(target=child, args=(conn_proxy,),name='oraWorker')
      p.start()
      p.join()
  </code></pre>
  
  <p>I get the following output:</p>
  
  <pre><code>oraWorker Working on connection : &lt;cx_Oracle.Connection to N974783@192.168.56.6:1521/orcl&gt;  
  &lt;cx_Oracle.Cursor on &lt;NULL&gt;&gt; ..
  cur.execute('select 1 from dual');  
  cx_Oracle.InterfaceError: not open
  </code></pre>
  
  <p>Can someone give me an idea on how should I get past this ? </p>
  
  <p>Thanks,
   Ionut</p>