Creating dynamic caches from static config

Hi, we normally create our caches using static config, using the std xml config.
Example, in our cache-mapping, we'll have a cache like the below:
<cache-name>account</cache-name>
            <scheme-name>distributed-persistent-write-thru</scheme-name>
            <init-params>
                <init-param>
                    <param-name>cache-store-class-name</param-name>
                    <param-value>spring-bean:accountCacheStore</param-value>
                </init-param>
                <init-param>
                    <param-name>expiry-time</param-name>
                    <param-value>7d</param-value>
                </init-param>
                <init-param>
                    <param-name>high-units-param</param-name>
                    <param-value>6075000</param-value>
                </init-param>
                <init-param>
                    <param-name>low-units-param</param-name>
                    <param-value>4556251</param-value>
                </init-param>
            </init-params>And in our schemes, we'll have something like:
   <distributed-scheme>
            <scheme-name>distributed-persistent-write-thru</scheme-name>
            <service-name>DistributedWriteThrough</service-name>
            <backing-map-scheme>
                <read-write-backing-map-scheme>
                    <class-name>com.mycom.coherence.ExceptionLoggingBackingMap</class-name>
                    <internal-cache-scheme>
                        <local-scheme>
                            <scheme-ref>local-hybrid-eviction</scheme-ref>
                            <expiry-delay>{expiry-time}</expiry-delay>
                            <high-units>{high-units-param}</high-units>
                            <low-units>{low-units-param}</low-units>
                        </local-scheme>
                    </internal-cache-scheme>
                    <cachestore-scheme>
                        <class-scheme>
                            <class-name>{cache-store-class-name}</class-name>
                        </class-scheme>
                    </cachestore-scheme>
                    <write-delay>0</write-delay>
                </read-write-backing-map-scheme>
            </backing-map-scheme>
            <autostart>true</autostart>
            <backup-count-after-writebehind>0</backup-count-after-writebehind>
        </distributed-scheme>However, now we need to be more dynamic. What i'd like to do is create N caches, that all look like the "account" cache above; so it's like i want to use the config as a template. I don't know how many of these caches i'll need, so i can't configure them statically. The number of caches will be given to the server at startup.
Something like:
List cacheList = new ArrayList<NamedCache>();
NamedCache templateCache = CacheFactory.getCache("account");
cacheList.add( templateCache );
for( int i=0; i<count; i++) {
   cacheList.add( CacheFactory.createFromCache( templateCache, "account"+i ) );
}So what's "best practice" for doing something like this?
Thx.
Edited by: user9222505 on Jul 9, 2012 4:52 PM

Ahh.. I see. There are a few ways to do this.
Presumably then you can create the cache store from Spring for a given cache name. So create a factory class with a static method that takes a String parameter, which will be the cache name, and returns a Cache Store. For example...
package com.jk;
public class CacheStoreFactory {
    public static CacheStore createCacheStore(String cacheName) {
        // in here goes your code to get the cache store instance from Spring
}Now change your cache configuration to use the Factory for your cache store like this
<cache-mapping>
    <cache-name>account*</cache-name>
    <scheme-name>distributed-persistent-write-thru</scheme-name>
    <init-params>
        <init-param>
            <param-name>expiry-time</param-name>
            <param-value>7d</param-value>
        </init-param>
        <init-param>
            <param-name>high-units-param</param-name>
            <param-value>6075000</param-value>
        </init-param>
        <init-param>
            <param-name>low-units-param</param-name>
            <param-value>4556251</param-value>
        </init-param>
    </init-params>
</cache-mapping>
<caching-schemes>
    <distributed-scheme>
        <scheme-name>distributed-persistent-write-thru</scheme-name>
        <service-name>DistributedWriteThrough</service-name>
        <backing-map-scheme>
            <read-write-backing-map-scheme>
                <class-name>com.mycom.coherence.ExceptionLoggingBackingMap</class-name>
                <internal-cache-scheme>
                    <local-scheme>
                        <scheme-ref>local-hybrid-eviction</scheme-ref>
                        <expiry-delay>{expiry-time}</expiry-delay>
                        <high-units>{high-units-param}</high-units>
                        <low-units>{low-units-param}</low-units>
                    </local-scheme>
                </internal-cache-scheme>
                <cachestore-scheme>
                    <class-scheme>
                        <class-factory-name>com.jk.CacheStoreFactory</class-factory-name>
                        <method-name>createCacheStore</method-name>
                        <init-params>
                            <init-param>
                                <param-type>String</param-type>
                                <param-value>{cache-name}</param-value>
                            </init-param>
                        </init-params>
                    </class-scheme>
                </cachestore-scheme>
                <write-delay>0</write-delay>
            </read-write-backing-map-scheme>
        </backing-map-scheme>
        <autostart>true</autostart>
        <backup-count-after-writebehind>0</backup-count-after-writebehind>
    </distributed-scheme>
</caching-schemes>When Coherence comes to create a cache it will pass the name to the factory method to create the cache store.
JK

Similar Messages

