Objects with differnt no. of a class

Hi Peoples!
How can I create a class in which every time "new" operator is used on its constructor I get an Object with different number in sequence.
S-x, where x is integer.
so i get objects with nos. S-1, S-2, S-3.... S-100 ......

Use a static variable to hold the next id. Something like this:
public class SomeClass {
  private static int nextId = 1;
  private final String id;
  public SomeClass() {
    id = "S" + nextId;
    nextId++;

Similar Messages

  • Class not registered. Looking for object with CLSID:

    Hi,
    I had create a custom project system with the help of https://msdn.microsoft.com/en-us/library/vstudio/cc512961.aspx. And which is working fine that I can create a project with extension of .myproj in the VS Experimental Instance window. But when I go for
    the properties in the created project, (Solution Explorer: Right click on the project folder and select properties) it will show an exception that "Class not registered. Looking for object with CLSID:{00000-00-00-000000}" How can I provide Properties
    window for this project system or can I modify the Properties window for any other default VS project system? Please help me.

    Hi mathikp,
    I don't think you did something wrong while creating the project, but instead it could be the issue of environment, I would suggest you to validate following things:
    1, Try to create another blank app to see if the exception still thrown.
    2, Run with an administrator privilege to check if you can get the project work..
    I would not consider its as a coding issue but try to fix Visual Studio probably helps.
    --James
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Prob. Objects with same x,y,z coordinates appear at different positions

    Hello,
    I am having a problem where I have multiple objects with the same x,y,z coordinates but they appear at different positions on the screen. Could this have anything to do with scaling as I scale different types of objects differently. Also, I am using the simple Universe class and the objects that have the problem are added to the Universe when the program is running.
    CB

    I have encoutered this problem in two occaisions. I have ships that fire bullets. When the bullets are created they are not in the same position as the ship that fired them even though they have the same translation vector.
    Here is the constructor for the Bullet--------------------------------
    The transform3D passed in is the transform3D from the ship------------
    public Bullet(Transform3D temp3d, BoundingSphere bounds) {
         // Create the root of the branch graph
         root = new BranchGroup();
    // Create a Transformgroup to scale
    tScale = new TransformGroup();
    tempTrans = new Transform3D();
    tempTrans.setScale(0.2);
    tScale.setTransform(tempTrans);
         //create the main transform and attach the shape
    transRoot = new TransformGroup();
    transRoot.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
         transRoot.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
         transRoot.addChild(new ColorCube(0.4));
    trans3d = new Transform3D(temp3d);
    transRoot.setTransform(trans3d);
         //setup behaviour
    BulletBehaviour myBehavior = new BulletBehaviour(transRoot, trans3d);
    myBehavior.setSchedulingBounds(bounds);
    transRoot.addChild(myBehavior);
         // Connect up graph
         tScale.addChild(transRoot);
         root.addChild(tScale);
         //root.addChild(transRoot);
    root.compile();
    } // end of Cube (constructor)
    The other occaision when I find this problem is when comparing the position of two objects a target and a ship.
    Check out this web page for pictures and debuging output.
    http://www.sfu.ca/~ceden/java3d/snapshots.htm

  • Resolved reference placed in object with no cache

    Hi ,
    I have been seeing this error in my weblogic logs.The workflows are
    running fine and doing intended work. Have a look at the error message
    WARNING: Resolved reference placed in object with no cache.
    java.lang.Exception: printStackTrace
            at com.waveset.util.Util.printStackTrace(Util.java:6259)
            at com.waveset.object.PersistentObject.cacheWarning(PersistentObject.java:476)
            at com.waveset.object.PersistentObject.checkReference(PersistentObject.java:2683)
            at com.waveset.object.PersistentObject.checkReferences(PersistentObject.java:2718)
            at com.waveset.object.PersistentObject.addMemberObjectGroup(PersistentObject.java:1513)
            at com.waveset.workflow.WorkflowEngine.buildWorkItem(WorkflowEngine.java:4406)
            at com.waveset.workflow.WorkflowEngine.callManualAction(WorkflowEngine.java:4284)
            at com.waveset.workflow.WorkflowEngine.callAction(WorkflowEngine.java:3811)
            at com.waveset.workflow.WorkflowEngine.callAction(WorkflowEngine.java:3229)
            at com.waveset.workflow.WorkflowEngine.execute(WorkflowEngine.java:3070)
            at com.waveset.workflow.WorkflowEngine.makeTransition(WorkflowEngine.java:2809)
            at com.waveset.workflow.WorkflowEngine.checkExplicitTransitions(WorkflowEngine.java:2700)
            at com.waveset.workflow.WorkflowEngine.checkTransitions(WorkflowEngine.java:2486)
            at com.waveset.workflow.WorkflowEngine.processSteps(WorkflowEngine.java:1891)
            at com.waveset.workflow.WorkflowEngine.walkCases(WorkflowEngine.java:1748)
            at com.waveset.workflow.WorkflowEngine.walkCases(WorkflowEngine.java:1656)
            at com.waveset.workflow.WorkflowEngine.execute(WorkflowEngine.java:816)
            at com.waveset.workflow.WorkflowEngine.execute(WorkflowEngine.java:478)
            at com.waveset.workflow.WorkflowExecutor.execute(WorkflowExecutor.java:235)
            at com.waveset.task.Scheduler.execute(Scheduler.java:2393)
            at com.waveset.task.Scheduler.executeTask(Scheduler.java:2295)
            at com.waveset.task.TaskManager.executeTask(TaskManager.java:277)
            at com.waveset.workflow.Workflow.checkinWorkItem(Workflow.java:378)Any Ideas,
    Thanks

    Did anybody resolve this issue?
    I am getting com.waveset.util.WavesetException:Class com.omd.session.WorkflowServices not found.
    It seems the workflow status shows finished, but did not start the acctual workflow process of approvals and emails to the appropriate user accounts.
    Anybody has any clues about this exception?
    G

  • Can I call an object with synchronized methods from an EJB

    I have a need for multiple threads (e.g. Message Driven Beans) to access a shared object, lets say a singleton, I'm aware of the "you can't have a singleton in the EJB world" issues) for read/write operations, so the operations will need to be synchronised.
    I've seen various statements such as you can't use read/write static fields in EJBs and you can't use synchronisation primitives in EJBs but I've also seen statements that say its okay to access utility classes such as Vector (which has synchronised methods) from an EJB.
    Does anyone know if there is a definitive answer on this? What are the implications of accessing a shared object with synchronised methods from multiple EJBs? Is it just that the EJB's thread may block which limits the ability of the container to manage the EJBs? In the Vector example above (from Professional Java Server Programming) did they mean its okay to use these utility classes provided they aren't shared across threads?
    If I can't use a plain old Java Object does anyone know if there are other potential solutions for sharing objects across EJBs?
    In my problem, I have an operation that I want to run in a multi-threaded way. Each thread will add information to the shared object, and this info may be used by the other threads. There's no lengthy blocking as such other than the fact that only one thread can be adding/reading information from the shared object at a time.
    I've trawled through this forum looking for similar questions of which there seem to be many, but there doesn't seem to be any definitive answers (sorry if there was and I missed it).
    Thanks
    Martin

    You can share objects among EJB's or among objects used by one or more EJB's. You can use synchronization primitives - nothing will prevent you from doing that.
    After all, the container classes, JVM-provides classes, JDBC, JCA, JNDI and other such classes do all of this with impunity. You can too. You can use file and socket I/O as well, presuming you configure the security profile to allow it. Should you? Well it depends on what you need to accomplish and if there is another practical alternative.
    Yes the specification warns you not to, but you cannot be responsible for the interior hidden implementation of classes provided to you by the JVM or third parties so you can never truly know if your are breaking these written rules.
    But when you do these things, you are taking over some part of the role of the container. For short running methods that only block while another thread is using the method or code block and no I/O or use of other potentially blocking operations are contained in the method/block, you will be fine. If you don't watch out and create deadlocks, you will harm the container and its managed thread pool.
    You should not define EJB methods as synchronized.
    Also, if you share objects between EJB's, you need to realize that the container is free to isolate pools of your EJB in separate classloaders or JVM's. It's behavior can be influenced by your packaging choices (use of .ear, multiple separate .jar's, etc.) and the configuration of the server esp. use of clustering. This will cause duplicate sets of shared classes - so singletons will not necessarily be singleton across the entire server/cluster, but no single EJB instance will see more than one of them. You design needs to be tolerant of that fact in order to work correctly.
    This isn't the definitive answer you asked for - I'll leave that to the language/spec lawyers out there. But in my experience I have run across a number of occasions where I had to go outside of the written rules and ave yet to be burned for it.
    Chuck

