You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "David Jencks (JIRA)" <ji...@apache.org> on 2011/06/25 23:29:47 UTC

[jira] [Created] (OPENEJB-1616) Allow more choice in sending datasources to clients over openejb jndi transport

Allow more choice in sending datasources to clients over openejb jndi transport
-------------------------------------------------------------------------------

                 Key: OPENEJB-1616
                 URL: https://issues.apache.org/jira/browse/OPENEJB-1616
             Project: OpenEJB
          Issue Type: Improvement
          Components: server
    Affects Versions: 4.0
            Reporter: David Jencks
            Assignee: David Jencks
             Fix For: 4.0


In geronimo we need to send global scope datasource definitions over the remote jndi connection to app clients.  We can do this by using naming references.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OPENEJB-1616) Allow more choice in sending datasources to clients over openejb jndi transport

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-1616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13054972#comment-13054972 ] 

David Jencks commented on OPENEJB-1616:
---------------------------------------

rev. 1139629

> Allow more choice in sending datasources to clients over openejb jndi transport
> -------------------------------------------------------------------------------
>
>                 Key: OPENEJB-1616
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1616
>             Project: OpenEJB
>          Issue Type: Improvement
>          Components: server
>    Affects Versions: 4.0
>            Reporter: David Jencks
>            Assignee: David Jencks
>             Fix For: 4.0
>
>
> In geronimo we need to send global scope datasource definitions over the remote jndi connection to app clients.  We can do this by using naming references.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] [Commented] (OPENEJB-1616) Allow more choice in sending datasources to clients over openejb jndi transport

Posted by David Blevins <da...@gmail.com>.
On Jun 26, 2011, at 5:13 PM, David Jencks wrote:

> BTW I noticed that the externalizable objects are all handled with 
> 
> externalizable.write(out)
> 
> and the serializable ones
> 
> out.writeObject(ser)
> 
> rather than using 
> out.writeObject(ser)
> 
> for all of them.  Is this to save a little bit of overhead writing the class definition etc?

Right.  Essentially all the metadata for a class is boiled down to a byte, then what follows is pure data.  In the absence of that, Java serialization tends to be the worst of both worlds (a text protocol and a binary protocol).


-David

