Can I create different consistency nodes in the same cluster with defferent?

Can I create consistency different nodes in the same cluster with defferent cache - config.xml file?
A cache can be distributed in these nodes of deffirent?

Yes. You can create different consistency nodes in the same cluster with cache files - config.xml defferent as long as you use the same file tangosol - coherence.xml and the same file tangosol-coherence - override.xml. But you can't store the data in the cache in the various nodes (created with different cache-config file). In other words, a node only to create their own Hide modes that are launched with the same cache file - config.Xml.

See the following demo:
I start a cache using the cache config examples-cache file server - server.xml. Then I start a console cache storage-disabled people (client cache) by using the config file coherence-cache cache - config.Xml. Two of them using the same file tangosol - coherence.xml and the same file tangosol-coherence - override.xml.
The cache server uses a cache service PartitionedPofCache. But the client side using the Distributedcache service. The cluster address is same 224.3.5.2.
The name of the cluster is also samme. They know.

D:\coherence\lib>D:\examples\java\bin\run-cache-server.cmd

D:\coherence\lib>D:\examples\java\bin\run-cache-server.cmd
The system cannot find the file D:\coherence.
The system cannot find the file C:\Oracle\Middleware\jdk160_11.
2009-12-22 12:09:31.400/4.987 Oracle Coherence 3.5.2/463  (thread=main, member=n/a): Loaded operational configurat
ion from resource "jar:file:/D:/coherence/lib/coherence.jar!/tangosol-coherence.xml"
2009-12-22 12:09:31.450/5.037 Oracle Coherence 3.5.2/463  (thread=main, member=n/a): Loaded operational overrides
from resource "jar:file:/D:/coherence/lib/coherence.jar!/tangosol-coherence-override-dev.xml"
2009-12-22 12:09:31.470/5.057 Oracle Coherence 3.5.2/463  (thread=main, member=n/a): Optional configuration override
 "/tangosol-coherence-override.xml" is not specified
2009-12-22 12:09:31.540/5.127 Oracle Coherence 3.5.2/463  (thread=main, member=n/a): Optional configuration override
 "/custom-mbeans.xml" is not specified

Oracle Coherence Version 3.5.2/463
 Grid Edition: Development mode
Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.

2009-12-22 12:09:33.864/7.451 Oracle Coherence GE 3.5.2/463  (thread=main, member=n/a): Loaded cache configuration
 from "file:/D:/examples/java/resource/config/examples-cache-config.xml"
2009-12-22 12:09:39.983/13.570 Oracle Coherence GE 3.5.2/463  (thread=Cluster, member=n/a): Service Cluster joined t
he cluster with senior service member n/a
2009-12-22 12:09:43.187/16.774 Oracle Coherence GE 3.5.2/463  (thread=Cluster, member=n/a): Created a new cluster
"cluster:0xD3FB" with Member(Id=1, Timestamp=2009-12-22 12:09:38.06, Address=192.168.8.80:8088, MachineId=24656, Locatio
n=process:144, Role=CoherenceServer, Edition=Grid Edition, Mode=Development, CpuCount=1, SocketCount=1) UID=0xC0A8085000
000125B75D888C60501F98
2009-12-22 12:09:43.508/17.095 Oracle Coherence GE 3.5.2/463  (thread=Invocation:Management, member=1): Service Mana
gement joined the cluster with senior service member 1
2009-12-22 12:09:46.582/20.169 Oracle Coherence GE 3.5.2/463  (thread=DistributedCache:PartitionedPofCache, member=1
): Service PartitionedPofCache joined the cluster with senior service member 1
2009-12-22 12:09:46.672/20.259 Oracle Coherence GE 3.5.2/463  (thread=DistributedCache:PartitionedPofCache, member
=1): Loading POF configuration from resource "file:/D:/examples/java/resource/config/examples-pof-config.xml"
2009-12-22 12:09:46.702/20.289 Oracle Coherence GE 3.5.2/463  (thread=DistributedCache:PartitionedPofCache, member
=1): Loading POF configuration from resource "jar:file:/D:/coherence/lib/coherence.jar!/coherence-pof-config.xml"
2009-12-22 12:09:47.734/21.321 Oracle Coherence GE 3.5.2/463  (thread=main, member=1): Started DefaultCacheServer.
..

SafeCluster: Name=cluster:0xD3FB

Group{Address=224.3.5.2, Port=35463, TTL=4}

MasterMemberSet
  (
  ThisMember=Member(Id=1, Timestamp=2009-12-22 12:09:38.06, Address=192.168.8.80:8088, MachineId=24656, Location=process
:144, Role=CoherenceServer)
  OldestMember=Member(Id=1, Timestamp=2009-12-22 12:09:38.06, Address=192.168.8.80:8088, MachineId=24656, Location=proce
ss:144, Role=CoherenceServer)
  ActualMemberSet=MemberSet(Size=1, BitSetCount=2
    Member(Id=1, Timestamp=2009-12-22 12:09:38.06, Address=192.168.8.80:8088, MachineId=24656, Location=process:144, Rol
e=CoherenceServer)
    )
  RecycleMillis=120000
  RecycleSet=MemberSet(Size=0, BitSetCount=0
    )
  )

Services
  (
  TcpRing{TcpSocketAccepter{State=STATE_OPEN, ServerSocket=192.168.8.80:8088}, Connections=[]}
  ClusterService{Name=Cluster, State=(SERVICE_STARTED, STATE_JOINED), Id=0, Version=3.5, OldestMemberId=1}
  InvocationService{Name=Management, State=(SERVICE_STARTED), Id=1, Version=3.1, OldestMemberId=1}
  DistributedCache{Name=PartitionedPofCache, State=(SERVICE_STARTED), LocalStorage=enabled, PartitionCount=257, BackupCo
unt=1, AssignedPartitions=257, BackupPartitions=0}
  )

2009-12-22 12:12:29.737/183.324 Oracle Coherence GE 3.5.2/463  (thread=Cluster, member=1): Member(Id=2, Timestamp=20
09-12-22 12:12:29.541, Address=192.168.8.80:8089, MachineId=24656, Location=process:1188, Role=CoherenceConsole) joined
Cluster with senior member 1
2009-12-22 12:12:30.498/184.085 Oracle Coherence GE 3.5.2/463  (thread=Cluster, member=1): Member 2 joined Service M
anagement with senior member 1
2009-12-22 12:12:31.860/185.447 Oracle Coherence GE 3.5.2/463  (thread=Cluster, member=1): TcpRing: connecting to me
mber 2 using TcpSocket{State=STATE_OPEN, Socket=Socket[addr=/192.168.8.80,port=8089,localport=2463]}
2009-12-22 12:12:51.338/204.925 Oracle Coherence GE 3.5.2/463  (thread=Cluster, member=1): Member 2 joined Service D
istributedCache with senior member 2

The following command starts a cache client.
D:\coherence\bin>coherence.cmd

D:\coherence\bin>coherence.cmd
** Starting storage disabled console **
java version "1.6.0_11"
Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
Java HotSpot(TM) Server VM (build 11.0-b16, mixed mode)

2009-12-22 12:12:21.054/3.425 Oracle Coherence 3.5.2/463  (thread=main, member=n/a): Loaded operational configurat
ion from resource "jar:file:/D:/coherence/lib/coherence.jar!/tangosol-coherence.xml"
2009-12-22 12:12:21.355/3.726 Oracle Coherence 3.5.2/463  (thread=main, member=n/a): Loaded operational overrides
from resource "jar:file:/D:/coherence/lib/coherence.jar!/tangosol-coherence-override-dev.xml"
2009-12-22 12:12:21.365/3.736 Oracle Coherence 3.5.2/463  (thread=main, member=n/a): Optional configuration override
 "/tangosol-coherence-override.xml" is not specified
2009-12-22 12:12:21.415/3.786 Oracle Coherence 3.5.2/463  (thread=main, member=n/a): Optional configuration override
 "/custom-mbeans.xml" is not specified

Oracle Coherence Version 3.5.2/463
 Grid Edition: Development mode
Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.