  • BC4J Objects with PKs based on two columns using multiple sequences

    I have implemented a BC4J object that is based on a DB table that has two columns as the primary key. For example Table A's primary key is Group and ID and there is a DB sequence for each Group.
    I use the BC4J object using servlets and JSPs and I have been able to implement an Update form.
    I now want to implement a Create (New) form. I've read forum postings and info on the help regarding using the SequenceImpl class to override the EntityImpl object's create method as shown below:
    protected void create(AttributeList attributeList)
    super.create(attributeList);
    SequenceImpl mySeq = new SequenceImpl("MY_SEQ",getDBTransaction());
    setMyObjectId(mySeq.getSequenceNumber());
    But as you can see I need to know the value of the group attribute before I can get the next value sequence:
    For new EO belonging in Group1 I need sequence from "GROUP1_SEQ", Group 2 from "GROUP2_SEQ", etc.
    I would like to put this code in the Entity Object where it belongs. I guess my problem is simply how to create a new row in the View Object with a passed parameter which is the value of Group.
    Thanks in advance!

    Angelo:
    How is the EO suppose to receive the group id? Is it from the view row? If so, the VO can pass that group id to the EO through the attribute list and calling the
    public Row createAndInitRow(AttributeList nvp);
    API.
    Example code would be:
    ViewObject myVO;
    // myVO is initialized
    AttributeList nvp = new oracle.jbo.NameValuePairs();
    // GroupID is the attr name of the Group ID
    nvp.setAttribute("GroupID", <some-value>);
    Row row = myVO.createAndInitRow(nvp);
    If you do that the create(AttributeList attributeList) method of the EO will receive the GroupID value coming from the VO.
    Then, you can use that for your sequence.
    Thanks.
    Sung

