Environment OBJECT vs THREADED_MUTEXED

Hello,
I am working on this project that required multi-threads environment, currently I am using occi on 10G oracle db.
When creating the occi environment I have to use THREADED_MUTEXED. This worked fine. Now I have to extend my program to include bind vector by using occi::setVector. In order to make setVector to work I need to create occi environment as OBJECT instead of THREADED_MUTEXED otherwise I will get the exception complaining about the object is not being created.
This creates a huge problem between creating OBJECT and THREADED_MUTEXED.
What do I need to do?
Thank in advance
Tim

prajithparan wrote:
There is a workaround for this ...,
In $ORACLE_HOME/rdbms/public/occiControl.h <A class=bodylinkwhite href="http://www.software-to-convert.com/mpeg4-conversion-software/mpeg4-to-h263-software.html"><FONT face=tahoma,verdana,sans-serif color=#000 size=1>file</FONT></A>The modes are defined as shown below
enum Mode
DEFAULT = OCI_DEFAULT,
OBJECT = OCI_OBJECT,
SHARED = OCI_SHARED,
NO_USERCALLBACKS = OCI_NO_UCB,
THREADED_MUTEXED = OCI_THREADED,
THREADED_UNMUTEXED = OCI_THREADED | OCI_ENV_NO_MUTEX,
EVENTS = OCI_EVENTS,
<B>OBJECT_THREADED = OCI_OBJECT|THREADED_MUTEXED</B>
USE_LDAP = OCI_USE_LDAP
However , I am NOT sure how far the Oracle Supports this.It is exactly what I need, Thanks for your analysis!

