How can I use TrueSequenceFactory with multiple sequences

In the post "How to use existing Oracle sequences using KODO" answered
by Marc Prud'hommeaux a "sample code" was given. But seems to me that
example will only work with a single Oracle sequence for the entire
system. Is this right?
How can I use TrueSequenceFactory with primary-keys and their
respective existing sequences? Can you (SolarMetric guys) provide me a
sample code?

The problem is that you are using application-identity. When you
specify an objectid-class, we treat is automatically as application
identity. To resolve this, I would recommend removing both the
objectid-class and identity-type atributes from your class. With
"objectid-class" in place, we asssume that you wil take care of identity.
Eduardo Bobsin Machado wrote:
I'm using Kodo 2.4.0, Oracle 9i, JBoss 3.0.4, the Kodo jars are in the
JBoss' lib/ext.
Well, I'll show what I have...
This is the script of my table:
CREATE TABLE LINEUP_VOYAGE (
VOYAGEID NUMBER (10) NOT NULL,
VESSEL_NAME VARCHAR2 (1000) NOT NULL,
CONSTRAINT PK_LINEUP_VOYAGE
PRIMARY KEY ( VOYAGEID ) ) ;
This is an excerpt of my .jdo file:
<class name="LineupVoyage" objectid-class="LineupVoyageId"
identity-type="datastore">
<extension vendor-name="kodo" key="table" value="LINEUP_VOYAGE"/>
<extension vendor-name="kodo" key="sequence"
value="LINEUP_VOYAGEID_SEQ"/>
<extension vendor-name="kodo" key="pk-column" value="VOYAGEID"/>
<extension vendor-name="kodo" key="lock-column" value="none"/>
<extension vendor-name="kodo" key="class-column" value="none"/>
<field name="vesselName">
<extension vendor-name="kodo" key="data-column"
value="VESSEL_NAME"/>
</field>
<!--field name="id" primary-key="true">
<extension vendor-name="kodo" key="data-column"
value="VOYAGEID"/>
</field-->
</class>
As you can see, the "id" field is commented.
And this is my class:
package br.com.fertimport.entity;
import java.util.*;
public class LineupVoyage {
     private String vesselName;
//     private long id;
//     public LineupVoyage(long id) { this.id = id; }
//     public long getId() { return id; }
//     public void setId(long id) { this.id = id; }
     public String getVesselName() { return vesselName; }
     public void setVesselName (String vesselName) { this.vesselName =
vesselName; }
The "id" attribute is commented.
Now the questions...
To use ClassSequenceFactory must the identity-type of my entities be
application or datastore?
Is the "objectid-class" parameter required in this case?
As you see, all references to the "id" property are commented. Can I
use this property to represent my object id?
If not, how can I identify my object with something like a long?
The last question is related to my architecture: one VM with the EJBs
(entity and session) and another VM with the web classes and JSPs,
connected by a session facade. I don't want to use any Kodo or JDO stuff
in the web tier. Is this possible?
Stephen Kim
[email protected]
SolarMetric, Inc.
http://www.solarmetric.com

Similar Messages

  • How can I use airplay with multiple speakers from my iPod?

    I recently purchased a bluetooth wireless speaker in hopes that, while the ipod is docked on a speaker system, I can listen to my music from both set of speakers.  Is there anyway to use multiple speakers with my ipod through the airplay system or an app that I can download to enhance my music listening experience?

    Based on previous discussions, You can only AiPlay to one set of speakers.

  • I gave my old iPad to my daughter without restoring it to original configuration, how can she use it with her iTunes?

    I gave my old iPad to my daughter without restoring it to original configuration, how can she use it with her iTunes?

    try
    http://support.apple.com/kb/ht2589

  • How can I use LCCS with ActionScript 3 and Flash CS4?

    Hi,
    Using Stratus I was able to create an an application using Action Script 3 and Flash CS4.  The sample code on the Adobe site was quite straight forward and easy to understand.  I now want to switch over to  LCCS but can't find anything any where on how to use Action Script 3 and Flash CS4 with LCCS.  Do I need to know Flex to be able to use LCCS?  Everything was quite simple and easy to understand with Stratus and makes complete sense.  But LCCS is really confusing.  Is there any sample code on how to establish a connection in Action Script 3 and then stream from a webcam to a client.  There is nothing in the  LCCS SDK that covers Flash and Action Script 3.  Please help!  I found the link below on some forum but it takes me nowhere.
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&catid=75 9&threadid=1407833&enterthread=y

    Thanks Arun!
    Date: Thu, 29 Apr 2010 11:44:10 -0600
    From: [email protected]
    To: [email protected]
    Subject: How can I use LCCS with ActionScript 3 and Flash CS4?
    Hi,
    Welcome to the LCCS world.
    Please refer to the SDK's sampleApps folder. There would be an app called FlashUserList. The app demonstrates how LCCS can be used with Flash CS4. Its a  pretty basic app, but should help you moving.
    We are trying to improve our efforts to help developers in understanding our samples. Please do let us know if we can add something that would help others.
    Thanks
    Arun
    >

  • How can I use Bluetooth with another devices?

    How can I use Bluetooth with another devices?

    You can set up your FaceTime account in Settings > FaceTime.

  • How can i use ipad with apple tv

    How can i use ipad with appletv

    Assuming both devices are on the same network and that AirPlay is not turned off on the Apple TV, then simply tap on the screen when you are watching content you wish to stream to your Apple TV, then tap the airplay icon that appears in the control bar, choose the Apple TV from the menu that appears.
    When displaying the content you wish to mirror on the iPad 2 (or better), iPad Mini, iPhone 4S (or better), double tap the home button (quickly) and swipe the bottom row of apps to the right to reveal the playback controls, tap the AirPlay icon and select your Apple TV from the list of available devices.