  • Creating dynamic illustrations from spreadsheet

    Hi,
    I am currently working on a research project which involves creating dynamic graphics.
    My research involves the creation of a graphic diagram from spreadsheets/databases. But the output requires to be dynamic. E.g change the spreadsheet it changes the graphic.
    I am basically want to create my own graphs. But I don't want to use the illustrator graph wiz.
    I wondered if you had any suggestions of how to go about this? I have been looking into programing and plugins but nothing has come up so far. Can you help?
    Hope you can help!
    Ian Carr

    All i want to do is give shapes a vialue and that value
    corresponds to size colour and where it's placed on the page.
    What you describe can certainly be done with AI Javascript. But...
    My research involves the creation of a graphic diagram from spreadsheets/databases. But the output requires to be dynamic. E.g change the spreadsheet it changes the graphic.
    ...depends upon what exactly you mean by "dynamic; change the spreadsheet, it changes the graphic."
    With AI Javascript, you can:
    Parse values out of delimited text.
    Use those values to manipulate size, position, and color of objects.
    Assign Notes to objects, or send them to a Layer (or possibly use other mechanisms whereby to give them a "handle" by which to identify them again the next time you edit the values and rerun the script).
    So if by "dynamic" you mean to have the graph effectively "re-plot" itself upon demand after editing the values, yes.
    But if by "dynamic" you mean to watch individual objects move as you edit individual values in real time, without re-running the script, no. (That could be done in Flash.)
    JET

  • Creating dynamically JTree from database values

    Hi,
    I have a local database with some node values. I receive these values from database as a String[].
    short example:
    String[] Values = {"mainNode","Processors","mainNode","RAM","mainNode","Monitors",
    "Processors","INTEL","Processors","AMD","RAM","Kingston","RAM","GoodRAM",
    "Kingston","400MHz","Kingston","433MHz"}First value is higher node, second is a child.
    I'd like to produce dynamically JTree from Values[] like below:
    MainNode
    |----Processors
          |----INTEL
          |----AMD
    |----RAM
          |----Kingston
                |----400MHz
                |----433MHz
          |----GoodRam
    |----MonitorsI can't build up any working and fast solution :(
    Can anyone help me ?
    Please for any advices (samples) which will help me to apply it.
    Dearly regards!

    This is a relatively straight forward task but it smacks of being homework so unless you post what you have already done you are unlikely to be given any code.
    As a hint -
    Go through the data creating a Map between the parent value and a child DefaultMutableTreeNode which contains as user object the child String.
    When you extract a parent String from the data lookup the parent DefaultMutableTreeNode in the map and add the child DefaultMutableTreeNode to the parent DefaultMutableTreeNode.
    Note - All the map is doing is giving you a quick way of looking up a DefaultMutableTreeNode given a parent name.
    Note - that your tree will have problems if the same value appears in two or more branches!

  • Generating Dynamic form from static context.

    Hi All
    I have  static context node structure
    Section  (Node)
          QuestionText  (Attribute)
           AnsText  (Attribute)
    I have populated the values in this node from an RFC in my code .
    Now i need to create a form dynamically with QuestionText as labels and AnsText as input fields.
    I have written the following code
    for(int i = 0; i< wdContext.nodeSection().getSize; i++)
    IWDInputField  inp_Ans = (IWDInputField)view.createElement(IWDInputField.class,"ID"+i);
    IWDAttributeInfo ansAtrib = wdContext.nodeSection().getNodeInfo().getAttribute("AnsText");
    inp_Ans.bindValue(ansAtrib);
    This way i have bound  a single attribute to all inputfields.
    So the value in the first element of AnsText appears in all inputfields.
    In case of tables it works fine but i need to create the form.
    Kindly help me in solving the issue.
    Regards
    Sonal