2009-12-22 12:12:29.316/11.687 Oracle Coherence GE 3.5.2/463  (thread=Cluster, member=n/a): Service Cluster joined t
he cluster with senior service member n/a
2009-12-22 12:12:29.356/11.727 Oracle Coherence GE 3.5.2/463  (thread=Cluster, member=n/a): Failed to satisfy the
variance: allowed=16, actual=20
2009-12-22 12:12:29.356/11.727 Oracle Coherence GE 3.5.2/463  (thread=Cluster, member=n/a): Increasing allowable v
ariance to 17
2009-12-22 12:12:29.807/12.178 Oracle Coherence GE 3.5.2/463  (thread=Cluster, member=n/a): This Member(Id=2, Time
stamp=2009-12-22 12:12:29.541, Address=192.168.8.80:8089, MachineId=24656, Location=process:1188, Role=CoherenceConsole,
 Edition=Grid Edition, Mode=Development, CpuCount=1, SocketCount=1) joined cluster "cluster:0xD3FB" with senior Member(I
d=1, Timestamp=2009-12-22 12:09:38.06, Address=192.168.8.80:8088, MachineId=24656, Location=process:144, Role=CoherenceS
erver, Edition=Grid Edition, Mode=Development, CpuCount=1, SocketCount=1)
2009-12-22 12:12:29.977/12.348 Oracle Coherence GE 3.5.2/463  (thread=Cluster, member=n/a): Member 1 joined Service
Management with senior member 1
2009-12-22 12:12:29.977/12.348 Oracle Coherence GE 3.5.2/463  (thread=Cluster, member=n/a): Member 1 joined Service
PartitionedPofCache with senior member 1
2009-12-22 12:12:30.578/12.949 Oracle Coherence GE 3.5.2/463  (thread=Invocation:Management, member=2): Service Mana
gement joined the cluster with senior service member 1
SafeCluster: Name=cluster:0xD3FB

Group{Address=224.3.5.2, Port=35463, TTL=4}

MasterMemberSet
  (
  ThisMember=Member(Id=2, Timestamp=2009-12-22 12:12:29.541, Address=192.168.8.80:8089, MachineId=24656, Location=proces
s:1188, Role=CoherenceConsole)
  OldestMember=Member(Id=1, Timestamp=2009-12-22 12:09:38.06, Address=192.168.8.80:8088, MachineId=24656, Location=proce
ss:144, Role=CoherenceServer)
  ActualMemberSet=MemberSet(Size=2, BitSetCount=2
    Member(Id=1, Timestamp=2009-12-22 12:09:38.06, Address=192.168.8.80:8088, MachineId=24656, Location=process:144, Rol
e=CoherenceServer)
    Member(Id=2, Timestamp=2009-12-22 12:12:29.541, Address=192.168.8.80:8089, MachineId=24656, Location=process:1188, R
ole=CoherenceConsole)
    )
  RecycleMillis=120000
  RecycleSet=MemberSet(Size=0, BitSetCount=0
    )
  )

Services
  (
  TcpRing{TcpSocketAccepter{State=STATE_OPEN, ServerSocket=192.168.8.80:8089}, Connections=[]}
  ClusterService{Name=Cluster, State=(SERVICE_STARTED, STATE_JOINED), Id=0, Version=3.5, OldestMemberId=1}
  InvocationService{Name=Management, State=(SERVICE_STARTED), Id=1, Version=3.1, OldestMemberId=1}
  )

Map (?):

2009-12-22 12:12:49.505/31.906 Oracle Coherence GE 3.5.2/463  (thread=main, member=2): Loaded cache configuration
from "jar:file:/D:/coherence/lib/coherence.jar!/coherence-cache-config.xml"
2009-12-22 12:12:51.358/33.729 Oracle Coherence GE 3.5.2/463  (thread=DistributedCache, member=2): Service Distribut
edCache joined the cluster with senior service member 2

  
  example-distributed
  DistributedCache
  
    
      example-binary-backing-map
    
  
  true

But when I try to store data cached from the client side, it reports the error message: it is staorage-disabled people. It shows that this console cache cannot store data in the server cache existing since then using different cache config files.

Map (ca3): cache ca2

  
  example-distributed
  DistributedCache
  
    
      example-binary-backing-map
    
  
  true