Similar Messages

  • Can Automation be used to send User-defined CC's to Environment objects?

    Hi, this is probably a really dumb question but I'll ask it anyway:
    I've bought a controller-environment for a synth (Alphajuno2, PG300 programmer) for Logic, the faders in the environment layer use sysex to communicate with the synth.
    Apparently it is possible to map an external midi-controller to these environment-faders, and that's all and fine, but what I'm after is a method of using automation to control the environment-faders. How would I go about doing it?
    I've only ever really automated some volume changes or plugin parameter changes, I've not yet automated faders in the environment, so how would I go about doing it?
    Would I create a fader which I'd link to the sysex-sending fader, and automate the fader, or maybe an environment-monitor (and add it to the arranger) and somehow configure a set of CC#'s to be automated with that arranger object, and then just cable them up to the various Sysex-sending faders (I do know enough to be able to set the input of those sysex-faders to match the CC#'s which the automation would be sending).
    Is this kind of "User-defined CC#'s in Automation" possible? How should I go about it?
    Message was edited by: esaruoho to further clarify it

    Is it just because there is currently no way whatsoever of Automation CC, and I should have known to use Hyper Draw to talk to an Environment object directly, which would then be connected to the Faders of choice?

  • How to disable coupling between audio tracks and environment objects?

    I would like my environment to remain static. When I delete tracks on the Arrange page the corresponding environment objects dissappear. Is there any way to defeat this?
    I couldn't find an answer in the L8 manual. Environment objects continue to disappear even when I "protect cabling/positions"

    Yep, you need to turn off LP8's new "Auto-manage audio objects" function in the prefs.
    Now, as in all previous versions of Logic, you can create whatever audio objects you need in the environment, and they will all stay there like good obedient little objects.

  • Creating Custom Environment Objects/Libraries

    The more I learn about the environment and its objects the more I've come to appreciate it. I can program in some of the more popular object oriented languages: including Objective-C. A fun project might be creating some brand new environment objects.
    Do any of you know where to get started. Is there an example somewhere?
    Message was edited by: Francisco Bido

    Bee Jay is right.
    However, there are many amazing free environments available for download which combine existing environment objects to create interesting results:
    I've created a parameter randomizer you can download it from here:
    http://tnttutorials.macprovideo.com/fileexchange/overview
    There are some other good ones available above and here:
    http://www.logicprohelp.com/viewforum.php?f=9&sid=05a42bd27cc1fc0191255803bf53e5 7a
    btw, you need to register to download environments from both these forums.
    Cheers
    Rounik

  • I have this error trying to setup the environment : ORA-32101

    i have this error trying to setup the environment :
    the execution :
    []-pedro:/home/pedro/modelo_v4>./occiteste
    inicio do programa
    antes do env _environment
    Can’t set the environment: Error while trying to retrieve text for error ORA-32101
    []-pedro:/home/pedro/modelo_v4>
    here is a piece of the code :
    Model.h
    #pragma once
    #include <iostream>
    #include <stdlib.h>
    #include <stdio.h>
    #include <ctype.h>
    #include <string>
    #include <occi.h>
    using namespace oracle::occi;
    using namespace std;
    private:
    int ret;
    Environment* env;
    Model .cpp
    Modelo::Modelo(void)
    try
    env = Environment::createEnvironment(Environment::DEFAULT);
    catch (SQLException ea)
    cerr << "Error : " << ea.what();
    ret = 1;
    []-pedro:/home/pedro/modelo_v3>ldd occiteste
    libocci.so.10.1 => /opt/users/ora10g/lib/libocci.so.10.1
    libclntsh.so.10.1 => /opt/users/ora10g/lib/libclntsh.so.10.1
    librt.so.1 => /usr/lib/hpux64/librt.so.1
    libnss_dns.so.1 => /usr/lib/hpux64/libnss_dns.so.1
    libdl.so.1 => /usr/lib/hpux64/libdl.so.1
    libm.so.1 => /usr/lib/hpux64/libm.so.1
    libpthread.so.1 => /usr/lib/hpux64/libpthread.so.1
    libunwind.so.1 => /usr/lib/hpux64/libunwind.so.1
    libstd_v2.so.1 => /usr/lib/hpux64/libstd_v2.so.1
    libCsup.so.1 => /usr/lib/hpux64/libCsup.so.1
    libc.so.1 => /usr/lib/hpux64/libc.so.1
    libnnz10.so => /opt/users/ora10g/lib/libnnz10.so
    librt.so.1 => /usr/lib/hpux64/librt.so.1
    libnss_dns.so.1 => /usr/lib/hpux64/libnss_dns.so.1
    libdl.so.1 => /usr/lib/hpux64/libdl.so.1
    libm.so.1 => /usr/lib/hpux64/libm.so.1
    libpthread.so.1 => /usr/lib/hpux64/libpthread.so.1
    libunwind.so.1 => /usr/lib/hpux64/libunwind.so.1
    libdl.so.1 => /usr/lib/hpux64/libdl.so.1
    libuca.so.1 => /usr/lib/hpux64/libuca.so.1
    []-pedro:/home/pedro/modelo_v3>
    thanks

    yes , the OBJECT gives the same result
    the platform is HP-UX 64 bits :
    /opt/aCC/bin/aCC DD64    -AA -DOCCI_NO_WSTRING=1 DD64 -D_RWSTD_MULTI_THREAD -I/opt/users/ora10g/rdbms/demo -I/opt/users/ora10g/rdbms/public -I/opt/users/ora10g/plsql/public -I/opt/users/ora10g/network/public -DHPUX -D_REENTRANT -DHPUX_KTHREAD -DSLXMX_ENABLE -DSLTS_ENABLE -DSS_64BIT_SERVER -DBIT64 -DMACHINE64 -DORAIA64 -DHPUX_IA64 -c Main_Program.cpp
    /opt/aCC/bin/aCC DD64    -AA -DOCCI_NO_WSTRING=1 DD64 -D_RWSTD_MULTI_THREAD -I/opt/users/ora10g/rdbms/demo -I/opt/users/ora10g/rdbms/public -I/opt/users/ora10g/plsql/public -I/opt/users/ora10g/network/public -DHPUX -D_REENTRANT -DHPUX_KTHREAD -DSLXMX_ENABLE -DSLTS_ENABLE -DSS_64BIT_SERVER -DBIT64 -DMACHINE64 -DORAIA64 -DHPUX_IA64 -c Modelo.cpp
    /opt/aCC/bin/aCC +DD64 -o  occiteste Main_Program.o Modelo.o -L/opt/users/ora10g/lib -locci -lclntsh   `cat /opt/users/ora10g/lib/sysliblist`  -lm  
    []-pedro:/home/pedro/modelo_v4>ls -la
    DEFAULT is used for creating an Environment object; it has no thread safety or object support.
    OBJECT is for creating an Environment object; it uses object features.
    SHARED is for creating an Environment object.
    NO_USERCALLBACKS is for creating an Environment object; it does not support user callbacks.
    THREADED_MUTEXED is a thread safe mode for creating an Environment object, mutexed internally by OCCI.
    THREADED_UNMUTEXED is a thread safe mode for creating an Environment object; the client is responsible for mutexing.
    EVENTS supports registration for event notification used in Oracle Streams Advanced Queuing.
    USE_LDAP supports registration with LDAP.

  • Named Anchored Obj-Environment Failover

    Hi to all,
    We connect from EnvA to EnvB giving the user directory parameter as / and
    set the Environment Search Path
    as EnvA:EnvB. From both environments we start and register
    '/glob/obj1' named anchored objects with the same name.
    From a client we connect to EnvA and bind to'/glob/obj1' when we shutdown EnvA partition it fails-over to
    EnvB. And then we restart EnvA partition. We restart/rebind the client and
    try to use object. We see that it is using the EnvB object.
    Although we started the primary environment object again.
    It is not using the search path. Once we shutdown secondary environment
    it starts using primary environment object.
    When we try to use relative path when we are binding the object
    First parameter ('glob/obj1') No first slash. Trying 3rd parameter
    for bind function or just using environment search path, Is is not able to
    find the object. From nsls command I figured out that
    under the root directory
    /forte/UUID of ENVA/node
    /site
    /UUID of ENVB
    /glob/obj1
    names are available. When we use relative path (without slash)
    is it trying to find /glob/obj1 under the /forte/UUID of ENVA
    but we are registering the name under the root.
    What is the reason of this odd behaviour or is this a bug?
    Any answer will be appreciated,

    Hi Juliesmiley,
    According to your description, I recommend you check the conditions required for an automatic  failover.
      • Primary replica and secondary replica are both configured for syschronous-commit mode and set to AUTOMATIC failover.
      •  All availability databases that are defined in the availability group must be in a SYNCHRONIZED state between the primary replica and the secondary replica.
      • The Windows Server Failover Clustering (WSFC) cluster has quorum.
      • The primary replica has become unavailable.
    For more information, please review the following articles.
    Failover and Failover Modes (AlwaysOn Availability Groups)
    Troubleshooting automatic failover problems in SQL Server 2012 AlwaysOn environments
    Thanks,
    Lydia Zhang

  • How can I close BDB  Environment and EntityStore in RMI Application

    Hi,all.
    I create Only one instance of the Environment object and one instance of the EntityStore Object when the RMI server is first started,like this:
    public class CalculatorServer {
    protected Environment env;
    protected EntityStore store;
    public CalculatorServer() {
    try {
    initBDB();
    String hostkey = "java.rmi.server.hostname";
    String rmisHost = "127.0.0.1";
    int port = 30000;
    Registry reg = (Registry) null;
    System.setProperty(hostkey, rmisHost);
    reg = LocateRegistry.createRegistry(port);
    reg.bind("/service/testrmi", new CalculatorImpl().initObject());
    } catch (RemoteException e) {
    e.printStackTrace();
    } catch (AlreadyBoundException e) {
    e.printStackTrace();
    public void initBDB() {
    EnvironmentConfig envConfig = new EnvironmentConfig();
    envConfig.setAllowCreate(true);
    /** 设置事务 **/
    envConfig.setTransactional(false);
    envConfig.setLockTimeout(5, TimeUnit.SECONDS);
    env = new com.sleepycat.je.Environment(new File("test1"), envConfig);
    StoreConfig storeConfig = new StoreConfig();
    storeConfig.setAllowCreate(true);
    /** 设置事务 **/
    storeConfig.setTransactional(false);
    /** 是否开启延迟写入**/
    storeConfig.setDeferredWrite(true);
    store = new EntityStore(env, "entityStore", storeConfig);
    public static void main(String args[]) {
    new CalculatorServer();
    1) in this approach,Do I need to close Environment and EntityStore?
    thanks

    The code you posted is not the BDB JE code you're using, so it doesn't help to diagnose the problem you're having. Please post your EnvironmentConfig and StoreConfig setup code, and your code to use Transactions, if any.
    If your store is not transactional (EntityStore.setTransactional(true)), the data is not guaranteed to be durable/persistent until you call Environment.sync, or close the Environment cleanly. If your store is transactional, then durability is controlled by the TransactionConfig you use, or the Durability parameter of the Transaction.commit method. The default durability is set using EnvironmentMutableConfig.setDurability.
    Be sure to close the EntityStore and Environment cleanly when your program exists, as I mentioned earlier.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Memory leak with multi-threaded environment

    When starting an environment with the THREADED_MUTEXED
    or THREADED_UNMUTEXED mode parameter, the oracle OCCI API
    has a memory leak. This can be demonstrated by modifying
    the "occidml.cpp" demo program as follows:
    Replace line 26:
    env = Environment::createEnvironment (Environment::DEFAULT);
    with
    env = Environment::createEnvironment (Environment::THREADED_MUTEXED);
    And replace line 164:
    demo->displayAllRows();
    with
    for (int ii=0; ii<10000; ii++) demo->displayAllRows();
    Recompile and run the program, and use "top" to see the
    size of the process's used memory continually increase
    unbounded.
    I am using the Oracle 9.2.0.1.0 database on Linux,
    gcc version 2.96.
    Is anyone aware of a fix for this problem?

    Yeah, I did suffer from this.
    If possible , you can switch to using OCCI on Oracle 10G client , you will find no memory leak issue anymore.
    Another issue is that OCCI is using default connection-blocking implementation , if a DB connection is blocked by accident just like plugging out the network link, you can not get any timeout or connection closed indications. You must implement your own OCCI connection timeout strategy, and you must kill the thread/process you are using.

  • Logic "Environment" Discussion List?

    Please consider creating a new "Environment" discussion list in the Logic forums. In my humble opinion this area of the Logic application warrants a focused discussion. In fact if enough traffic is generated I would also hope to see sub topical discussion lists. For example, the transformer and fader objects are highly robust Environment objects that deserve their own lists. Also, I'd love to see a "User Tips" sub topical discussion for the Logic Environment.
    Thank you for your consideration.
    Cheers...

    Hi aspsa!
    As well as posting in this Forum, you can also submit your suggestions, using this form Apple - Website Feedback.
    Good Luck!
    ali b

  • MIDI Transformer Object

    Is it possible to have the transformer object in the environment combine a note and a MIDI CC value and output different notes depending on the range that the CC value falls into? I'm trying to convert the hi-hat output from my V-drums into several different notes. Hitting the hi-hat pad produces the note A#2 and moving the pedal up or down generates data on CC#4 (in order to gradually progress from open hi-hat to closed hi-hat.) Superior Drummer and other plugins support hi-hat CC data out of the box, but I want to use Addictive Drums which doesn't support this. Basically, I want to implement some simple if statements. So for example:
    - IF incoming note = A#2 and CC#4 is between 1 and 30, output note X
    - IF incoming note = A#2 and CC#4 is between 31 and 60, output note Y
    and so on...
    Is it possible to do this in Logic? If it can't be done with out of the box environment objects, is there any way to program objects for Logic, or MIDI plugins? I have plenty of programming experience but haven't been able to find much on extending Logic with MIDI plugins.

    Again, the answer is yes. Unfortunately, as far as I know, you can't do this in one operation.
    IF incoming note = A#2 and CC#4 is between 1 and 30, output note X
    IF incoming note = A#2 and CC#4 is between 31 and 60, output note Y
    Will have to be done along these lines.
    transformer 1: Status = Note: Pitch = A#2: Mode = Condition splitter(True -> top cable)
    top cable to transformer 2
    transformer 2: Status = Control: Data Byte 1 >= 30 (whichever > means less than; (it's late)): Mode = Condition splitter(True -> top cable)
    send the lower cable from transformer 2 to transformer 3
    set transformer 3 as for transformer 2 except Data Byte 1 >=60
    You could end up with quite a complex chain of transformers. Don't worry; if they are set up correctly, they will do what you want with little or no latency.
    I have used these type of commands combined with delays to create a complete arrangement for piano, synths, bass & drums from a single note. It was an interesting exercise.
    I hope this makes sense & that it helps you sort out your problem.

  • Local object and development class?

    wht r local objects ?
    and
    wht is development class?

    Hi,
    Local Objects are the Objects which are not transportable.They are saved in the server n we can't create a Tranport Request.
    Development classes collect together development environment objects that can be considered as a unit and should therefore also be corrected and transported together. A development class can, for example, consist of a transaction or a group of related transactions.
    You can say in simple word, Development class is like Folder which will have the collection of objects(Report, class etc) for a assigned Proejcts.
    If you save objects in Local Class ,you are not able to transport from one system to another.If you save it into a Development Class ,you can transport objects from one system to another.
    Have a look at these links.
    http://help.sap.com/saphelp_46c/helpdata/en/d1/80194b454211d189710000e8322d00/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/af/40bd38652c8c42e10000009b38f8cf/content.htm
    Regards,
    Priyanka.

  • Environment can't do everything!

    Hi folks!
    Has anyone else ever tried to build an environment that incorporates the items in the pedalboard? None of them respond to environment objects despite the fact that the monitors CLEARLY show successful passage of midi information through the channel strip FROM the environment system. Is there a good reason why the Pedalboard is the only plug-in that doesn't respond to the environment? I find that hard to believe since it is easily automated in the arrange window. Of course, sometimes building a useful environment system makes it MUCH easier than automating 3-4 parameters for a specific sound. (I say this to avoid responses that say, "Why don't you just automate it?")
    Jamie

    I am wondering how you actually "output" the HH velocities to the bus is the first place.
    Remember, all a "track" is is an arrange track, coupled with an environment object. You can send data in MIDI regions on a track to any environment object, by assigning that environment object to that track.
    Simple example - open an arrange window and an environment window. On a spare environment layer, create a new "Instrument" object, call it "Test" or something. Make sure it's 'Icon" is ticked.
    In the arrange, select a track (or create a new one). Control-click on the track header, select "Reassign" and up will come a popup menu of all environment layers, and all visible objects in each of those layers. Select your "Test" instrument, and it gets assigned to your track.
    Now, all MIDI data is being sent to that instrument object.
    Look at the parameters of that object. Of course, you can cable this object to other objects, transformers etc, but instruments have a MIDI channel and MIDI port setting. In the "Test" instrument, set it's output port to "IAC Bus". Now, all MIDI data arriving at that instrument will be sent on that channel to the IAC bus.
    So, anytime you need to send MIDI out of Logic, whether it's on a MIDI interface to physical MIDI hardware, or to the IAC Bus, just make sure your desired MIDI stream ends up at an instrument object set to the desired output port.
    If I had a "DX7" keyboard on MIDI Port 3, channel 4, I'd do exactly the same thing - create an Instrument object, called "DX7", with the MIDI port set to Port 3, and the MIDI channel set to 4. Now, when I want to sequence my DX7, I simply create a track and assign the "DX7" instrument to it, and that data goes to the DX7 - and I no longer have to remember or care what port and channel it's on.
    This is a fundamental design in Logic.

  • Get an error when I was trying to new a Enviroment object

    As you see, the code is very simple, and i got an exception when I was trying to execute the following code env = Environment::createEnvironment (Environment::OBJECT); I have also tried env = Environment::createEnvironment ();
    The result is exactly the same, I looked up the errorcode table on the oracle website, the explanation is ORA-32104: cannot retrieve OCI error message
    Cause: Error message after an OCI call could not be retrieved.
    Action: This is an internal OCCI Error. Please contact customer support.
    So I am confused with the error, any help would be greatly appreciated.
    I use the VS 2005 with the dll and lib released by oracle for oracle 10G
    #include <iostream>
    #include <algorithm>
    #include <occi.h>
    using namespace oracle::occi;
    using namespace std;
    int main (int argc, _TCHAR* argv[])
    Environment *env;
    try
         env = Environment::createEnvironment (Environment::OBJECT);
    catch(SQLException e)
         cout << e.getErrorCode();
    }

    This could be a problem with Ur client installations. ENVs are not set properly. Reinstall the client and try.
    Is your SQLPLUS is working fine.....???
    Then it could be a lib mismtach.

  • Locking/protecting environment values ?

    The manual recommends that you never assign two audio objects to the same channel.
    Wow... I did that by accident today, and it's horribly confusing. I created two channel strips assigned to the same output track, and it's a mess--you get two channel strips with different names, so they look like two different objects in the track mixer, but they're effectively the same object. Any changes to one of the objects (fader, pan, insert, etc.) take effect on both objects.
    I can't think of a reason why anyone would ever want this behavior. Maybe someone else can ? Actually, I don't really understand what is to be gained by having an adjustable channel assignment for a track object, anyway. Is there some power here that I'm not seeing ? Would Logic lose functionality if it forced all track objects to be assigned to unique channels ?
    I'm new to Logic, so I'm looking for any tips in how to avoid shooting myself in the foot with arrange tracks, audio objects, and output channels.
    As best I can tell, once I create a track assigned to an audio object, I am almost never going to want to change that audio object assignment. And I can't see why I would EVER want to change the output channel assigned to a track object.
    Is there some way to lock these settings so they aren't easily changed by an errant mouse click in the arrange window ? I want to leave the object parameters visible so I can change the instrument name easily, but having those object and channel settings immediately available to be changed seems like a problem waiting to happen. If either of those settings gets changed to match another arrange track, I'm likely to have what are effectively overlapping regions, so I'll stop hearing regions that are still visible in the arrange window.
    Is there any way to lock these settings so they can't be screwed up once they're set ?
    Alternatively, is there any way to get Logic to identify audio objects that are incorrectly assigned to the same output channel ? And is there any way to get Logic to identify audio regions that aren't literally "overlapping" on the same arrange track, but are nevertheless still effectively "overlapping" because they're assigned to the same audio object ? I'd like to be confident that everything I see in the arrange window is actually going to play, and it seems like there are a bunch of ways this can go wrong.
    I'm new to Logic, and I'm still getting a feel for the workflow--thanks for any tips!
    James
    [email protected]
    Dual 1.25 G4   Mac OS X (10.4.8)  

    I was also wondering if it made sense to rename the
    environment object, or just add a track name. It
    seems
    like it will be less confusing to keep the
    environment
    object as created: Audio 1, Audio 2, Instrument 1,
    Instrument 2.
    That's the way I like it, but other tastes differ. I
    like to know on what and where I'm putting my audio,
    but I have seen other people not care about this -
    they just find a free track, regardless of where it
    is and of they go.
    Interesting--my concern is that since the output channels can still be changed easily, the default instrument names (Audio 1, Audio 2, etc.) seem less useful to me. i.e. your object might be called "Audio 1," but that doesn't necessarily bear any relation to anything physical inside or outside the computer. Maybe I'm not conscientious enough about managing my tracks, but the way I see it, I really shouldnly RELY on the instrument names to reflect channel assignments if this is something that I (or any musician touching the computer during a break...) can easily screw up. I'm leaning toward naming the objects with typical track names ("Lead VOX," etc.), especially since that gives me meaningful audio file naming without the need for separate track names (Use Audio Object Name for File Name).
    But, the saving grace in all of this for me may be "Create Multiple..."
    "Create Multiple" does exactly what I WISH "Create with Next Instrument" would do (too bad the names are ambiguous): "Create Multiple" creates a new track (or several) with an unused instrument--it grabs an object out of the Environment if one exists, and it creates a new object if the Environment doesn't have one. Perfect! ("Create with Next Instrument" may or may not assign an unused instrument--that's not very useful in my opinion... seems to me that when you need a new track, you very clearly want either a used instrument or an unused instrument--you don't want uncertainty, or to have to reference the Environment to see what instruments exist...)
    Anyway, since I found I can set the default inputs and outputs for objects in the "Audio Configuration," I'm thinking maybe there isn't much point in having extra objects in the Environment at all. Just use "Create Multiple" to create a new track, and you automatically get a new, unused output object. Simple. And the "Create" command works great when you want a new "take" for an existing instrument.
    As a new user to Logic, I was left with the impression that the "right" way to work is to create enough objects in the Environment to handle most expected work. But for audio and instrument tracks, personally, I'm thinking it's WAY less confusing just to use "Create Multiple" to create tracks and objects only as I need them, rather than to start with a "big job" environment as created by the Setup Assistant.
    Hey, this frustrated me for a while, and I found a solution that is working for me, so I thought I'd share, in case anyone else finds it useful.
    There is one problem, though--I haven't figured out how to control which Environment layer gets the objects made by "Create Multiple"... I'll post a separate question about that.
    Thanks for all the advice, Bee Jay, and iSchwartz!
    James
    [email protected]

  • OCCI and Object Views

    Can you use OCCI with object views? Here is the problem that I am seeing:
    SCHEMA.SQL:
    CREATE TABLE EMP_TABLE
    empnumber NUMBER (5),
    job VARCHAR2 (20)
    CREATE TYPE EMPLOYEE_T as object
    empnumber NUMBER (5),
    job VARCHAR2 (20) )
    CREATE VIEW EMP_VIEW OF EMPLOYEE_T
    WITH OBJECT IDENTIFIER (empnumber) AS
    SELECT e.empnumber, e.job
    FROM EMP_TABLE e
    In the code, I try:
    env = Environment::createEnvironment(Environment::OBJECT);
    conn = env->createConnection(username, password, connection);
    RegisterMappings(env);
    Employee* e = new(conn,"EMP_VIEW")Employee(); //works
    Ref<Employee>e1=new(conn,"EMP_VIEW")Employee(); //fails
    Debugging the code, I get an access violation in the Ref constructor:
    template <class T>
    Ref<T>::Ref(const T *obj)
    rimplPtr = new RefImpl((PObject *)obj); // <==Access violation
    System specs:
    Windows 2000AS
    Oracle 9.2.0.4

    Sorry to be so long in replying, we decided to move back to objects without the views. Our DBAs were not happy, but sometimes that's how it goes. I did not want to have to go to using associative access for my object manipulation because it is not robust enough for real code, IMHO. So, I would rather do something that I can make work in the real world than have a database model that makes me write what I consider to be bad code. I do wish that OCCI would become more exception-safe as well as I wish that there were not cases where associative access worked but navigational access dod not.
    <rant>
    One observation about OCCI in general is that using associative access seems to be a bad idea in almost all real-world scenarios. Actually, most of the OCCI constructs seem to be less-than-optimally designed from a C++ perspective. Tossing raw pointers around is not the way toward robust software. And most of the constructs in OCCI do that and worse. None of the high level constructs like Environment, Connection, Statement, etc. are exception safe in any sense of the word. I have (like a lot of you, I'm sure) have had to write a layer on top of the base OCCI classes to enforce some level of exception safety. Not that its a big deal or anything, but just one more thing I would rather not have to do...
    </rant>

Maybe you are looking for