  • HT201407 i have a vodafone iphone5 - how can i use it with an O2 card? can I unlock?

    I have an iphone5 on a vodafone contract. How can i use it with an o2 sim and how can i unlock?

    Only the carrier to which the phone is locked to can unlock your phone, call your carrier and ask them if they will.

  • How can I use iCloud with Pages?

    How can I use iCloud with Pages?  Not offered as a Save option.

    You are stating you have MacOs 10.6.8 and iCloud isn't available with that system.

  • How can i use tethering with my iphone?

    how can i use tethering with my iphone?

    According to this document, T-Mobile in the Netherlands does not support Personal Hotspot, only Vodafone does, thus that setting will not appear for you.
    http://support.apple.com/kb/HT1937

  • How can we use Alert with Canvas

    Hello to all
    How can I use alert with Canvas .
    I want whenever user do mistake then a alert message should come.
    Thanks in advance
    Mukund

    And where is the problem? Sample code can be found all over the place... just look for it.

  • HT5622 Why can't I use my Apple ID to iTunes?  How can I use it with out credit card?

    How can I use my Apple ID in iTunes with out credit card?

    For me it's the same, I've just bought an iPad mini two weeks ago but I cannot log in with any Apple account in FaceTime.
    I enter my apple account in faceTime, then I press next the second screen and it shows "validating..." but it never gets validated.
    What's happening? This is really annoying

  • How can I use iphoto with my epson printer to make my own cards?

    How can I use photos on macbook air and my own printer to make cards? I used to be able to -- but some software now only leads me to BUYING cards, or makes it seemingly impossible to manipulate the image so that I can see it on the size paper I will be using. This used to be do-able! How now? Thanks.

    When you redeem the gift card through iTunes on the computer, it goes onto your account which will allow you to purchase any item via your computer or your iPod becuase it is on your account

  • How Do I Use iTunes with Multiple iPods?

    How do I use iTunes and keep 2 iPods music libraries separate? When I plug in my iPod (2nd one), it brings up the music from the 1st iPod registered.
    Thanks

    There are a few different ways to use two iPods with one computer, have a look at this help page for suggestions: How to use multiple iPods with one computer

  • How can I use PreloadSWF with files built with -compiler.debug into Flash Player 11.4?

    I'm using Internet Explorer 9 on Windows 7 (x64) with a debug Flash Player (version 11.3.300.271 - I'm using the ActiveX plugin for IE). Using Flex SDK 4.5.1.21328A I compiled the ActionScript code
        package MySample {
            import flash.display.Sprite;
            public class MyHook extends Sprite {
                public function MyHook(): void {
                    super();
    Into a `.swf` file by running the command
        mxmlc.exe -compiler.source-path=. -output=MyHook.swf -tools-locale=en -headless-server=true -static-link-runtime-shared-libraries -compiler.debug -- Sample\MyHook.as
    I then preload this by creating an mm.cfg file and adding an PreloadSwf entry referencing MyHook.swf; running all this in Flash Player 11.3.300.271 works fine; I can point my IE to some web page containing flash applets and my own SWF file is preloaded just nicely.
    However, the most recent Flash Player release on Windows (11.4.402.265) breaks this. After updating the player, any flash applet triggers error message boxes from Flash player saying "Verify Error #1014: Couldn't find spark.components.Application". Clicking the error away opens the same message box, but with a few different type names.
    The workaround I found was to remove the -compiler.debug switch from the mxmlc command line; doing so make things work with Flash Player 11.4 but alas trace() doesn't work anymore.
    Does anybody know how PreloadSWF can be used to preload debug SWF files into Flash Player 11.4?

    Ah, thanks for making me aware of that forum - I didn't know about it. I now reposted the question at http://forums.adobe.com/thread/1068071 - this thread can be closed as far as I'm concerned. Should I mark your answer as being the resolution to my question or the like?

  • HT5622 Two Apple devices, how can I use FaceTime with one ID?

    I recently purchased a new IPad as I will be traveling. The reason for the new iPad was to be able to connect with my family through FaceTime. I have an Apple ID, can I use the same id on the new iPad and still connect through FaceTime? To me it sounds like I will be trying to connect to myself. Not sure hoe it will work? Any suggestions on how I can use my Apple ID without creating a new id?

    You can't. It's like calling someone in another room using the same phone number from which you're calling.

Maybe you are looking for

  • FINALLY I'm running Windows 7 Ultimate 64-bit thanks to Bootcamp

    Got it running SLICK AS SNOT! Recording like a pro in Windows 7 ON A MAC. Been a diehard PPC user for so long... this amazes me. 1 more question... is there a better Video Driver than STANDARD VGA ADAPTER - even the screensavers won't run (other than

  • Directory structure behaves strangely

    Hi all, I have a volume holding files both for my Macs (using AFP) and for my linux systems (using NFS and mount on the linux machines). For a reason I cannot explain some files do not show when I ls a directory, but if explicitly ls the file it give

  • HT5129 Tranferring photos from Mobile Me

    The automatic migration constantly stalls and then freezes iPhoto.  What to do?

  • Purchasing...I'm going round in circles!!

    1. OK I add an album to my shopping cart 2. I hit the BUY NOW button 3. Login message pops up, enter my details and hit Billing Info 4. Get to billing info page and message at top says "your billing info has changed, please enter details and confirm

  • Problem with not getting Internet Connect on AirPort Express

    Problem with not getting Internet Connect on AirPort Express (version7.6.4). Error says cannot get valid IP address. Have reset Siemens SpeedStream 4100 several time, even with tech support from the big "A" DSL provider. Plug MacBook Pro directly int