Map (ca2): put 1 one
2009-12-22 14:00:04.999/6467.370 Oracle Coherence GE 3.5.2/463  (thread=main, member=2):
java.lang.RuntimeException: Storage is not configured
        at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.onMissing
Storage(DistributedCache.CDB:9)
        at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.ensureReq
uestTarget(DistributedCache.CDB:34)
        at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.put(Distr
ibutedCache.CDB:22)
        at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.put(Distr
ibutedCache.CDB:1)
        at com.tangosol.util.ConverterCollections$ConverterMap.put(ConverterCollections.java:1541)
        at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$ViewMap.put(Distrib
utedCache.CDB:1)
        at com.tangosol.coherence.component.util.SafeNamedCache.put(SafeNamedCache.CDB:1)
        at com.tangosol.coherence.component.application.console.Coherence.processCommand(Coherence.CDB:581)
        at com.tangosol.coherence.component.application.console.Coherence.run(Coherence.CDB:39)
        at com.tangosol.coherence.component.application.console.Coherence.main(Coherence.CDB:3)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.tangosol.net.CacheFactory.main(CacheFactory.java:1400)

Tags: Fusion Middleware

Similar Questions

  • Can we create database of watch on the same server as the primary database

    I have Oracle 10 g Rel2, Windows server 2003 operating system. Can I create backup of database on the same server on which we have our primary database?

    Yes, you can
    You must configure the settings DB_FILE_NAME_CONVERT file
    If the standby database is on the same system as the primary database or if the structure of the directory where data files are located on the standby site is different from the primary site, this parameter is required.
    Please refer to the documentation:
    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14237/initparams048.htm#REFRN10038

    - - - - - - - - - - - - - - - - - - - - -
    Kamran Agayev a. (10g OCP)
    http://kamranagayev.WordPress.com

  • Different block size in the same cluster

    Hello

    We use vSphere 4.0 U1. The size of the block of our VMFS data warehouses is configured as 1 MB.
    We plan to add a new datastore with 2 or 4 MB, my question is:
    Is it possible to configure different block sizes in the same cluster without damaging the VMS and without affecting
    vMotion, SVMotion, FT, vDR, I/O performance, clone the virtual machine in another data store, deploy a VM in the data store different block size... etc?
    If it's ok then all limitations or disadvantages should we pay attention to?
    I have'nt found any document concerning the present and hope you guys can shed some light on this subject.
    Thanks in avdance.

    It is not question of having data with different block sizes stores - the only thing you need to keep in mind is the size limitations of different file between the block sizes - so you won't able to svmotion a virtual machine if the VMDK sizes are both great.

  • When you add pictures to the Vista image folder it creates a folder HIDDEN of the same name with two copies of the same image inside

    I use Vista 32 bit. I started to see this problem when I recently copy photos from an SD card.

    When you add pictures to the Vista image folder it creates a folder HIDDEN of the same name with two copies of the same image inside

    I saw hidden files enabled in folder options.

    Any help is appreciated.

    Hey guys... I found the answer... Problem is with the software vaio content analyzer that comes with the vaio...

    It just search for Vaio Content Analyzer (parameters) and deselect

    Video analysis
    image analysis
    analysis of the music

    I went looking for this crazy thing... used almost all types of online scan, and finally to find that it is caused by an internal software only...
    anyway thanks to all... Hope it helps someone in the future :)
  • Two TouchSmart PCs in different locations die on the same day with the same error? (BIOHD-2)

    Hi all

    It's really weird... and very frustrating.

    I own an IQ506 (with TV tuner) which I was quite pleased. So much so, that I had my office purchase, too (IQ504). But lately, my computer acted (locking up, freezing). Funny enough, the IQ504, we bought for work has also been acing similarly.

    Today, the IQ504 at work died. We ran startup diagnostics tool and found a problem with the hard drive (not detected).

    I'm here houses a TouchSmart work, but before going to bed, I tried to wake up from its sleep to see the doughnut of Vista of death. So I made a forced shutdown and restart. Then, I got an error "missing media, please restart." So I did. Several times, to see the same error. I'm trying to run the diagnostics F9 (which is slow to run) and find the diagnostic tools cannot find the HARD drive. I reboot again and enter the Setup program. Of course, no hard drive detected.

    This seems to be a strange coincidence. The two PCs in different parts of the city, BOTH die the SAME day with the SAME error?

    Dead hard drive? or the SATA controller would be dead?

    Please don't tell me that all the new photos of the birthday of my daughter are now gone...

    Is that what HP would cover under warranty?

    What can I do?

    Thank you

    Doon

    IQ506 running Vista Home premium. A device attached: HP LaserJet.

    Message edited by doon on 17/12/2008 01:32

    see you soon,
    Doon

    I just wanted you to know that...

    (1) the newly displayed firmware fix may not work for you immediately

    2) there is a solution!

    I just unbricked my drive and recovered ALL MY DATA! I look back to the top as I type...

    Here is the solution I posted:

    http://h30434.www3.HP.com/PSG/board/message?message.UID=34409#U34409

    I hope this helps!

    See you soon,.

    Doon

  • BlackBerry Z3 can I create a Blackberry ID using the same email address, but with a different password?

    I use 2 phones and I am ready to create a new blackberry on the 2nd ID, but it requires an email address and I don't have that one email address that I use for everything. I want to know if it is possible to create a new BBID with the same e-mail address but different password. The main thing is I want both phones to be active and fully functional, but I don't have a single address email and I prefer not to create another email address, because I love all of my emails in one place rather then having 2 email addresses. I don't want any phone be disabled. I do not fear one of the BBM is turned off, as long as at least one works. Both phones are a Blackberry Curve 9320 and a Blackberry z10, which is one waiting to be activated.

    No this is not possible. The BBID, you use is associated with the device, you are using, the e-mail address is the user and cannot be associated with two BlackBerry smartphones to consider it time of the password.

    I suggest that you create a new e-mail address for the sole purpose of using it as a BlackBerry ID.

    www.bbid.com

  • BlackBerry Z10 can I create a Blackberry ID using the same email address, but with a different password?

    I use 2 phones and I am ready to create a new blackberry on the 2nd ID, but it requires an email address and I don't have that one email address that I use for everything. I want to know if it is possible to create a new BBID with the same e-mail address but different password. The main thing is I want both phones to be active and fully functional, but I don't have a single address email and I prefer not to create another email address, because I love all of my emails in one place rather then having 2 email addresses. I don't want any phone be disabled. I do not fear one of the BBM is turned off, as long as at least one works. Both phones are a Blackberry Curve 9320 and a Blackberry z10, which is one waiting to be activated.

    No this is not possible, the e-mail address you used your BBID, is associated with the device that you use it on. It is also the BBID username. And cannot be used on another device, no matter that there is a different password.

    I suggest that you create a new e-mail account, just for the sole purpose of using it as a BBID.

    www.bbid.com

  • When I print a document adobe I can't read the settings from the printer. I have three different printers, it's the same thing with them all. It happens that when printing PDF documents.

    Phuui - finally installed all Segoe UI. It seems to work now. Thank you!

  • WAP321 two Pat same SSID on the same piece with the installation of single point / cluster

    Hello!

    It has bought several WAP321.

    We have a room which has about 40 books, so I will deploy the two Pat in there (according to recommended 20 clients per WAP on specifications).

    I configured the first WAP, created a cluster and the SSID, then joined the second WAP to the same cluster with the installation of single point, he received the same cluster radio settings (SSID, WPA2 key, etc.)

    My requirements are:

    1: configure all laptops with the same unique SSID created on the WAP (which has spread to the second WAP via single point of installation/cluster)

    2: having the laptop connect automatically to one of the Pat.

    3: If a WAP fails, the laptop can connect automatically to the other.

    Is this possible?

    If Yes, are the measures taken are correct, or is there something else? (and how does the cell know what WAP to connect if two WAPS is configured with the same SSID?)

    Thank you very much!

    Hello

    Thanks for posting your question on the forums.

    Setup you had set up will work fine for your application, I highly recommend to make sure that you have two AP running on different statically assigned channels, you can put one on channel 1 and the other on Channel 6 or 11. This will prevent them to conflict with each other.

    Now, there is no real way to select what AP you connect or even know that you you already connected to without special software, in fact, when a device gets on the network and seeking to connect to the radio will connect to the first point of access that meets the demand, if it is no longer available then it forwards the request again and it will connect to one who works.

    I hope this helps. Please let us know if you have any other questions

  • To connect to vCenter using the same Session with PowerCLI

    Hi all

    Is it possible that we can establish multiple connections to vCenter using the same session with Powercli.

    As connect-viserver-Server "vcenter1" - domain\domainacnt of the username-password "Password".

    is to establish several connections and we want to limit, because we are in the process of report generation based on the web developing using Powercli with IIS.

    Please suggest.

    You can use the Session parameter on the cmdlet Connect-VIServer .

    I use this for the PowerShell Workflows, see workflow of PowerShell and PowerCLI

  • How can I create a separate page in the menu bar?

    How can I create a separate page in the menu bar?

    I want to create a page that does not contain the bar, other pages, and I don't want other pages to include this new page in their menu bars.

    I want to create a different page (s) completely independent in an existing menu bar and maybe add it's own menu bar...

    Is there a way to do it?

    Yes, you can right click the page you want to have separate and select "exclude of the Menu.

  • I can't create a new folder under the directory "Documents".

    All of a sudden, I can't create a new folder under the directory "Documents".  In the past whenever I right-click on 'Documents' and then click on "File" I was given an option to click on "File" or "Briefcase".  Now only Briefcase appears.  That's happened?

    What happened a bit in the past, but it happens a lot recently.
     

    How to remove and restore the default context Menu items 'New' in Windows 7 and Windows 8
    http://www.SevenForums.com/tutorials/28677-new-context-menu-remove-restore-default-menu-items.html
     
     

    Tip: When you save the text in Notepad, the default file format is .txt. Replace all files.
     

     
  • Mr President, how can I enter two rows at the same time with different default values that only the first line to use see?

    Mr President.

    My worm jdev is 12.2.1

    How to enter two rows at the same time with different default values that only the first line to use see?

    Suppose I have a table with four fields as below

    "DEBIT" VARCHAR2(7) , 
      "DRNAME" VARCHAR2(50),
      "CREDIT" VARCHAR2(7) , 
      "CRNAME" VARCHAR2(50),
    

    Now I want that when I click on a button (create an insert) to create the first line with the default values below

    firstrow.png

    So if I click on the button and then validate the second row with different values is also inserted on commit.

    The value of the second row are like the picture below

    tworows.png

    But the second row should be invisible. It could be achieved by adding vc in the vo.

    The difficult part in my question is therefore, to add the second row with the new default values.

    Because I already added default values in the first row.

    Now how to add second time default values.

    Concerning

    Mr President

    I change the code given by expensive Sameh Nassar and get my results.

    Thanks once again dear Sameh Nassar .

    My code to get my goal is

    First line of code is

        protected void doDML(int operation, TransactionEvent e) {    
    
            if(operation != DML_DELETE)
                 {
                     setAmount(getPurqty().multiply(getUnitpurprice()));
                 } 
    
            if (operation == DML_INSERT )
                       {
                               System.out.println("I am in Insert with vid= " + getVid());
                           insertSecondRowInDatabase(getVid(),getLineitem(),"6010010","SALES TAX PAYABLE",
                            (getPurqty().multiply(getUnitpurprice()).multiply(getStaxrate())).divide(100));      
    
                           }
    
            if(operation == DML_UPDATE)
                              {                                                    
    
                                 System.out.println("I am in Update with vid= " + getVid());
                             updateSecondRowInDatabase(getVid(),
                                 (getPurqty().multiply(getUnitpurprice()).multiply(getStaxrate())).divide(100));      
    
                              }                      
    
            super.doDML(operation, e);
        }
        private void insertSecondRowInDatabase(Object value1, Object value2, Object value3, Object value4, Object value5)
                  {
                    PreparedStatement stat = null;
                    try
                    {
                      String sql = "Insert into vdet (VID,LINEITEM,DEBIT,DRNAME,AMOUNT) values " +
                 "('" + value1 + "','" + value2 + "','" + value3 + "','" + value4 + "','" + value5 + "')";  
    
                      stat = getDBTransaction().createPreparedStatement(sql, 1);
                      stat.executeUpdate();
                    }
                    catch (Exception e)
                    {
                      e.printStackTrace();
                    }
                    finally
                    {
                      try
                      {
                        stat.close();
                      }
                      catch (Exception e)
                      {
                        e.printStackTrace();
                      }
                    }
                  }  
    
                  private void updateSecondRowInDatabase(Object value1, Object value5)
                  {
                    PreparedStatement stat = null;
                    try
                    {
                      String sql = "update vdet set  AMOUNT='"+ value5+"' where VID='" + value1 + "'";                     
    
                      stat = getDBTransaction().createPreparedStatement(sql, 1);  
    
                      stat.executeUpdate();
                    }
                    catch (Exception e)
                    {
                      e.printStackTrace();
                    }
                    finally
                    {
                      try
                      {
                        stat.close();
                      }
                      catch (Exception e)
                      {
                        e.printStackTrace();
                      }
                    }                  
    
                  }
    

    Second line code is inside a bean method

        public void addNewPurchaseVoucher(ActionEvent actionEvent) {
            // Add event code here...
    
            BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
                   DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("VoucherView1Iterator");
                   RowSetIterator rsi = dciter.getRowSetIterator();
                   Row lastRow = rsi.last();
                   int lastRowIndex = rsi.getRangeIndexOf(lastRow);
                   Row newRow = rsi.createRow();
                   newRow.setNewRowState(Row.STATUS_NEW);
                   rsi.insertRowAtRangeIndex(lastRowIndex +1, newRow);
                   rsi.setCurrentRow(newRow);
    
                   BindingContainer bindings1 = BindingContext.getCurrent().getCurrentBindingsEntry();
                   DCIteratorBinding dciter1 = (DCIteratorBinding) bindings1.get("VdetView1Iterator");
                   RowSetIterator rsi1 = dciter1.getRowSetIterator();
                   Row lastRow1 = rsi1.last();
                   int lastRowIndex1 = rsi1.getRangeIndexOf(lastRow1);
                   Row newRow1 = rsi1.createRow();
                   newRow1.setNewRowState(Row.STATUS_NEW);
                   rsi1.insertRowAtRangeIndex(lastRowIndex1 +1, newRow1);
                   rsi1.setCurrentRow(newRow1);
        }
    

    And final saveUpdate method is

        public void saveUpdateButton(ActionEvent actionEvent) {
            // Add event code here...
    
            BindingContainer bindingsBC = BindingContext.getCurrent().getCurrentBindingsEntry();      
    
                   OperationBinding commit = bindingsBC.getOperationBinding("Commit");
                   commit.execute(); 
    
            OperationBinding operationBinding = BindingContext.getCurrent().getCurrentBindingsEntry().getOperationBinding("Commit");
            operationBinding.execute();
            DCIteratorBinding iter = (DCIteratorBinding) BindingContext.getCurrent().getCurrentBindingsEntry().get("VdetView1Iterator");// write iterator name from pageDef.
            iter.getViewObject().executeQuery();  
    
        }
    

    Thanks for all the cooperation to obtain the desired results.

    Concerning

  • There was a problem creating the destination folder. If please check the permission of folder or choose a different folder.   What that means, tried to name several different folders, but still the same error message. Would be grateful for the help!

    There was a problem creating the destination folder. If please check the permission of folder or choose a different folder.   What that means, tried to name several different folders, but still the same error message. Would be grateful for the help!

    This means that the folder you want to create is blocked because of file permissions. The drive or folder you are trying to create the destination folder is set to read-only, and your username does not have write permissions.

  • How can I create a library item in the latest version of dreamweaver CC?

    How can I create a library item in the latest version of dreamweaver CC? I want to save my Start menu and my right foot of author as part of the library but can not find a way to do it.

    Switch to the design view or Code view, and drag the selection to the active panel library category.

Maybe you are looking for