[ruby-oci8-devel] propose to implement pooling technology for Ruby-OCI8

KUBO Takehiro kubo at jiubao.org
Fri Jan 18 01:57:35 EST 2008


Hi,

>  Many thanks for reminding me the points above. Now I am adding APIs like
> OCISessionGet() into the apiwrap.yml/apiwrap.c.tmpl. I want to ask
>  what the meaning of remote API and  local API is in the file
> apiwrap.c.tmpl? See the following:

You have no need to modify apiwrap.c.tmpl to add OCISessionGet().
apiwrap.c.tmpl is a template file for ERB.
 ERB - http://www.ruby-doc.org/stdlib/libdoc/erb/rdoc/classes/ERB.html
apiwrap.rb reads apiwrap.yml and applys function definitions in apiwrap.yml
to apiwrap.c.tmpl to create apiwrap.c.

On Jan 18, 2008 2:38 PM, shiwei zhang <shiwei.zhang at oracle.com> wrote:
>
>  Hi, Kubo,
>
>  KUBO Takehiro wrote:
>
>  Hi,
>
> On Dec 29, 2007 6:25 PM, shiwei zhang <shiwei.zhang at oracle.com> wrote:
>
>
>
>  I plan to choose OCISessionGet() for both connection pooling and session
> pooling, because OCISessionBegin() can't work in session pooling.
>
>  OK.
>
>
>
>  And for now I plan to provide pooling only for T_IMPLICIT, not for
> T_EXPLICIT, because: (1) OCI_SYSDBA, OCI_SYSOPER are not supported by
> pooling. (2) external credential is not supported by session pooling. (3)
> external credential is probably not supported by connection pooling.
>
>  I think you need to add a enum value T_POOL or so. It may be better to use
> more
> explanatory name as T_IMPLICIT -> T_OCI_LOGON, T_EXPLICIT ->
> T_OCI_SESSION_BEGIN, T_POOL -> T_OCI_SESSION_GET.
>
> ruby-oci8 supports Oracle 8.0 or later. Look at the following URL.
>  http://ruby-oci8.rubyforge.org/en/dev_APIWrap.html
>
> You may have known already. But I notice to make sure.
> 1. OCI8::ConnectionPool and OCI8::SessionPool must be defined by
> oci8_define_class_under
>  not rb_define_class_under because OCICPool and OCISPool are both OCI
> Handle.
> 2. When OCI8.new(user, pass, pool) is called, set pool as a parent of
> an instance of OCI8
>  by oci8_link_to_parent().
> 3. Add a mark function to OCI8 and call rb_gc_mark() to prevent its
> parent.from being freed.
>
> static oci8_base_class_t oci8_svcctx_class = {
>  NULL, <- add a new mark callback function.
>  oci8_svcctx_free,
>  sizeof(oci8_svcctx_t)
> };
>
>  Many thanks for reminding me the points above. Now I am adding APIs like
> OCISessionGet() into the apiwrap.yml/apiwrap.c.tmpl. I want to ask
>  what the meaning of remote API and  local API is in the file
> apiwrap.c.tmpl? See the following:
>  funcs.each do |f|
>    if f.version == 800
>      if f.remote
>  ######################################################################
>  ##
>  ## remote API without runtime-check - start
>  ##
>  ######################################################################
>
>
>  _______________________________________________
> ruby-oci8-devel mailing list
> ruby-oci8-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ruby-oci8-devel
>
>  Best Regards,
>  Shiwei
>
> _______________________________________________
> ruby-oci8-devel mailing list
> ruby-oci8-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ruby-oci8-devel
>
>


More information about the ruby-oci8-devel mailing list