  • The object in Directory Services has a class missing

    Hello,
    In Pending Events we have a few events for users (who are not yet managed by NSM for AD) with the following actions (and action states):
    Evaluating Add Member (Evaluating user policy)
    Create User (Getting policy for the user)
    The last error message is: 92 : The object in Directory Services has a class or attribute mismatch and is not valid. Viewing the nsmengine-ad-(date).log file, I can see the following entries:
    01 2014-04-02 08:55:20 3600 3 8003 1436 2908 cc::ds_ad::GetObjectListAsyncEx() - Called piDirSearch->GetNextRow(...), HRESULT = 80072030, Result = 15.
    01 2014-04-02 08:55:20 3600 5 0008 1436 2908 PolicyTools::GetEffectivePolicies - Failed to get indirect group memberships for CN=<UserDetails>,DC=local. Result = 15.
    A quick search for the error number indicates that the error (80072030) is that there is no such object on the server. All our DCs are Global Catalogs and I can confirm the users exist and are valid. Some of our groups do have a large number of members (up to 30,000).
    Any idea what could be causing the issue and how to resolve it?
    Thanks,
    Jonathan

    On 4/2/2014 5:06 AM, JonathanCox wrote:
    >
    > Hello,
    >
    > In �Pending Events� we have a few events for users (who are not yet
    > managed by NSM for AD) with the following actions (and action states):
    >
    >
    > - Evaluating Add Member (Evaluating user policy)
    > - Create User (Getting policy for the user)
    >
    >
    > The �last error� message is: �92 : The object in Directory Services has
    > a class or attribute mismatch and is not valid.� Viewing the
    > nsmengine-ad-(date).log file, I can see the following entries:
    >
    > 01 2014-04-02 08:55:20 3600 3 8003 1436 2908
    > cc::ds_ad::GetObjectListAsyncEx() - Called piDirSearch->GetNextRow(...),
    > HRESULT = 80072030, Result = 15.
    > 01 2014-04-02 08:55:20 3600 5 0008 1436 2908
    > PolicyTools::GetEffectivePolicies - Failed to get indirect group
    > memberships for CN=<UserDetails>,DC=local. Result = 15.
    >
    > A quick search for the error number indicates that the error (80072030)
    > is that �there is no such object on the server�. All our DC�s are Global
    > Catalog�s and I can confirm the users exist and are valid. Some of our
    > groups do have a large number of members (up to 30,000).
    >
    > Any idea what could be causing the issue and how to resolve it?
    >
    > Thanks,
    >
    > Jonathan
    >
    >
    Jonathan,
    Which version of NSM are you using? Specifically, what Engine build are
    you on? The easiest way to check this is in the Engine Status panel of
    the NSM Admin client.
    -- NFMS Support Team