>> On Jun 26, 2011, at 12:37 PM, David Jencks (JIRA) wrote:
>> 
>>> 
>>>  [ https://issues.apache.org/jira/browse/OPENEJB-1616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13055156#comment-13055156 ] 
>>> 
>>> David Jencks commented on OPENEJB-1616:
>>> ---------------------------------------
>>> 
>>> rev 1139925 separates dbcp datasources and References and actually works with geronimo.
>>> 
>>>> Allow more choice in sending datasources to clients over openejb jndi transport
>>>> -------------------------------------------------------------------------------
>>>> 
>>>>              Key: OPENEJB-1616
>>>>              URL: https://issues.apache.org/jira/browse/OPENEJB-1616
>>>>          Project: OpenEJB
>>>>       Issue Type: Improvement
>>>>       Components: server
>>>> Affects Versions: 4.0
>>>>         Reporter: David Jencks
>>>>         Assignee: David Jencks
>>>>          Fix For: 4.0
>>>> 
>>>> 
>>>> In geronimo we need to send global scope datasource definitions over the remote jndi connection to app clients.  We can do this by using naming references.
>>> 
>>> --
>>> This message is automatically generated by JIRA.
>>> For more information on JIRA, see: http://www.atlassian.com/software/jira
>>> 
>>> 
>>> 
>> 
> 


Re: [jira] [Commented] (OPENEJB-1616) Allow more choice in sending datasources to clients over openejb jndi transport

Posted by David Jencks <da...@yahoo.com>.
On Jun 26, 2011, at 3:33 PM, David Blevins wrote:

> Really nice change.
> 
> Made a mental note that we could probably switch the DBCP stuff over to using this approach as well.  Would probably turn out a lot cleaner.

Hard to tell.  It works great with aries osgi jndi because you can register the ObjectFactory that deciphers the Reference as an osgi service so it can get as many system component references as it needs to do its job (such as the tx manager and connection tracker for this example).  It may be less useful with plain jndi where you are supposed to use an ObjectFactory that has a no-arg constructor (and no way to hook into the environment).

What I did here....

data object with the relevant configuration data.  I construct the Reference so it has the class name of my special ObjectFactory and a single BinaryRefAddr with the serialized data object (this prevents problems finding the right classloader to deserialize on the client).

On the client, we get the reference, use NamingManager to figure out what it is, and the aries stuff gets the ObjectFactory service from the class name.  The OF deserializes the binary goo (it has the right classloader) and constructs the connection manager, MCF, datasource, etc using its txmanager and cx tracker references.

(most of this stuff is in geronimo, hopefully committed soon)

BTW I noticed that the externalizable objects are all handled with 

externalizable.write(out)

and the serializable ones

out.writeObject(ser)

rather than using 
out.writeObject(ser)

for all of them.  Is this to save a little bit of overhead writing the class definition etc?

thanks
david jencks

> 
> We could probably use this for a number of things.
> 
> 
> -David
> 
> 
> On Jun 26, 2011, at 12:37 PM, David Jencks (JIRA) wrote:
> 
>> 
>>   [ https://issues.apache.org/jira/browse/OPENEJB-1616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13055156#comment-13055156 ] 
>> 
>> David Jencks commented on OPENEJB-1616:
>> ---------------------------------------
>> 
>> rev 1139925 separates dbcp datasources and References and actually works with geronimo.
>> 
>>> Allow more choice in sending datasources to clients over openejb jndi transport
>>> -------------------------------------------------------------------------------
>>> 
>>>               Key: OPENEJB-1616
>>>               URL: https://issues.apache.org/jira/browse/OPENEJB-1616
>>>           Project: OpenEJB
>>>        Issue Type: Improvement
>>>        Components: server
>>>  Affects Versions: 4.0
>>>          Reporter: David Jencks
>>>          Assignee: David Jencks
>>>           Fix For: 4.0
>>> 
>>> 
>>> In geronimo we need to send global scope datasource definitions over the remote jndi connection to app clients.  We can do this by using naming references.
>> 
>> --
>> This message is automatically generated by JIRA.
>> For more information on JIRA, see: http://www.atlassian.com/software/jira
>> 
>> 
>> 
> 


Re: [jira] [Commented] (OPENEJB-1616) Allow more choice in sending datasources to clients over openejb jndi transport

Posted by David Blevins <da...@gmail.com>.
Really nice change.

Made a mental note that we could probably switch the DBCP stuff over to using this approach as well.  Would probably turn out a lot cleaner.

We could probably use this for a number of things.


-David


On Jun 26, 2011, at 12:37 PM, David Jencks (JIRA) wrote:

> 
>    [ https://issues.apache.org/jira/browse/OPENEJB-1616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13055156#comment-13055156 ] 
> 
> David Jencks commented on OPENEJB-1616:
> ---------------------------------------
> 
> rev 1139925 separates dbcp datasources and References and actually works with geronimo.
> 
>> Allow more choice in sending datasources to clients over openejb jndi transport
>> -------------------------------------------------------------------------------
>> 
>>                Key: OPENEJB-1616
>>                URL: https://issues.apache.org/jira/browse/OPENEJB-1616
>>            Project: OpenEJB
>>         Issue Type: Improvement
>>         Components: server
>>   Affects Versions: 4.0
>>           Reporter: David Jencks
>>           Assignee: David Jencks
>>            Fix For: 4.0
>> 
>> 
>> In geronimo we need to send global scope datasource definitions over the remote jndi connection to app clients.  We can do this by using naming references.
> 
> --
> This message is automatically generated by JIRA.
> For more information on JIRA, see: http://www.atlassian.com/software/jira
> 
> 
> 


[jira] [Commented] (OPENEJB-1616) Allow more choice in sending datasources to clients over openejb jndi transport

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-1616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13055156#comment-13055156 ] 

David Jencks commented on OPENEJB-1616:
---------------------------------------

rev 1139925 separates dbcp datasources and References and actually works with geronimo.

> Allow more choice in sending datasources to clients over openejb jndi transport
> -------------------------------------------------------------------------------
>
>                 Key: OPENEJB-1616
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1616
>             Project: OpenEJB
>          Issue Type: Improvement
>          Components: server
>    Affects Versions: 4.0
>            Reporter: David Jencks
>            Assignee: David Jencks
>             Fix For: 4.0
>
>
> In geronimo we need to send global scope datasource definitions over the remote jndi connection to app clients.  We can do this by using naming references.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira