Declaring "tangosol.pof.enabled=" and "tangosol.pof.config=" in xml config

Dear all,
Is there a way to declare "tangosol.pof.enabled=true" and "tangosol.pof.config=my-pof-config.xml" in coherence xml config (e.g. tangosol-coherence-override.xml) ratherthan using the "-Dtangosol.pof.config=" and "-Dtangosol.pof.config=".
We are looking for this because deploying the same config file on both our application servers and our pure coherence nodes is the easiest way we have to be sure that the configurations are in sync.
We have lost several hours last week figuring that we forgot to declare these "-Dtangosol.pof..xxx" environment variables in our J2EE servers and we would like to prevent this to reoccur.
Cyrille

For versions earlier than 3.6, if you don't want to set POF to be the default with the tangosol.pof.enabled switch, you have to add the full serializer definition to your cache config:
<serializer>
<class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>
<!-- Optionally override the default value ("pof-config.xml", or the setting of -Dtangosol.pof.config) -->
<init-params>
<init-param>
<param-type>String</param-type>
<param-value>pof-config.xml</param-value>
</init-param>
</init-params>
</serializer>
From Coherence 3.6, you can add a <serializer/> element to the scheme in
the cache config file:
<distributed-scheme>
<scheme-name>example-distributed</scheme-name>
<service-name>DistributedCache</service-name>
<serializer>pof</serializer>
You can also define the default serialisation method in the cache
config file:
<cache-config>
<defaults>
<serializer>pof</serializer>
</defaults>
Both of these refer to a set of serializers defined in the operational config file that you can override using an
operational overrides file. E.g.
<!-- tangosol-coherence-override.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<coherence>
<cluster-config>
<serializers>
<serializer id="pof">
<class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>
<init-params>
<init-param>
<param-type>String</param-type>
<param-value>my-pof-config.xml</param-value>
</init-param>
</init-params>
</serializer>
</serializers>
</cluster-config>
</coherence>