  • Connect webdynpro callable object with ms sql server 2000

    Hi all
    how connect webdynpro callable object with ms sql server 2000?
    How can I register on the portal as an additional connection?
    thank you very much!

    Thanks for your answers, Now I have the following problem, to develop this code:
    try {
              InitialContext iC = new InitialContext();
              DataSource dataSource = (DataSource)iC.lookup("jdbc/ConnectionAlias");
              Connection con = dataSource.getConnection();
              java.sql.Statement stmt = con.createStatement();
              ResultSet rs = stmt.executeQuery("select * from ejemplo");
              while (rs.next()){
                   com.sap.test.sql.testsql.wdp.IPrivateTestIViewView.IDatosElement
                                                             DatosElement =
                                                             wdContext.nodeDatos()
                                                             .createDatosElement();
                   DatosElement.setId(rs.getString("id"));
                   DatosElement.setNom(rs.getString("nom"));
                   DatosElement.setNum(rs.getInt("num"));
         }catch (SQLException e) {
              wdContext.currentContextElement().setB(e.getMessage());
         }catch (Exception e){
              wdContext.currentContextElement().setB(e.getMessage());
    and shows me the following exception
    ResourceException in method ConnectionFactoryImpl.getConnection(): com.sap.engine.services.dbpool.exceptions.BaseResourceException: SQLException thrown by the physical connection: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
    the data that you place in the visual administrator were:
    Drivers: com.sap.aii.af.jmsproviderlib (msutil.jar , mssqlserver.jar , msbase.jar)
    DataSources: sap.com/JDBCConnector_MyDatasource.xml
                   Name: MyDatasource
                   Alias: ConnectionAlias
                   DriverName: com.sap.aii.af.jmsproviderlib
                   JDBC Version: 1.x
                   Driver Class: com.microsoft.jdbc.sqlserver.SQLServerDriver
                   Database URL: jdbc:microsoft:sqlserver://181.42.101.219:1433;DatabaseName=test
                   User: sa
                   Password: abcd1234
    did not know the cause of the problem
    thanks!

  • How to redefine GOS toolbar function "SEND OBJECT WITH NOTE" for deliveries

    Hello Abapers,
    for inbound and outbound deliveries (tcodes VL01N, VL02N, VL03N, VL31N, VL32N, VL33N) I have to replace the GOS toolbar function SEND OBJECT WITH NOTE with a redefined function matching the following specifications:
    - Title field needs a different content
    - Text (note content) should be filled by default, maybe with standard text, but can be overwritten
    - All attachments in the attachment list of the object should be included by default or be selectable thru an additional button
    Also possible could be an addiitonal toolbar function SEND ATTACHMENTS WITH NOTE as a copy of SEND OBJECT WITH NOTE.
    Although I checked the SDN forums for a matching solution, I couldn't find one in tons of GOS threads.
    Perhaps someone had solved a similar problem to send obejct with notes from GOS toolbar with several of the object's attachments.
    Maybe some GOS classes have to be redefined for that, but this should only be available for deliveries, not for the other BOR types.
    I'm waiting for your ideas.
    Best regards,
    Klaus
    Edited by: Klaus Babl on Feb 16, 2012 10:13 AM

    No the list of steps done to solve the issue:
    1. Copy of class CL_GOS_SRV_SEND_OBJECT to new class /SIE/IS_BSD_GOS_SRV_SEND_ATT.
    2. SM30 for table SGOSATTR: New entry for new service ZSO_SENDATT for the new class.
    3. Copy of methods ON_SERVICE_SUCCEEDED, CHECK_STATUS, CREATE_ROOT_ITEM and ON_LINK_CREATED from class CL_GOS_SRV_ATTACHMENT_LIST to the new class.
    4. New code added to the top of method CHECK_STATUS to show the service for deliveries only:
    IF  is_lporb-typeid  NE  'BUS2015'
    AND is_lporb-typeid  NE  'LIKP'.  
        ep_status = mp_status_invisible.
        EXIT.
    ENDIF.
    5. Copy of function group SAPLSGOS_OUTBOX and function module SGOS_SEND_OBJECT_WITH_NOTE to own copies.
    6. Before calling cl_bcs=>short_message  there are several steps to do:
    - CALL METHOD cl_binary_relation=>read_links
    - CALL FUNCTION 'SO_DOCUMENT_READ_API1' for all links
    - cl_document_bcs=>create_document for all those documents (we are using types ATTA, NOTE and URL)
    - APPEND those created documents to the attachment table and pass it to i_attachments of cl_bcs=>short_message
    Solved issue!
    COMMENT: This SDN wiki document is outdated and doesn't work any more:
    http://wiki.sdn.sap.com/wiki/display/Snippets/ABAP-SendingGOSattachmentstoanemailaddress
    Best regards,
    Klaus

  • Java object with ArrayList of custom objects not working

    I have a custom java object that has an ArrayList of another set of custom objects (code listed below). I can pull back a Customer object (to flex client) and it's recognized as a Customer action script object, but the ArrayList in the Customer object is not recognized as an ArrayCollection of Accounts. Instead it is an ArrayCollection of Action Script Objects.
    At first I thought something was wrong with my action script Account class, but then I tried to pull back just an Account and it was recognized as an action script Account. It's just when I have my Customer object with an ArrayList of Accounts that it isn't getting converted.
    Is there something else I need to do to have that ArrayList be recognized as an ArrayCollection of Accounts on the Flex Client side? Is there some way of specifying what type an ArrayCollection is mapped to?
    Thanks in advance for the help!
    public class Customer {
         private String name;
         private String address;
         private ArrayList<Account> accounts;
         public Customer(){
         public String getName(){
              return name;
         public void setName(String str){
              name = str;
         public String getAddress(){
              return address;
         public void setAddress(String str){
              address = str;
         public ArrayList<Account> getAccounts(){
              return accounts;
         public void setAccounts(ArrayList<Account> list){
              accounts = list;
    public class Account {
         private long accountNumber;
         private String type;
         private double balance;
         public Account(){
         public long getName(){
              return accountNumber;
         public void setName(long l){
              accountNumber= l;

    I accidently found how to make this work. I may have missed something while reading about blazeDS reflection, but I thought I'd pass this along anyway.
    What I have is I have an class A. In class A I have an arraycollection of Class B. If I want that arraycollection to return to the server with the correct class, then I need to include Class B in the compiled swf. How I have done that is to create a dummy variable of type B. Importing B will not work you actually need to have a member variable of type B even if you don't need it.
    Example
    import dataobjects.B;
    [RemoteClass(alias="dataobjects.A")]
    public class A {
       private var _b:B; //This is never used, but needed to include B object in swf to be reflected.
       private var_ bList:ArrayCollection = new ArrayCollection();
      public function A(){
      public function set bList(list:ArrayCollection):void{
         _bList = list;
      public function get bList():ArrayCollection{
        return _bList;

  • Object with argument constructor in ATG

    HI guys
    Is it possible to craete an object with argument constructor with component in atg
    if it is possible give me an example

    With ATG 10.0.3 and later, you can use an $instanceFactory to create objects with constructor objects or create a Nucleus component from factory (either a static class method, or a method of another Nucleus component).
    Documentation (and an example) are here: http://docs.oracle.com/cd/E36434_01/Platform.10-1-2/ATGPlatformProgGuide/html/s0208parameterconstructorinstancefact01.html

  • Is it possible to create 2 Date objects with different hashcode.

    Hi,
    I want to create 2 java.util.Date objects with different hashcodes. Is it possible??
    Regards,
    Farooq

    import java.util.Date;
    import java.util.Calendar;
    public class TwoDates {
        public static void main(String[] args) {
            Calendar oneCal = Calendar.getInstance();
            oneCal.set(Calendar.YEAR, 1903);
            Calendar anotherCal = Calendar.getInstance();
            Date oneDate = oneCal.getTime();
            Date anotherDate = anotherCal.getTime();
            System.out.println(oneDate.hashCode() + " " +
                               anotherDate.hashCode());
    -14330615 -825112150

  • Design Objects with some common attribute/behavior. Is inheritance correct?

    Hi,
    In an application I am working on the domain/business layer has lots of domain objects. many of these domin objects aggregate to form other domain objects. Also in the application we have a class "User" that has the user information and privileges of the logged in "User."
    When updates to the domain object have to be saved to the database we need this user information.
    To make this we have created an AbstractDomainObject that has a private user and get and set methods.
    All (almost all) domain objects in our system will extend from this Abstract DomainObject. So Contract, Shipment and Party all are domain objects and they extend AbstractDomainObject.
    This way we do not need to code the get and set methods for user information in each object and also do not have to pass along the user object separately to the DataAccess layers.
    But I think that this is wrong as we are using inheritance for code-reuse. (I have read about inheritance v/s composition) But it does save lot of code and any new domain object that gets written we have the user information available. (we have lots of domain objects)
    Can somebody suggest what would be a better design with arguments that I could use to influence the other people in the team.
    Thanks,

    But that's easily accomplished through a simpleassociation.
    No it would not. An association is a static
    relationship, That's absolutely incorrect.
    "The association shows the relationship between instances of classes"
    http://pigseye.kennesaw.edu/~dbraun/csis4650/A&D/UML_tutorial/class.htm
    You can Google on UML Association and find many other sites that say the same thing,
    it would have the domain object using
    the same credentials or have some messy code to match
    each users' thead to their credentials.I have no idea what you are on about.
    Why do you need to externalize the
    internal state of the users credentials to dothis?
    To preserve encapsulation.You don't need the memento pattern to do this.
    Avoids the Domain object aquiring multiple
    responsibilities.A simple association also does this.But it doesnt meat the OP's primary requirement.Of course it does. How doesn't it?
    As far as I can tell, the
    OP is just trying to figure out where to storethem.
    If with 'store' you mean which class to holdthem.
    I
    agree.
    Yes. Why does the internale state of the dataneed
    to be externalized?To preserve encapsulation.What do you think externalized means in this context.
    In the Memento Pattern
    externalise means externalise properties fromthe
    object encapsulating them.The point of the Memento Pattern is to externalize
    the internal state of an Object such thatyou
    can keep track of suceessive changes and reverse
    them. Yes.
    That doesn't apply here.The only alternative to externalisation is to violate
    encapsulation and access them directly. You might
    find that acceptable I dont.That's totally false. Unless you can explain how the memento pattern would be used here, I really don't think there is anymore to say. I've looked at the pattern a couple times since we started this discussion and nothing in it suggests it's applicable to this situation.

  • Error when create XMLType object with JDBC connection

    Hello, I try to get an XMLType object with JDBC, but it doesn't work. Can somebody help me?
    My code is :
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@"+"a02w03:1521:PROJET", "scott", "tiger");
    OraclePreparedStatement stmt = (OraclePreparedStatement) conn.prepareStatement("select xmldoc from cv_col");
    ResultSet rset = stmt.executeQuery();
    OracleResultSet orset = (OracleResultSet) rset;
    while(orset.next())
    OPAQUE o = orset.getOPAQUE(1);
    System.out.println(o.getSQLTypeName());
    XMLType poxml = XMLType.createXML(o);
    My database table:
    CREATE TABLE cv_col (
    XMLDoc xmltype
    Execution: The SQL type name "SYS.XMLTYPE" is write and then I obtain the error:
    Exception in thread main
    java.lang.NoSuchMethodError: java.lang.String oracle.jdbc.internal.OracleConnection.getProtocolType()
         at oracle.xdb.XMLType.initConn(XMLType.java:2072)
         at oracle.xdb.XMLType.<init>(XMLType.java:903)
         at oracle.xdb.XMLType.createXML(XMLType.java:493)
         at Prog.main(Prog.java:26)
    Process exited with exit code 1.
    Thank you, very much!

    What platform are you using for the database, what are you running your code on.
    Which database version are you working with.. What is your class path. What version of JDBC and OCI are in the client environment, eg what are CLASSPATH and PATH / LD_LIBRARY_PATH settings. Have you tested your code using a simple IDE like Oracle's JDeveloper or run it from directly from the command line.

  • Service Objects with Dialog duration

    m
    Hi Forte`ans,
    I am trying to listen to an event from a service object which has a
    dialog duation of Message.The service object is configured for
    failover.
    I get an exception ( not an error message ) saying :
    SYSTEM ERROR: Invalid attempt to register for an event on an object of
    class (CKBaseServiceMgrProxy) which has a dialog duration of
    message. The
    semantics of message duration do not guarantee that the same object
    instance will service each message, which is in conflict with the
    semantics of event registration (which requires that the same object
    instance to which the event is registered for generates the event;
    these are two separate actions). To disable this restriction,
    restart this process with cfg:do:4 specified.
    If I make the dialog duration of the SO Session, it works without
    screaming.
    Does this mean I cannot listen to events from such SO( Failover
    enabled with Message duration?) Is it because the event loop may still
    point to the failed SO and Forte wants to avoid such situations???
    Can somebody throw some light on this..?
    Thanks
    Ajith Kallambella M
    International Business Corporation.

    We ran into this same problem when converting an application from R1 to
    R2. In R1, you were allowed to do this. However, Forte won't
    guarantee, even in a non-replicated, non-failover partition, that it
    won't swap objects under certain situations unless the dialog duration
    is session. If this happened, you would lose your registration and not
    even know it. The recommended solution is for the client partition to
    pass a reference to an object anchored in its partition to the service
    object in the remote partition. The service object can then post events
    on the anchored object, which is guaranteed to be there during the life
    of that client partition. The logger flag was designed for backwards
    compatibility. It's not really recommended, but it's not supposed to
    have much overhead if you do use it. We already had a client
    notification architecture in place, so we re-worked our application to
    use it in the cases where we had been using direct registrations. Hope
    this helps -- Chris
    Chris Kelly, IS Architect
    Andersen Windows
    From:
    [email protected][SMTP:[email protected].
    net.in]
    Sent: Thursday, September 18, 1997 1:44 PM
    To: [email protected]
    Subject: Service Objects with Dialog duration
    m
    Hi Forte`ans,
    I am trying to listen to an event from a service object which
    has a
    dialog duation of Message.The service object is configured for
    failover.
    I get an exception ( not an error message ) saying :
    SYSTEM ERROR: Invalid attempt to register for an event on an
    object of
    class (CKBaseServiceMgrProxy) which has a dialog duration of
    message. The
    semantics of message duration do not guarantee that the same
    object
    instance will service each message, which is in conflict with
    the
    semantics of event registration (which requires that the same
    object
    instance to which the event is registered for generates the
    event;
    these are two separate actions). To disable this restriction,
    restart this process with cfg:do:4 specified.
    If I make the dialog duration of the SO Session, it works without
    screaming.
    Does this mean I cannot listen to events from such SO( Failover
    enabled with Message duration?) Is it because the event loop may
    still
    point to the failed SO and Forte wants to avoid such
    situations???
    Can somebody throw some light on this..?
    Thanks
    Ajith Kallambella M
    International Business Corporation.

Maybe you are looking for