    It is not possible to bind UI elements against node elements, only inside context-driven UI elements like Table, RowRepeater etc.
    What you can do is
    - use a RowRepeater, or
    - create separate context attributes instead of node elements and bind the programmatically created Label and InputField elements to these attributes
    Armin

  • NEED HELP... Creating dynamic table from data file...

    Hi
    I'm writing an application for data visualization. The user can press the "open file" button and a FileChooser window will come up where the user can select any data file. I would like to take that data file and display it as a table with rows and columns. The user needs to be able to select the coliumns to create a graph. I have tried many ways to create a table, but nothing seems to work! Can anyone help me?! I just want to read from the data file and create a spreadsheet type table... I won't know how many rows and columns I'll need in advance, so the table needs to be dynamic!
    If you have ANY tips, I'd REALLY appreciated.....

    Thank you for your help. I tried to use some of the code in the examples... I'm really new at this, so I'm not sure how to set it up. I added the code, but when I open a file, nothing happens. Here's the code I have so far...
    package awt;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.text.*;
    import javax.swing.border.*;
    import javax.swing.table.*;
    * @author
    public class Main {
    public static void main(String[] args) {
    JFrame frame = new ScatterPlotApp();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.show();
    class ScatterPlotApp extends JFrame implements ActionListener{
    private JButton openButton, exitButton, scatButton, refreshButton;
    private JMenuBar menuBar;
    private JMenuItem openItem, exitItem;
    private JFileChooser chooser;
    private JMenu fileMenu;
    private JTextPane pane;
    private JTable table;
    private DefaultTableModel model;
    private JScrollPane scrollPane;
    private Container contentPane;
    /** Creates a new instance of ScatterPlotApp */
    public ScatterPlotApp() {
    setTitle("Data Visualizer");
    Toolkit tk = Toolkit.getDefaultToolkit();
    Dimension d = tk.getScreenSize();
    int width = 867;
    int height = 800;
    setBounds((d.width - width)/2, (d.height - height)/2, width, height);
    contentPane = getContentPane();
    JPanel panel = new JPanel();
    //pane = new JTextPane();
    panel.setLayout(new FlowLayout(FlowLayout.CENTER));
    contentPane.add(panel, BorderLayout.SOUTH);
    //contentPane.add(pane, BorderLayout.NORTH);
    scatButton = new JButton("Create ScatterPlot");
    scatButton.addActionListener(this);
    openButton= new JButton ("Open File");
    openButton.addActionListener(this);
    exitButton = new JButton ("Exit");
    exitButton.addActionListener(this);
    refreshButton = new JButton ("Reload Data");
    refreshButton.addActionListener(this);
    panel.add(openButton);
    panel.add(scatButton);
    panel.add(refreshButton);
    panel.add(exitButton);
    fileMenu = new JMenu("File");
    openItem = fileMenu.add(new JMenuItem ("Open", 'O'));
    openItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, Event.CTRL_MASK));
    openItem.addActionListener(this);
    exitItem = fileMenu.add(new JMenuItem ("Exit", 'X'));
    exitItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.CTRL_MASK));
    exitItem.addActionListener(this);
    JMenuBar menuBar = new JMenuBar();
    fileMenu.setMnemonic('F');
    menuBar.add(fileMenu);
    setJMenuBar(menuBar);
    public void actionPerformed(ActionEvent e){
    Vector columnNames = new Vector();
         Vector data = new Vector();
    try{
    Object source = e.getSource();
    if (source == openButton || e.getActionCommand().equals("Open")){
    chooser = new JFileChooser(".");
    int status =chooser.showOpenDialog(this);
    if (status ==JFileChooser.APPROVE_OPTION)
    File file = chooser.getSelectedFile();
    FileInputStream fin = new FileInputStream(file);
    BufferedReader br = new BufferedReader(new InputStreamReader(fin));
    String line;
    //StringBuffer bf = new StringBuffer();
    StringTokenizer st1 = new StringTokenizer(br.readLine(), ";");
                   while( st1.hasMoreTokens() )
                        columnNames.addElement(st1.nextToken());
                   // extract data
                   while ((line = br.readLine()) != null)
                        StringTokenizer st2 = new StringTokenizer(line, ";");
                        Vector row = new Vector();
                        while(st2.hasMoreTokens())
                             row.addElement(st2.nextToken());
                        data.addElement( row );
                   br.close();
    model = new DefaultTableModel(data, columnNames);
              table = new JTable(model);
    scrollPane = new JScrollPane( table );
    getContentPane().add( scrollPane, BorderLayout.NORTH );
    while((line=br.readLine())!=null)
    bf.append(line+"\n");
    pane.setText(bf.toString());
    //pane.setText(bf.toString());
    else if (source == scatButton){
    else if (source == exitButton || e.getActionCommand().equals("Exit")){
    System.exit(0);
    else if (source == refreshButton){
    catch (Exception ex){
    ex.printStackTrace();
    }

  • Create dynamic webpages from Content management system

    We have a requirement where the user would add a content for a "type = adCampaign". This content (for this type)then should create a dynamic webpage.
    The html template (for the dynamic page) remains the same. Only the images and the static content changes.
    Does anyone know how to achieve this?
    I was looking at adTargetContent tag. Does anybody have any examples of this usage.
    Thanks for your help in advance.

    Hi,
    Have you looked into the personalization and campaign management features in WLP 8.1? It sounds like they will do what you need, but if not, please give us some more details about what you're trying to do.
    Cheers,
    Skip

  • Create Dynamic Chart from sql / plsql

    Hi can anybody help with this problem. I need to know the process I can use to create a dynamic pie chart from plsql.
    i.e. the functionality is -> user selects a table, then selects a subset of columns and then generates a pie chart of these columns.
    I cannot find a way of generating the pie chart sql syntax on the fly. Can anybody do this?

    See: Re: SVG Charts - How to use dynamic tables in select statement

  • Create dynamic controls from JSON Response

    I have a requirement to create a group of checkbox with lebels in a page from JSON response.
    The JSON response is
        "data": [
                "CodeStatus": "Red"
                "CodeStatus": "Orange"
                "CodeStatus": "Green"
                "CodeStatus": "Yellow"
    the  design is:
    the box is vertically scrollable, as it can have more color codes.
    Can anyone suggest how to design the above?
    If one can provide the implemantation code, that would be very good as I have very time to implement it.

    Have a look at templates and for more complex scenarios factory functions, which give you the ability to dynamically create controls from model data.
    SAPUI5 SDK - Demo Kit
    Regards,
    Jason

  • Creating dynamic pages with static URLs

    Hello
    I've built a simple CMS (in DW, using ASP and MS SQL) for a
    client which allows them to edit existing pages (all of which are
    called page.asp?p=X) or add news pages if they want.
    However they'd like to be able to name their new pages e.g.
    pagename.asp.
    Is there an easy way to do this?
    Many thanks in advance
    Square Eye

    Hi Abhilash,
    Thanks for the quick reply.
    Actually the problem is with the image, as I am not able to rotate 270 degree. Crystal report cannot support the rotation of image.
    i have another problem, I have to create a report in which
    Lables are fixed on the left side of report and 3 columns per portrait page. Those columns are
    dynamically created and shown in the report.
    The format is like the above. Can you please help me in doing this report, as I tried it doing
    with CrossTab. I am really stuck to this report.

  • Create dynamic column from xml file

    Hi All,
           <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"  layout="absolute" backgroundColor="white" width="500" height="300" creationComplete="onload()" >
    <mx:Style>
        DataGrid {
            alternatingItemColors: #a1a1a1,#8bb8e6;       
            borderColor:#050505; borderStyle:outset;        
            color:#ffffff;       
            editable:false;         
               fontSize:11; fontWeight:bold; fontFamily:Tahoma;          
               horizontalGridLines:false;
               headerStyleName:myHeaderStyles;
                    headerSeparatorSkin:ClassReference("mx.skins.ProgrammaticSkin");    
        rollOverColor:#5CC2F7;    
        selectionColor:#E8C76D; sortableColumns:true;   
        textAlign:center; textRollOverColor:#FD0606; textSelectedColor:#1301FF;   
        variableRowHeight:true;
        verticalAlign:middle; verticalGridLines:false; verticalGridLineColor:#050505;   
    wordWrap: false; 
    .myHeaderStyles
                color: #ffffff;
                fontWeight: bold; fontFamily:Arial; fontSize:13;
    </mx:Style>
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
       import mx.charts.renderers.CircleItemRenderer;
       import mx.charts.series.ColumnSeries;
       [Bindable]
        public var myData:ArrayCollection;
    private var now:Date=new Date();
    private var str:String;
    private var st:String;
    public function onload():void
    str=String(now.getDate())+' '+String(now.getMonth())+' '+String(now.getFullYear())+' '+String(now.getHours())+' '+String(now.getMinutes()+' '+String(now.getSeconds()));
    trace(str);
    st=srv.url="Data/NumberChart.xml?rand="+str;
    trace(st);
    srv.send();
    public function onresult():void
    myData=ArrayCollection(srv.lastResult.Document.Record)
    trace(myData);
    ]]>
    </mx:Script>
    <!-- xml path (data passing) -->
      <mx:HTTPService id="srv"         result="onresult()"  /> 
      <mx:WipeRight id="myWR" duration="2000"/>
        <mx:WipeLeft id="myWL" duration="2000"/>   
        <mx:HBox label="Home Team" width="100%" height="100%" backgroundColor="white">
    <mx:DataGrid id="HomeTeam" dataProvider="{myData}" creationCompleteEffect ="{myWR}"   width="500" height="300"  headerBackgroundSkin="@Embed(source='assets/Tileimage4movieplayer_img.png')">
    <mx:columns>
    <mx:DataGridColumn id="Hcol1" headerText="Player" draggable="false" dataField="DisField" width="170" showDataTips="true" wordWrap="true"  />
    <mx:DataGridColumn id="Hcol2" headerText="Average" draggable="false" dataField="Value" width="170" showDataTips="true" wordWrap="true"  />
    <mx:DataGridColumn id="Hcol3" headerText="Matchs" draggable="false" dataField="Prefix" width="170" showDataTips="true" wordWrap="true"  />
    </mx:columns>
    </mx:DataGrid>
    </mx:HBox>
    </mx:Application>
    and my xml code is...
    <?xml version='1.0' encoding='utf-8' ?>
    <Document Title='50 Runs Milestone'>
    <Record>
    <DisField>K Sangakkara</DisField>
    <Value>200.00</Value>
    <runs>50</runs>
    <Prefix>KXIP Vs DC</Prefix>
    </Record>
    <Record>
    <DisField>R Sharma</DisField>
    <Value>185.19</Value>
    <Prefix>KXIP Vs DC</Prefix>
    <runs>50</runs>
    </Record>
    <Record>
    <DisField>W Jaffer</DisField>
    <Value>151.52</Value>
    <Prefix>BRC Vs CSK</Prefix>
    <runs>50</runs>
    </Record>
    <Record>
    <DisField>G Gambhir</DisField>
    <Value>135.14</Value>
    <Prefix>CSK Vs DD</Prefix>
    <runs>50</runs>
    </Record>
    <Record>
    <DisField>M Boucher</DisField>
    <Value>125.00</Value>
    <Prefix>KKR Vs BRC</Prefix>
    <runs>50</runs>
    </Record>
    <Record>
    <DisField>A Gilchrist</DisField>
    <Value>119.05</Value>
    <Prefix>KXIP Vs DC</Prefix>
    <runs>50</runs>
    </Record>
    <Record>
    <DisField>S Asnodkar</DisField>
    <Value>113.64</Value>
    <Prefix>RR Vs BRC</Prefix>
    <runs>50</runs>
    </Record>
    </Document>
    it's working but i want to crete dynamic datagrid column how to do it any idea?

    I actually found this topic interesting, so I made the data and code generic and created a Flex Cookbook entry, adding the ability to remove columns as well:
    <?xml version='1.0' encoding='utf-8' ?>
    <Document>
      <Record>
        <name>Bob Smith</name>
        <age>48</age>
        <sales>$53,000.00</sales>
        <territory>Southeast</territory>
      </Record>
      <Record>
        <name>Susan Sharma</name>
        <age>37</age>
        <sales>$37,000.00</sales>
        <territory>Southwest</territory>
      </Record>
      <Record>
        <name>George Freebird</name>
        <age>52</age>
        <sales>$49,000.00</sales>
        <territory>Midwest</territory>
      </Record>
    </Document>
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" 
      creationComplete="srv.send();" >
      <mx:Script>
        <![CDATA[
          import mx.controls.Alert;
          import mx.collections.ArrayCollection;
          [Bindable] public var myData:ArrayCollection;
          public function onresult():void{
            myData=ArrayCollection(srv.lastResult.Document.Record)
          private function modifyColumns(evt:MouseEvent):void{
            var ac:ArrayCollection = new ArrayCollection(SalesData.columns);
            var actionTaken:Boolean = false;
            if(evt.currentTarget.label=="Remove Column"){
              for each(var col1:DataGridColumn in ac){
                if(col1.headerText == headerTxt.text){
                  ac.removeItemAt(ac.getItemIndex(col1));
                  headerTxt.text = "";
                  SalesData.columns = ac.toArray();
                  actionTaken = true;
              if(actionTaken){
                mx.controls.Alert.show("Column " + headerTxt.text + " was removed.");
              }else{
                mx.controls.Alert.show("Column " + headerTxt.text + " not found.");
            }else if(evt.currentTarget.label=="Add Column"){
              for each(var col:DataGridColumn in ac){
                if(col.headerText == headerTxt.text){
                  mx.controls.Alert.show("Column " + headerTxt.text + " already exists.");
                  return;
              var dgc:DataGridColumn = new DataGridColumn();
              dgc.headerText = headerTxt.text;
              dgc.dataField = datafieldTxt.text;
              dgc.width = 100;
              ac.addItemAt(dgc, int(columnIndexTxt.text));
              SalesData.columns = ac.toArray();
              headerTxt.text = "";
              datafieldTxt.text = "";
              columnIndexTxt.text = "";
              mx.controls.Alert.show("Column " + headerTxt.text + " was added.");
        ]]>
      </mx:Script>
      <mx:HTTPService id="srv" url="data.xml" result="onresult()"/> 
      <mx:DataGrid id="SalesData" dataProvider="{myData}" width="500" height="300">
        <mx:columns>
          <mx:DataGridColumn headerText="Name" dataField="name" width="170"/>
          <mx:DataGridColumn headerText="Sales" dataField="sales" width="170"/>
          <mx:DataGridColumn headerText="Territory" dataField="territory" width="170"/>
        </mx:columns>
      </mx:DataGrid>
      <mx:Form label="Add or Remove a Column">
        <mx:FormItem label="Enter column header text:">
          <mx:TextInput id="headerTxt"/>
        </mx:FormItem>
        <mx:FormItem label="Enter column datafield (if adding):">
          <mx:TextInput id="datafieldTxt"/>
        </mx:FormItem>
        <mx:FormItem label="Enter zero based new column index (if adding):">
          <mx:TextInput id="columnIndexTxt"/>
        </mx:FormItem>
        <mx:FormItem label="Click to add or remove column">
          <mx:HBox>
            <mx:Button label="Add Column" click="modifyColumns(event);"
              disabledColor="0xf1aa99"
              enabled="{headerTxt.text!=''&amp;&amp;datafieldTxt.text!=''&amp;&amp;columnIndexTxt.text! =''}"/>
            <mx:Button label="Remove Column" click="modifyColumns(event);"
              disabledColor="0xf1aa99" enabled="{headerTxt.text!=''}"/>
          </mx:HBox>
        </mx:FormItem>
      </mx:Form>
    </mx:Application>

  • Creating dynamic lists from db resultset

    Hello, Not sure if this is the right forum but I am hoping someone can point me in the right direction.
    I have tried to set up a popup menu with JRadioButtonMenuItem (s) or a JTable from the resultset and then select from the list as input to the next db query (OracleSE db).
    What I cannot do is retrieve the value.
    With "JRadio" I cannot use 'this' on the button in the listener.
    With JTable I cannot extend the object.
    If there are examples then I would be grateful for leads, none of what I have seen goes this deep.
    Thanks,
    Ralph.
    Edited by: user548412 on Feb 21, 2012 6:05 PM

    It would be helpful if you posted your code inside the tags so it became readable. Please do that next time.
    And also: what's your question about that code? I don't see any JDBC code in there; did you have a JDBC question of some kind? If so, what is it?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to create dynamic tree from db resultset?

    i have a db and sql that includes item_id, parent_id, level, description for all hierarchy.
    i want to show this resultset on the page as a adf tree component. How to convert from db resultset to adf tree?
    that is my sql -&gt;SELECT LEVEL, display_title, item_id, parent_id, sac_Hierarchy.Branch(level,description) branch FROM XXXTABLE CONNECT BY job_code = 'ABCD' AND PRIOR item_id = parent_id START WITH job_code = 'ABCD' AND parent_id IS NULL;
    What can i do on backing java or what can i do on jsp page?
    Help Please.
    thanks
    Edited by: Mehmet Özkan on Aug 30, 2008 12:19 PM

    mehmet,
    Have you seen [url http://technology.amis.nl/blog/?p=2116]this?
    John

  • Dynamically create Value Objects from XML file

    Hi
    I want to create a value object from Xml file dynamically,like in the xml file i have the name of the variable and the datatype of the variable.is it possible do that,if so how.

    Read about apache's Digester tool. This is part of the Jakartha project. This tool helps in creating java objects from the XML files. I am not sure, if that is what u r looking for.

  • Error reading data from static cursor cache.

    Hi,
    Does anyone know what causes this error below. It just started happening out of the blue. I'm running Apache Tomcat 4.1 on Win 2000 server with MS SQL Server 2000 database.
    Error:
    java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error reading data from static cursor cache.
    Thanks,
    TR

    hi,
    i had a similar sort of error, something along the lines of "error setting up static cursor cache" using the SQL JDBC drivers on Win2K. i deleted the file entries in the TEMP folder of c:\documents and settings\<user>\Local Settings\TEMP and everything was cool after it. i'm not sure what the exact issue is (probably something like maximum folder size had been reached). i ran the FileMon utility from www.sysinternals.com and it reported a DISK_FULL error on a temporary file being read by the process. to cut a long story short, everything is NOW cool.
    cheer,
    dara

  • Creating Dynamic Flash Video From Photos

    I am creating a web application, mainly in php, and one of
    the key functions we need in the system is for it to take a set of
    photos that have been uploaded and dynamically create a slideshow
    from these files. The slideshow player (flash) should automatically
    pan/zoom across these photos (ken burns effect) and play a music
    track in the background. It also needs to have play, pause,
    progress bar and fullscreen controls.
    basically, it needs to be somewhat of a combination of
    monoslideshow.com and jeroenwijering.com/?item=JW_FLV_Player.
    Monoslideshow in that it takes a set of images (and an audio
    file) through XML and passes them to a slideshow that automatically
    pans/zooms across them.
    JW FLV Player in that it's a "video" with full controls.
    Does anyone know of any scripts that currently exists with
    these features? Or, how difficult is this to build? My php
    developer and I are both flash newbies, so if anyone can help out
    with this project asap, we'd greatly appreciate it.
    Thank you

    Change the .y location of the video object to something off the visible area of the stage, say -1000.

Maybe you are looking for

  • My weather app keeps crashing

    My iPod's weather app keep crashing. I already tried resetting, updating (theres always an error) restoring and all of that. I don't know what to do now!

  • Template changes not applying in Edit Region

    I created a template - 3 tables - the top & bottom table are NOT editable regions. The middle table IS in an editable region. On the template I changed the table in the middle region - changed the background color, deleted a cell, added a picture pla

  • [SOLVED] Run X11 apps using sudo while following wiki

    i was going through the wiki https://wiki.archlinux.org/index.php/Su - using_sudo added the line. Defaults env_keep += "HOME" [rho@turion ~]$ sudo visudo visudo: >>> /etc/sudoers: syntax error near line 94 <<< What now? Options are: (e)dit sudoers fi

  • How to create Hierarchies in BW

    HI All, I have to create a new hierarchies in BW and later test them it works in the report. Can anyone tell me how to create cost center hierarchies? We already have a costcenter heirarchy coming from R/3. But we have to make a new alternate hierarc

  • Nothing will open with double click

    Help! Our iMac seems to work OK, except that nothing will open with a double-click in Finder. It is not the mouse, which works fine. I rebuilt the directory with DiskWarrior, but that did not help. What is weird is that things do open with double-cli