Similar Messages

  • Can't setup PofAnnotationSerializer in pof-config.xml

    Hi,
    i have class annotated with @Portable and @PortableProperty, and pof-config.xml for setup serializer:
          <user-type>
             <type-id>1001</type-id>
             <class-name>entity.dto.base.EmployeeBaseDTO</class-name>
             <serializer>
                <class-name>com.tangosol.io.pof.PofAnnotationSerializer</class-name>
                    <init-params>
                    <init-param>
                        <param-type>int</param-type>
                        <param-value>1001</param-value>
                     </init-param>
                     <init-param>
                        <param-type>java.lang.Class</param-type>
                        <param-value>entity.dto.base.EmployeeBaseDTO</param-value>
                     </init-param>
                  </init-params>
             </serializer>
          </user-type>
    While starting Coherence 3.7.1 cluster, I get error:
    Unable to instantiate PofSerializer class: com.tangosol.io.pof.PofAnnotationSerializer (Config=...\pof-config.xml, Type-Id=1001,
    Class-Name=entity.dto.base.EmployeeBaseDTO))
    java.lang.InstantiationException: Could not find a constructor for com.tangosol.io.pof.PofAnnotationSerializer(java.lang.Integer, com.tangosol.run.xml.SimpleElement)
    Why second PofAnnotationSerializer contructor parameter is com.tangosol.run.xml.SimpleElement and not java.lang.Class ?
    BTW setup PofAnnotationSerializer programatically works fine:
    SimplePofContext pofCtx = new SimplePofContext();
    int typeId = 1001;
    pofCtx.registerUserType(typeId, EmployeeBaseDTO.class , new PofAnnotationSerializer<EmployeeBaseDTO>(typeId++, EmployeeBaseDTO.class, true));
    Thanks,
    L.V.

    OK, so to enable auto indexing then yes, you need to specify the serializer in the POF configuration, as it says in the documentation 19.3.3 Enabling Automatic Indexing.
    So in your case the configuration should look like this
          <user-type>
             <type-id>1001</type-id>
             <class-name>entity.dto.base.EmployeeBaseDTO</class-name>
             <serializer>
                <class-name>com.tangosol.io.pof.PofAnnotationSerializer</class-name>
                    <init-params>
                    <init-param>
                        <param-type>int</param-type>
                        <param-value>{type-id}</param-value>
                     </init-param>
                     <init-param>
                        <param-type>class</param-type>
                        <param-value>{class}</param-value>
                     </init-param>
                     <init-param>
                        <param-type>boolean</param-type>
                        <param-value>true</param-value>
                     </init-param>
                  </init-params>
             </serializer>
          </user-type>
    You do not replace the param-values that are inside { } or change the param-type values as these are macros that Coherence will automatically replace with the correct values.
    Regarding your error, I'm not sure if that is related to your original question/issue.
    JK

  • Incorrect coherence-rest-pof-config.xml in coherence-rest.jar (Missing PofSerializer configuration)?

    I'm running Coherence 3.7.1.0.0 with REST enabled as per the instruction. I have included coherence-rest-pof-config.xml in my pof config like so:
    <include>coherence-pof-config.xml</include>
    <include>coherence-rest-pof-config.xml</include>
    When I start Coherence, I get the following error:
    Caused by: (Wrapped: error creating class "com.tangosol.io.pof.ConfigurablePofContext") java.lang.IllegalStateException: Missing PofSerializer configuration (Config=custom-types-pof-config.xml, Type-Id=801, Class-Name=com.tangosol.coherence.rest.internal.Get)
    The config in coherence-rest-pof-config.xml for com.tangosol.coherence.rest.internal.Get is as follows:
    <user-type>
          <type-id>801</type-id>
          <class-name>com.tangosol.coherence.rest.internal.Get</class-name>
        </user-type>
    I had a quick look in the coherence-rest.jar, where com.tangosol.coherence.rest.internal.Get is defined. com.tangosol.coherence.rest.internal.Get implements InvocableMap.EntryProcessor, but not PortableObject.
    Am I missing something? As far as I can see, InvocableMap.EntryProcessor does not implement PortableObject either.
    Is there any way to fix this?
    Thanks

    The jar file coherence-common-1.7.0.16988.jar would have been part of the Coherence Incubator product, and isn't part of the core Coherence product itself.
    You'd probably need to refer to the Coherence Incubator site as there are probably significant changes between the version you are using in 3.5.3 and with what is meant for 12.1.2.

  • How to modify POF config dynamically?

    we have a application framework developed in C# .NET which includes 5 applications renning under that.
    my application is running under this framework. I am rading my POF Config entry from app.config of main applicacation(framework)
    I can not add seperate app.config my my application. Also i can not modify the main coherence-pof-config.xml.
    Now the problem is, for my application i want to add new user type in my pof-config file dynamically. how to add that?
    Please help...

    Hi Nick,
    you can specify the <serializer> in the distributed-scheme or other similar scheme elements in the cache configuration file, and it can take an init param specifying the locator of the file name.
         <distributed-scheme>
              <scheme-name>loader-scheme</scheme-name>
              <backing-map-scheme>
                   <local-scheme />
              </backing-map-scheme>
              <autostart>true</autostart>
              <serializer>
                   <class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>
                   <init-params>
                        <init-param>
                             <param-type>string</param-type>
                             <param-value>pof-config-other.xml</param-value>
                        </init-param>
                   </init-params>
              </serializer>
         </distributed-scheme>Output:
    ... (thread=main, member=n/a): Loaded cache configuration from resource "file:.../coherence-cache-config-poftest.xml"
    ...(thread=DistributedCache, member=1): Loading POF configuration from resource "file:.../pof-config-other.xml"Best regards,
    Robert

  • Missing LongBasedIdentifier in coherence-common-pof-config

    Hi all,
    com.oracle.coherence.common.identifiers.LongBasedIdentifier is missing from the coherence-common-pof-config.xml
    Just wanted to report this oversight (if it's not an oversight please let me know why).
    Cheers,
    Alberto

    Hi Alberto,
    Thanks for letting us know. I've fixed this in Incubator 10 and will back patch into Incubator 9.
    Regards
    -- Brian
    Brian Oliver | Architect | Oracle Coherence 


  • Maven gar plugin, not generating pof config

    Hello,
    I'm trying to generate the pof-config.xml file using the maven-gar-plugin as described in this documentation -
    Building Coherence Projects with Maven - 12c (12.1.2)
    The plugin does not seem to generate the pof config file as documented. I've POJO's annotated with @Portable and @PortableProperty.
    Thanks-

    Hi,
    It was problem with my pom.xml. Finally I have created OSGI bundle with maven-scr plugin J Now I have the correct folder structure (OSGI-INF folder). Actually I need to have a reference via sling.getService only. I have installed my osgi bundle in Felix console successfully. The status of the bundle is Active. But the component status is “registered” When I check it in component console. And there is no entry in my service console.
    Here is my java class
    package com.adobe.support.examples.com.adobe.support.examples.osgi.service;
    import org.apache.felix.scr.annotations.Component;
    import org.apache.felix.scr.annotations.Properties;
    import org.apache.felix.scr.annotations.Service;
    import org.apache.felix.scr.annotations.Property;
    @Component(immediate = true, metatype = true)
    @Service
    public class SampleServiceImpl implements SampleService {
    public String sayHello() {
         return "Hello World!";
    Why component statis is 'registerd' instead of having 'active' Could you please tell me how to fix it?
    Thanks in advance
    Regards,
    Anderson

  • Workgroup Bridge and local Wifi Config

    Hi all, hoping you can help me with this, just need an other brain as mine is empty as I've been staring at this for too long!!!
    What I'm trying to config is to have a standalone local WLAN (Built into a VAN) running on the 2.4ghz and then also have a workgroup bridge on the 5ghz to the corporate lan.
    Setup is this:
    2960<-->1142(autonomous)   <--Workgroup bridge on 5Ghz-->  1131(Lightweight)<3560>--<5508WLC> (hope that makes sense!!)
    So  far I have the bridge working, the 1142 connects to a ssid on the 1131  using psk. I can see the 1142 as an assosiated client on the wlc and I  can ping the the lan from the 1142 so I'm happy the bridge is working.
    Clients  connected to the 2.4ghz ssid on the 1142 can only ping through as far  as the AP(1142) I can't seem to get the traffic to pass across the  bridge, is there something I need to do to link the 2.4 to the 5ghz  bridge link?
    Any help always appreciated, cheers.

    dmantill - Thanks for your link. I have read through and checked my config but my plan is to have a number of clients, all dhcp assigned, connecting to the do0 int for local wlan breakout.
    I'm not sure that the passive config will help me there.
    Steven - I have enabled the wgb on the do1 int and I am connecting clients on the do0 int for local wlan breakout. Enabling the WGB has not disabled the other radio on my setup.
    I was running 7.0.98.0 but have today upgraded to 7.0.98.218 on my WLC but that has not helped.
    From what I can tell it looks like my problem just lies with routing traffic across the 2 radios. My local clients can ping as far as the WGB and if I CLI into the WGB AP I can ping the corporate lan on the otherside of the bridge and can also ping from the lan to the WGB. I just cannot seem to get the 2 ssid's to route between each other.
    Here's my WGB config, hope this brings some more ideas!!
    Cheers,
    Jason.
    Current configuration : 1555 bytes
    version 12.4
    no service pad
    service timestamps debug datetime msec
    service timestamps log datetime msec
    service password-encryption
    hostname XXX
    logging rate-limit console 9
    enable secret 5 $1$ujWI$HMYMAjMfJV2J2WaGa1/JJ0
    no aaa new-model
    dot11 syslog
    dot11 ssid XXX       
       authentication open
       authentication key-management wpa
       guest-mode
       wpa-psk ascii 7 105A0C0A11001D1908
    dot11 ssid XXX       
       authentication open
       authentication key-management wpa
       guest-mode
       wpa-psk ascii 7 080F15480C090D1221
    username Cisco password 7 02250D480809
    bridge irb
    interface Dot11Radio0
    no ip address
    no ip route-cache
    encryption mode ciphers tkip
    ssid XXX
    antenna gain 0
    station-role root
    bridge-group 1
    bridge-group 1 subscriber-loop-control
    bridge-group 1 block-unknown-source
    no bridge-group 1 source-learning
    no bridge-group 1 unicast-flooding
    bridge-group 1 spanning-disabled
    interface Dot11Radio1
    no ip address
    no ip route-cache
    encryption mode ciphers tkip
    ssid XXX
    antenna gain 0
    station-role workgroup-bridge
    bridge-group 1
    bridge-group 1 spanning-disabled
    interface GigabitEthernet0
    no ip address
    no ip route-cache
    duplex auto
    speed auto
    no keepalive
    bridge-group 1
    bridge-group 1 spanning-disabled
    interface BVI1
    ip address dhcp
    no ip route-cache
    ip http server
    no ip http secure-server
    ip http help-path http://www.cisco.com/warp/public/779/smbiz/prodconfig/help/eag
    bridge 1 route ip
    bridge 1 aging-time 216000
    line con 0
    line vty 0 4
    login local
    end

  • Messaging Server 3.x: Is there an option to enable and disable the ETRN function?

    Is there an option in Messaging Server to enable and disable the ETRN function?
    <P>
    Yes. You can add the option for enabling and disabling the ETRN function by
    modifying the code in the file <BR>
    <P>
    <I>server-root</I>
    bin/mail/admin/html/SMTPChannelOptions.html
    <P>
    The original code to be modified will appear as follows:<BR>
    <P>
    <!-- ELEM txt="Allow SMTP command 'EXPN': " -->
    <!-- M_RADIO n="SMTP-Accept/Config/AllowEXPN" v="yes" -->
    Yes
    <!-- M_RADIO n="SMTP-Accept/Config/AllowEXPN" v="no" -->
    No
    <P>
    Modify the code to look like this:<BR>
    <P>
    <!-- ELEM txt="Allow SMTP command 'EXPN': " -->
    <!-- M_RADIO n="SMTP-Accept/Config/AllowEXPN" v="yes" -->
    Yes
    <!-- M_RADIO n="SMTP-Accept/Config/AllowEXPN" v="no" -->
    No
    <!-- ELEM txt="Allow SMTP command 'ETRN': " -->
    <!-- M_RADIO n="SMTP-Accept/Config/AllowETRN" v="yes" -->
    Yes
    <!-- M_RADIO n="SMTP-Accept/Config/AllowETRN" v="no" -->
    No
    <P>
    Making these changes will create an extra option to enable and disable the ETRN
    function on the SMTP Options page in the Administration Server.

    Yes, this is possible. In Cisco Webex Administration->Settings->Audio you can choose your audio (system-wide) options:
    WebEx Audio:
    Call In and Call Me service – Enables users to attend a teleconference by calling specified phone numbers or by receiving a Call Me call from the system.
    Call In – Enables users to attend a teleconference by calling specified phone numbers.
    OFF – Disables all calling features.
    Voice connection using computer
    ON
    OFF
    See also this section in the administartion guide.

  • Validating enabled and disabled menu bar in JInternalFrame

    hi,
    everybody.
    i have created a main window using JInternalFrame and JDesktopPane. The window has a menu bar in which document menu is used for closing the main window, while employee menu is used for adding new frame for the employee. while the login frame is displayed when the application is executed.
    my problem is, i want to validate that before login process, employee menu should be disabled, and after login is performed employee menu is enabled.
    the following is my code.
    please reply me as i am stucked with it.
    waiting for the reply
    thanks in advance.
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.io.*;
    import java.util.*;
    public class InternalFrameDemo extends JFrame implements ActionListener
    JDesktopPane desktop;
    public InternalFrameDemo()
    super("InternalFrameDemo");
    int inset = 50;
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    setBounds(inset, inset, screenSize.width - inset*2, screenSize.height - inset*2);
    desktop = new JDesktopPane();
    setContentPane(desktop);
    desktop.setBackground(Color.white);
    setJMenuBar(createMenuBar());
    desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
    createLogin();
    public JMenuBar createMenuBar()
    JMenuBar menuBar = new JMenuBar();
    JMenu menu = new JMenu("Document");
    menu.setMnemonic(KeyEvent.VK_D);
    menuBar.add(menu);
    JMenuItem menuItem = new JMenuItem("Quit");
    menuItem.setMnemonic(KeyEvent.VK_Q);
    menuItem.setAccelerator(KeyStroke.getKeyStroke( KeyEvent.VK_Q, ActionEvent.ALT_MASK));
    menuItem.setActionCommand("quit");
    menuItem.addActionListener(this);
    menu.add(menuItem);
    JMenu employee = new JMenu("Employee");
    employee.setMnemonic(KeyEvent.VK_E);
    employee.setActionCommand("employee");
    menuBar.add(employee);
    JMenuItem additem = new JMenuItem("Add");
    additem.setMnemonic(KeyEvent.VK_A);
    additem.setActionCommand("add");
    additem.addActionListener(this);
    employee.add(additem);
    return menuBar;
    public void actionPerformed(ActionEvent ae)
    String str = ae.getActionCommand();
    if(str.equals("add"))
    System.out.println("Employee Form Invoked");
    createEmployee();
    else if(str.equals("quit"))
    quit();
    public void createEmployee()
    MyEmployeeFrame employeeframe = new MyEmployeeFrame();
    employeeframe.setVisible(true);
    desktop.add(employeeframe);
    try
    employeeframe.setSelected(true);
    catch(Exception e)
    public void createLogin()
    MyLogin loginframe = new MyLogin();
    loginframe.setVisible(true);
    desktop.add(loginframe);
    try
    loginframe.setSelected(true);
    catch(Exception e){}
    public void quit()
    System.exit(0);
    private static void createAndShowGUI()
    JFrame.setDefaultLookAndFeelDecorated(true);
    InternalFrameDemo frame = new InternalFrameDemo();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setSize(800,600);
    frame.setVisible(true);
    public static void main(String a[])
    createAndShowGUI();
    class MyEmployeeFrame extends JInternalFrame implements ActionListener
    JFrame employeeframe;
    JLabel labelfirstname;
    JLabel labellastname;
    JLabel labelage;
    JLabel labeladdress;
    JLabel labelcity;
    JLabel labelstate;
    JTextField textfirstname;
    JTextField textlastname;
    JTextField textage;
    JTextField textaddress;
    JTextField textcity;
    JTextField textstate;
    JButton buttonsave;
    FileOutputStream out;
    PrintStream p;
    String strfirstname,strlastname,strage,straddress,strcity,strstate;
    GridBagLayout gl;
    GridBagConstraints gbc;
    public MyEmployeeFrame()
    super("Employee Details",true,true,true,true);
    setSize(500,400);
    labelfirstname = new JLabel("First Name");
    labellastname = new JLabel("Last Name");
    labelage = new JLabel("Age");
    labeladdress = new JLabel("Address");
    labelcity = new JLabel("City");
    labelstate = new JLabel("State");
    textfirstname = new JTextField(10);
    textlastname = new JTextField(10);
    textage = new JTextField(5);
    textaddress = new JTextField(15);
    textcity = new JTextField(10);
    textstate = new JTextField(10);
    buttonsave = new JButton("Save");
    gl = new GridBagLayout();
    gbc = new GridBagConstraints();
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 1;
    gbc.gridy = 3;
    gl.setConstraints(labelfirstname,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 3;
    gbc.gridy = 3;
    gl.setConstraints(textfirstname,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 1;
    gbc.gridy = 5;
    gl.setConstraints(labellastname,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 3;
    gbc.gridy = 5;
    gl.setConstraints(textlastname,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 1;
    gbc.gridy = 7;
    gl.setConstraints(labelage,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 3;
    gbc.gridy = 7;
    gl.setConstraints(textage,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 1;
    gbc.gridy = 9;
    gl.setConstraints(labeladdress,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 3;
    gbc.gridy = 9;
    gl.setConstraints(textaddress,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 1;
    gbc.gridy = 11;
    gl.setConstraints(labelcity,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 3;
    gbc.gridy = 11;
    gl.setConstraints(textcity,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 1;
    gbc.gridy = 13;
    gl.setConstraints(labelstate,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 3;
    gbc.gridy = 13;
    gl.setConstraints(textstate,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 3;
    gbc.gridy = 17;
    gl.setConstraints(buttonsave,gbc);
    Container contentpane = getContentPane();
    contentpane.setLayout(gl);
    contentpane.add(labelfirstname);
    contentpane.add(textfirstname);
    contentpane.add(labellastname);
    contentpane.add(textlastname);
    contentpane.add(labelage);
    contentpane.add(textage);
    contentpane.add(labeladdress);
    contentpane.add(textaddress);
    contentpane.add(labelcity);
    contentpane.add(textcity);
    contentpane.add(labelstate);
    contentpane.add(textstate);
    contentpane.add(buttonsave);
    buttonsave.addActionListener(this);
    public void reset()
    textfirstname.setText("");
    textlastname.setText("");
    textage.setText("");
    textaddress.setText("");
    textcity.setText("");
    textstate.setText("");
    public void actionPerformed(ActionEvent ae)
    String str = ae.getActionCommand();
    System.out.println(str);
    if(str.equalsIgnoreCase("Save"))
    try
    out = new FileOutputStream("myfile.txt",true);
    p = new PrintStream( out );
    strfirstname = textfirstname.getText();
    strlastname = textlastname.getText();
    strage = textage.getText();
    straddress = textaddress.getText();
    strcity = textcity.getText();
    strstate = textstate.getText();
    p.print(strfirstname+"|");
    p.print(strlastname+"|");
    p.print(strage+"|");
    p.print(straddress+"|");
    p.print(strcity+"|");
    p.println(strstate);
    System.out.println("Record Saved");
    reset();
    p.close();
    catch (Exception e)
    System.err.println ("Error writing to file");
    class MyLogin extends JInternalFrame implements ActionListener
    JFrame loginframe;
    JLabel labelname;
    JLabel labelpassword;
    JTextField textname;
    JPasswordField textpassword;
    JButton okbutton;
    String name = "";
    FileOutputStream out;
    PrintStream p;
    Date date;
    GregorianCalendar gcal;
    GridBagLayout gl;
    GridBagConstraints gbc;
    public MyLogin()
    super("Login",true,true,true,true);
    setSize(400,300);
    gl = new GridBagLayout();
    gbc = new GridBagConstraints();
    labelname = new JLabel("User");
    labelpassword = new JLabel("Password");
    textname = new JTextField("",9);
    textpassword = new JPasswordField(5);
    okbutton = new JButton("OK");
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 1;
    gbc.gridy = 5;
    gl.setConstraints(labelname,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 2;
    gbc.gridy = 5;
    gl.setConstraints(textname,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 1;
    gbc.gridy = 10;
    gl.setConstraints(labelpassword,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 2;
    gbc.gridy = 10;
    gl.setConstraints(textpassword,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 1;
    gbc.gridy = 15;
    gl.setConstraints(okbutton,gbc);
    Container contentpane = getContentPane();
    contentpane.setLayout(gl);
    contentpane.add(labelname);
    contentpane.add(labelpassword);
    contentpane.add(textname);
    contentpane.add(textpassword);
    contentpane.add(okbutton);
    okbutton.addActionListener(this);
    public void reset()
    textname.setText("");
    textpassword.setText("");
    public void run()
    try
    String text = textname.getText();
    String blank="";
    if(text.equals(blank))
    System.out.println("First Enter a UserName");
    else
    if(text != blank)
    date = new Date();
    gcal = new GregorianCalendar();
    gcal.setTime(date);
    out = new FileOutputStream("log.txt",true);
    p = new PrintStream( out );
    name = textname.getText();
    String entry = "UserName:- " + name + " Logged in:- " + gcal.get(Calendar.HOUR) + ":" + gcal.get(Calendar.MINUTE) + " Date:- " + gcal.get(Calendar.DATE) + "/" + gcal.get(Calendar.MONTH) + "/" + gcal.get(Calendar.YEAR);
    p.println(entry);
    System.out.println("Record Saved");
    reset();
    p.close();
    catch (IOException e)
    System.err.println("Error writing to file");
    public void actionPerformed(ActionEvent ae)
    String str = ae.getActionCommand();
    if(str.equals("OK"))
    run();
    loginframe.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
    }

    I realize this post is from a few days ago, but if you're still looking for help:
    This is my first thought on how to do this. Unfortunately, it's a bit messy. JMenuItems can be enabled and disabled but JMenus don't have this option...
    public class InternalFrameDemo extends JFrame implements ActionListener
        JDesktopPane desktop;
        JMenuBar menuBar;
        public InternalFrameDemo()
         setJMenuBar(createMenuBar());
         desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
         createLogin();
        public JMenuBar createMenuBar()
         menuBar = new JMenuBar();
         JMenu menu = new JMenu("Document");
         menu.setMnemonic(KeyEvent.VK_D);
         menuBar.add(menu);
         JMenuItem menuItem = new JMenuItem("Quit");
         menuItem.setMnemonic(KeyEvent.VK_Q);
         menuItem.setAccelerator(KeyStroke.getKeyStroke( KeyEvent.VK_Q, ActionEvent.ALT_MASK));
         menuItem.setActionCommand("quit");
         menuItem.addActionListener(this);
         menu.add(menuItem);
         JMenuItem additem = new JMenuItem("Add");
         additem.setMnemonic(KeyEvent.VK_A);
         additem.setActionCommand("add");
         additem.addActionListener(this);
         employee.add(additem);
         return menuBar;
        public void createLogin()
         MyLogin loginframe = new MyLogin( menuBar );
         loginframe.setVisible(true);
         desktop.add(loginframe);
         try
             loginframe.setSelected(true);
         catch(Exception e)
    class MyLogin extends JInternalFrame implements ActionListener
        JMenuBar menuBar;
        public MyLogin( JMenuBar menuBar1 )
         super("Login",true,true,true,true);
         menuBar = menuBar1;
        public void actionPerformed(ActionEvent ae)
         String str = ae.getActionCommand();
         if(str.equals("OK"))
             run();
             JMenu employee = new JMenu("Employee");
             employee.setMnemonic(KeyEvent.VK_E);
             employee.setActionCommand("employee");
             menuBar.add(employee);
             loginframe.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
    }

  • SSL VPN Full and Split Tunnel Config Question

    I am Beta testing SSLVPN on an IOS router. The question I have is this:
    Is it possiable to have slit and full tunnel configs. It seems that once you create your context and default profile that is all you have either split or full. The books say you can use Radius and assign different profiles but, I would like to give the users a choice (like in the VPN3000 .pcf) of either split or full depending on where they are working from.

    The below is an example using the ASA - but the principle remains the same:-
    http://www.cisco.com/en/US/customer/products/ps6120/products_configuration_example09186a0080975e83.shtml
    HTH>

  • Add-on page won't open - want to enable and enable flash player

    The Firefox Ad-ons page will not open - it goes into an eternal cycle. I used to open it regularly to enable and disable the flash player - now I can't do this.

    First, if the active category on the left side of the Add-ons page is '''Get Add-ons''', click '''Extensions''' to bypass whatever is loading and go directly to the area likely to have the toolbar. (I think it's loading a page of popular add-ons, which isn't very relevant to what you want to do.) Does that work?
    If that doesn't work, you could try disabling all add-ons first and see whether that makes a difference. You can do this using Firefox's Safe Mode dialog.
    First, I recommend backing up your Firefox settings in case something goes wrong. See [[Backing up your information]]. (You can copy your entire Firefox profile folder somewhere outside of the Mozilla folder.)
    Next, restart Firefox in Firefox's Safe Mode ([[Safe Mode]]) using
    Help > Restart with Add-ons Disabled
    In the Safe Mode dialog, check just the box to "Disable all add-ons" then click Make Changes and Restart. Does this allow you to access the Add-ons page?

  • How do I move files from my iMac to my Airport without getting 'AirPort can not be modified' message. File sharing is enabled and I'm not getting asked for a password. Thanks

    How do I move files from my iMac to my Airport without getting 'AirPort can not be modified' message. File sharing is enabled and I'm not getting asked for a password. Thanks

    What OS are you running.. this is usually only a problem in Mavericks.
    If so I recommend you mount the hard disk manually..
    Use Go, Connect to server.
    Type in the IP address if static.. eg
    AFP://10.0.1.1
    Or the name.. but you will have issues unless the name is short, no spaces and pure alphanumeric.. if you are using bad names.. fix it by a full factory reset in airport utility and give it all names that comply to the above.
    Type in
    AFP://TCname.local Where TCname is replaced with the actual name.
    You will be asked for the password the first time which is public unless you changed it.. please remember to save this in the keychain.
    Copy files then to a new directory you create on the TC.. do not place files inside the TM sparsebundle. Nor directly under the main directory.

  • Can i export a list of all the webpages in my site, enabled and disabled?

    Hey Guys,
    Can i export a list of all the webpages in my site, enabled and disabled?
    I saw you could view all pages in the advanced view - but i am not sure if you can then export that as an excel file.

    hey Liam -
    but ftp doesnt show you what is enabled and disabled.
    also I don't think you can export an excel file from this?
    Pretty much i want this list - in an excel format!

  • How to distinguish between enabled and disabled tasks in SSDT-BI 2012

    Hi,
    I've got SSDT-BI 2012 together with VS2012 installed. Simple questions: What is the difference between enabled and disabled tasks in control flow from the design/color point of view? I do see that the disabled tasks changes to grey (omg are you really kidding
    me????) from black. This could be a bad joke or dream however is not.
    So I'm kindly asking you to help me solve this problem. How can I change the color difference between these two options (enabled task vs disabled task)? I do not care whether the one will be yellow or pink, simply just need to be recognizable at first
    look and not under long and painful examination.
    Thanks for your reply. Hopefully it will be useful.
    Karol.

    Hi Karol,
    It’s true that it only changes the font color of the task name text to grey after disabling a task in SSDT 2012. In SSDT 2010, the whole task control including icon will turn grey after it is disabled; in BIDS, the background color of the task control will
    turn grey after it is disabled. These behaviors are by design. Personally, I agree with you that this behavior in SSDT 2012 is not very readable.
    If you have concerns, I would suggest you submitting a wish at
    https://connect.microsoft.com/sql.
    Connect site is a connection point between you and Microsoft, and ultimately the larger community. Your feedback enables Microsoft to make software and services the best that they can be, and you can learn about and contribute to exciting projects.
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • How I can delete add-in in windows 8.1 ,I see only enable and disable function but I don't see any add-in delete function

    hi,
    how I can delete  add-in applications in add-in applications section ,  I try to delete one but I don't see any delete function, I see only enable and disable function in the manage add-in applications wizard.
    thanks
    johan
    h.david

    Hi,
    If you want to remove the add-ins of Office 2010 programs, you need to remove it from control panel.
    For example, if you use Excel, please try to follow the link to delete the add-ins:
    http://office.microsoft.com/en-us/excel-help/add-or-remove-add-ins-HP010342658.aspx
    If I misunderstand something, please let me know.
    Regards,
    George Zhao
    TechNet Community Support

Maybe you are looking for

  • Report not working in background GRC10 PC

    Hi, We are generating report in background for organization and process structure under master data in process control,but user is not able to see report in inbox. Is any settings we need to do for getting report into user inbox please provide your i

  • Help flashing do not disconnet won't go away and problem with video

    Hi - when I go into the options to set my music download etc, the page for video is grey and will not allow me to select automatic updates. When I drag the video over it says it has been unable to install it. It now also keeps flashing the 'do not di

  • Time stamp dropping seconds

    I figure someone has had this problem before but didn't see it in the forum anywhere.  I'm adding a time stamp to a file so I've used the "Get Time/Date in Seconds" and wired that to a "Convert to DBL".  This then wires both into an indicator on the

  • SQL Report with Scroll - javascript

    This is an example of Apex SQL Report with Scroll - made with javascript: http://tryapexnow.com/apex/f?p=12090:9 Waiting for comments here.

  • R/3 Transaction Iviews vs Imported ABAP Roles on Portal

    Hi, In one of our requirement, Business needs to set up such that client should be able to have web based access to R/3 Transaction through Portal. We can achieve that by creating system in portal and create Transaction iview with required T-code of