Accessing weblogic controls from pojo classes problem

Hi,
I'm planning to use DAO class as a wrapper over the beehive controls , and all of this will be part of the workshop utility project.
When I try using this way the controls never gets instantiated by the container and end up getting NullPointerException.
For this to work do I need to sort the programmatic control invocation ? If yes are there samples available ?
Can you also suggest if this is the right approach?
Are we stuck with using JPF for invoking beehive controls?
Thanks,
Chris

It is possible for some controls. See http://beehive.apache.org/docs/1.0.2/controls/programming.html#Programmatic+Instantiation, which has some sample code.
Greg

Similar Messages

  • Recommended way of getting entity manager from pojo class

    Hi,
    In our application we have the need or retrieving entity manager from 'pojo' classes.
    More specifically we have singleton classes which act as 'data' repositories and are accessed from both servlets and ejb.
    I'm aware that the repositories classes might be problematic, but in the current stage we can't perform significant change in application structure so I am looking for a 'fast' solution as possible.
    The best way will be to lookup entityt manager in JNDI, but as I undestand this feature is not avaialabe in weblogic.
    I understand that the preffered way for getting entity manager in such situation is by using @PersistenceUnit annotion on the calling location and lookup entityManager by that name in the pojo. This is however problematic for us since since we access the repositories from variouse locations (many different classes).
    Possible additional solutions we thought of:
    - creating an 'entity manager factory' locator ejb. This is an ejb with no transaction attribute, which has one method getEntityManagerFactory. It injects entityManagerFactory and returns it. This is the fastest soltion to implement. Is this a valid one?
    - using application managed entity manager in such situations. We have a problem doing so now because the creation seems to fail for variouse reasons.
    What is the recommended way?
    Thanks.

    To obtain an EntityManager instance, first must obtain an EntityManagerFactory instance by injecting it into the application component by means of the javax.persistence.PersistenceUnit annotation:
    @PersistenceUnit
    EntityManagerFactory emf;
    Then, obtain an EntityManager from the EntityManagerFactory instance:
    EntityManager em = emf.createEntityManager();
    http://download.oracle.com/javaee/5/tutorial/doc/bnbqw.html
    Edited by: dvohra16 on Apr 14, 2011 5:06 PM

  • Calling a weblogic control from a MDB in 10.3

    We have a requirment of calling a weblogic control from a MDB. There is a option to call this using Controls.instantiate. However, the secound level controls are not getting called. It means, I have a Facade, DAO and DB controls [Tipically the Design patern implementation]. I am calling the DAO from Facade and the DAO calls DB.
    when i am trying to call a Facade from a MDB using the Controls.instantiate, the facade is getting called but depending controls are not getting called.
    Please suggest how we can approch this. Is there any way to call a control from a MDB using anotations?
    Thanks,

    Hi Srini,
    it supports but you need to upgrade correctly.
    follow this link
    Beehive Applications
    after upgrade if you found some error like classnotfound error.
    If those are the errors you were also experiencing, then please follow one of these options to resolve this issue:OPTION
    1:Identify all the JARs that contain the beehive classes and explicitly add the jar files to the classpathOPTION
    2:When you created the domain (if you used the Config Wizard), do you make it a "Workshop" domain? If not, try that.That should deploy the Workshop framework (Beehive controls, NETUI, etc) libraries as shared libraries. Then these libraries should be referenced in your applications weblogic.xml and weblogic-application.xml.
    regards,
    Kal

  • Accessing a JTextField from another class

    I 've got 2 classes I am trying to get the value of a JTextField that located in a second class see the code
    class1 myClass = new class1();
    String text = myClass.jTextField1.getText();
    System.out.print(text);What happens is when i run the program and enter some text in the jTextFild1 and then click on my Jbutton it does not print anything
    the JButton is in the caller class
    Could anyone explains to me what is wrong

    an example would help maybe....
    if you want to access your jtextfield from another class then:
    import javax.swing.*;
    public class FieldHolderClass {
    public JTextField jtf = null;
    public FieldHolder() {
      JFrame jf = new JFrame();
      jtf = new JTextField();
      jtf.setText("this is the text that is here when other callerclass seeks for text");
      jf.getContentPane().add(jtf);
      jf.setVisible(true);
    public class CallerClass {
    public static void main(String args[]) {
      FieldHolderClass fHolder = new FieldHolderClass();
      System.out.println((fHolder.jtf.getText());
    }of course i have not written any swing app for a long time, so i might have forgotten everything... so, don't flame me when that code does not compile.
    the thing that it's supposed to show, is that you make a <b>public</b> variabel (jtf) and you simply ask for it from another class by typing holderclass instances name dot and that variable name (in this case jtf) and dot and then call the method on that variable (or object...)
    it might also be that you want your code to work the way that when you enter a text into jtextfield, then after pressing enter it would get printed on terminal...
    in that case you should also register some Listeners... i remember that back when i was just getin' to know java then i had problems with it as well... but then again, i didn't read any manuals...
    i hope i was somewhat help...

  • Accessing the ServletContext from a class that is not a Servlet?

    Is there any way of accessing the ServletContext from a class that is not a
              Servlet? The class is being used as part of a Web Application.
              Thanks.
              

    http://www.mozilla.org/mirrors.html
    Mozilla has download mirrors around the globe. If it is on the list, it is trustworthy.

  • Accessing public variables from other classes

    Probably a simple questions, but how can I access a variable from another class. My exact situation is as follows.
    A class called WorldCalender has a variable which is defined: public int hour; (the value is given to it elsewhere).
    I want to access this variable and increase it by one in a subroutine in the class Hour. In this class I have put: WorldCalender.hour++; but it doesn't seem to work. How should I do it?

    don't expose the hour variable at all.
    have a method eg addToHourBy( int hrs )
    Probably a simple questions, but how can I access a
    variable from another class. My exact situation is as
    follows.
    A class called WorldCalender has a variable which is
    defined: public int hour; (the value is given to it
    elsewhere).
    I want to access this variable and increase it by one
    in a subroutine in the class Hour. In this class I
    have put: WorldCalender.hour++; but it doesn't seem to
    work. How should I do it?

  • How to access form objects from different class?

    Hello, I am new to java and i started with netbeans 6 beta,
    when i create java form application from template i get 2 classes one ends with APP and one with VIEW,
    i put for example jTextField1 with the form designer to the form and i can manipulate it's contents easily from within it's class (let's say it is MyAppView).
    Question>
    How can i access jTextField1 value from different class that i created in the same project?
    please help. and sorry for such newbie question.
    Thanks Mike

    hmm now it says
    non static variable jTree1 can not be referenced from static context
    My code in ClasWithFormObjects is
    public static void setTreeModel (DefaultMutableTreeNode treemodel){
    jTree1.setModel(new DefaultTreeModel(treemodel));
    and in Class2 it is
    ClasWithFormObjects.setTreeModel(model);

  • Proplem: Access HTMLB controls from java code

    Hi,
    I am new to iView development for EP6. So my problem should be easy to solve (for you ).
    I created in the NW Dev Studio a JSP DynPage.
    The following files were created or edited:
    1.     JSP file (created)
    2.     java file (created)
    3.     portalapp.xml (edited)
    In order to make the page running (proccessing) I changed the following things:
    1.     JSP file – Add taglib reference to HTMLB-class
    2.     portalapp.xml – Remove the „native“ property so the JSP file will not be accessed directly.
    Now I want to do the following:
    On the JSP page I placed severeal HTMLB controls (textViews).
    From the java code I try to access these controls in the „doProcessBeforeOutput“ method and change/set values.
    But I get all the time a null-Exception.
    Code (JSP)
    <%-- mcmsprovider.jsp --%>
    <%@ taglib uri= "tagLib" prefix="hbj" %>
    <hbj:content id="cntMcmsProvider" >
      <hbj:page title="MCMS Provider Dynpage">
       <hbj:form id="frmMcmsProvider" >
                 <hbj:textView id="tvwScript" encode="false"></hbj:textView>
                 <hbj:textView id="tvwStyle" encode="false"></hbj:textView>
       </hbj:form>
      </hbj:page>
    </hbj:content>
    Code (JAVA):
    public void doProcessBeforeOutput() throws PageException {
           this.setJspName("mcmsprovider.jsp");
           TextView tvw = (TextView) this.getComponentByName("tvwStyle");
           tvw.setText("Here the dynamic text");
    I also tried to add raw text to the form but also null excpetion:
    public void doProcessBeforeOutput() throws PageException {
           this.setJspName("mcmsprovider.jsp");
           Form frmCurrent = (Form) this.getForm();
           frmCurrent.addRawText("<h3>This comes from here</h3>");
    My goal is to dynamically add controls to the form, but until now I think it will be a dream:
    public void doProcessBeforeOutput() throws PageException {
           this.setJspName("mcmsprovider.jsp");
      Form form = (Form)this.getForm();
           TextView tvw  = new TextView("tvwDynamic");
           tvw.setText("Here the dynamic control");
           form.addComponent(tvw);
    The normal page processing runs:
    public void doProcessBeforeOutput() throws PageException {
           this.setJspName("mcmsprovider.jsp");
    Any help is greatly appreciated.

    Eike
    Here is the example straight from the PDK documentation. This should help you a little
    UsingAbstractPortalComponentWithHTMLB.java
    import com.sapportals.htmlb.*;
    import com.sapportals.htmlb.enum.DataType;
    import com.sapportals.htmlb.enum.GroupDesign;
    import com.sapportals.htmlb.event.Event;
    import com.sapportals.htmlb.rendering.IPageContext;
    import com.sapportals.htmlb.rendering.PageContextFactory;
    import com.sapportals.portal.prt.component.AbstractPortalComponent;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    import com.sapportals.portal.prt.component.IPortalComponentResponse;
    public class UsingAbstractPortalComponentWithHTMLB extends AbstractPortalComponent {
        //Fill in your output for "normal" content creation mode here
        protected void doContent(IPortalComponentRequest request, IPortalComponentResponse response) {
            IPageContext myContext = PageContextFactory.createPageContext(request, response);
            if (myContext == null) {
                System.out.println("htmlb service did not start up as expected.");
            Form myForm = myContext.createFormDocument("First Experiment");
            Event lastEvent = myContext.getCurrentEvent();
            Group myGroup = new Group();
            myGroup.setWidth("350");
            myGroup.setTitle("First Experiment");
            myGroup.setDesign(GroupDesign.SAPCOLOR);
            myForm.addComponent(myGroup);
            GridLayout gl = new GridLayout();
            myGroup.addComponent(gl);
            if ((lastEvent != null) && (lastEvent.getComponentName().equals("submit"))) {
                String name = myContext.getDataForComponentId("USER_NAME").toString();
                TextView label = new TextView("Hi, " + name);
                gl.addComponent(1, 1, label);
                Button myButton = new Button("goback", "Go back");
                myButton.setOnClick("goBack"); // ignored anyway
                gl.addComponent(2, 1, myButton);
            } else {
                TextView label = new TextView("What's your name?");
                gl.addComponent(1, 1, label);
                InputField inf = new InputField("USER_NAME");
                inf.setType(DataType.STRING);
                gl.addComponent(1, 2, inf);
                Button myButton = new Button("submit", "Tell");
                myButton.setOnClick("submit");
                gl.addComponent(2, 2, myButton);
            myContext.render();

  • Accessing WebLogic EJBs from Tomcat 3.2

    Has anyone out there tried to access EJBs in a WebLogic 5.10 SP6 app
    server from a servlet in Tomcat 3.2? I'm operating under Win2K. When I
    try to create the initial naming context, the following exception is
    thrown:
    java.lang.NoClassDefFoundError: COM/rsa/jsafe/JSAFE_InvalidUseException
    at weblogic.security.WLMessageDigest.getInstance
    (WLMessageDigest.java:52)
    at weblogic.security.MD5RandomBitsSource.seed
    (MD5RandomBitsSource.java:56)
    at weblogic.rjvm.LocalRJVM.<init>(LocalRJVM.java:108)
    at weblogic.rjvm.LocalRJVM.getLocalRJVM(LocalRJVM.java:85)
    at weblogic.rjvm.RJVMManager.getLocalRJVM(RJVMManager.java:89)
    at weblogic.rjvm.RJVMManager.initialize(RJVMManager.java:78)
    at weblogic.kernel.Kernel.ensureInitialized(Kernel.java:137)
    at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:182)
    at
    weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(
    WLInitialContextFactoryDelegate.java, Compiled Code)
    at
    weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(
    WLInitialContextFactoryDelegate.java:148)
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(
    WLInitialContextFactory.java:123)
    at javax.naming.spi.NamingManager.getInitialContext(
    NamingManager.java:771)
    at javax.naming.InitialContext.getDefaultInitCtx(
    InitialContext.java:169)
    at javax.naming.InitialContext.<init>(InitialContext.java:146)
    From poking around in the WebLogic server directories, in appears that
    the RSA-related classes are implemented as native methods in jsafe.dll.
    Should I be trying to install this dll in Tomcat somehow? If so, where
    should I be looking for information on how to do this?
    -- Erik

    "Erik Horstkotte" <[email protected]> wrote in message news:[email protected]...
    Has anyone out there tried to access EJBs in a WebLogic 5.10 SP6 app
    server from a servlet in Tomcat 3.2? I'm operating under Win2K. When I
    try to create the initial naming context, the following exception is
    thrown:[Sigh. I know it's bad form to follow up your own posts, but...]
    Ignore the exact problem description above. I wasn't including
    \weblogic\classes and \weblogic\lib\weblogicaux.jar in Tomcat's
    classpath. Now the same code connects to the app server:
    Connected successfully using http to JIMBO/172.16.1.4:7001
    But immediately after connecting, I get a new exception:
    java.lang.NoSuchMethodError: java.lang.NoSuchMethodException:
    getNameInNamespace
    at weblogic.jndi.toolkit.BasicWLContext_WLStub.ensureInitialized
    (BasicWLContext_WLStub.java:127)
    at weblogic.jndi.toolkit.BasicWLContext_WLStub.<init>
    (BasicWLContext_WLStub.java:146)
    at java.lang.reflect.Constructor.newInstance(Native Method)
    at weblogic.common.internal.ClassTableEntry.newInstance
    (ClassTableEntry.java:86)
    at weblogic.common.internal.WLObjectInputStreamBase.readLeftover
    (WLObjectInputStreamBase.java:248)
    at weblogic.common.internal.WLObjectInputStreamBase
    .readObjectBody (WLObjectInputStreamBase.java:202)
    at weblogic.common.internal.WLObjectInputStreamBase.readObject
    (WLObjectInputStreamBase.java:949)
    at weblogic.common.internal.WLObjectInputStreamBase.readObjectWL
    (WLObjectInputStreamBase.java:308)
    at weblogic.jndi.toolkit.WLContextStub.readExternal
    (WLContextStub.java:79)
    at weblogic.common.internal.WLObjectInputStreamBase
    .readPublicSerializable(WLObjectInputStreamBase.java:269)
    at weblogic.common.internal.WLObjectInputStreamBase.readLeftover
    (WLObjectInputStreamBase.java:254)
    at weblogic.common.internal.WLObjectInputStreamBase.readObjectBody
    (WLObjectInputStreamBase.java:202)
    at weblogic.common.internal.WLObjectInputStreamBase.readObject
    (WLObjectInputStreamBase.java:949)
    at weblogic.common.internal.WLObjectInputStreamBase.readObjectWL
    (WLObjectInputStreamBase.java:308)
    at weblogic.rmi.extensions.AbstractInputStream2.readObject
    (AbstractInputStream2.java:25)
    at weblogic.jndi.internal.RemoteContextFactoryImpl_WLStub
    .getContext(RemoteContextFactoryImpl_WLStub.java:99)
    at weblogic.jndi.WLInitialContextFactoryDelegate
    .newRemoteContext(WLInitialContextFactoryDelegate.java:316)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newContext
    (WLInitialContextFactoryDelegate.java:242)
    at weblogic.jndi.WLInitialContextFactoryDelegate
    .getInitialContext(WLInitialContextFactoryDelegate.java, Compiled
    Code)
    at weblogic.jndi.WLInitialContextFactoryDelegate
    .getInitialContext(WLInitialContextFactoryDelegate.java:148)
    at weblogic.jndi.WLInitialContextFactory.getInitialContext
    (WLInitialContextFactory.java:123)
    at javax.naming.spi.NamingManager.getInitialContext
    (NamingManager.java:771)
    at javax.naming.InitialContext.getDefaultInitCtx
    (InitialContext.java:169)
    at javax.naming.InitialContext.<init>(InitialContext.java:146)
    getNameInNamespace isn't a method in any of my EJB's (that I wrote, at
    least - it could be generated by weblogic.ejbc), and it's not a method
    I'm calling directly. Presumably, something in the remote session bean
    creation is calling this method (of what class?)
    Am still I missing classpath entries in Tomcat? If so, which ones?
    If you've successfully referenced EJBs in a WebLogic Server from a
    Tomcat servlet, what setup changes did you have to make to Tomcat and
    WLS to make it fly?
    -- Erik

  • How to create a af:selectManyCheckBox from Pojo Class DataControls?

    Hi All,
    I haven't worked on POJO based datacontrols till now. Can anyone give me a pointer where it is explained to create a <af:selectManyCheckBox> component using these datacontrols?

    Hi User404/Suipto,
    Thanks for that pointer. I created the select many check-box and did various things on it using Binding contexts in managed beans. But i have a question: -
    For now i am creating my List Values based on a POJO that has only 2 data members. It means from the class of which i have created data controls i am returning my L.O.V as a List Of object of a different class that has only 2 data members, but i am getting absurd behavior when i add some more data members. In that case my pageDef file contains Items in AttrNames tag only to be the that i have chosen to be displayed. So when i add odr fields also in AttRNames than my select many check Box displays combination of all the Items in AttrNames.
    But i dont want this. So i added odr fields in ListDisplayAttrNames. But this is not working as ListDisplayAttrNames api is not in use. So i cannot figure out when i have my LOV objects' data members number more than 2 then in what way should the binding be performed?
    Any HELP*
    Edited by: Avi on Nov 27, 2012 9:40 AM

  • Access oracle database from different classes in desktop / standalone app.

    I am a bit confused as to what way to go. I am building a desktop application that needs to access an oracle database. I have done this in the past using code similar to the following:
            try {             DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());             Connection conn = DriverManager.getConnection(                     "jdbc:oracle:thin:@111.111.111.111:oracledb",                     "username", "password" );             // Create a Statement             Statement stmt = conn.createStatement();             ResultSet rs = stmt.executeQuery(                     "select ... from ...");             while (rs.next()) {                 ReportNumberCombo.addItem(rs.getString(1));             } // end of rs while             conn.close();         } //  end of try         catch( Exception e ) {             e.printStackTrace();         }
    The problem I would like to resolve is that I have this code all over the place in my application. I would like to have it in one objects method that i can call from other classes. I can't easily see how to do this, or maybe at this point I'm just too confused.
    I want to be able to change this connection info from a properties file which I have already done, not sure if this bit of information would change the answer to my question. I was also looking at the DataSource api, this looks like it is close to what I should use, what are your thoughts?
    I would also like to if JNDI is only for web applications or would be appropriate for a desktop app.
    Thank you for your help, I realize this is all over the place but I really need these topics cleared up!

    I have tried exactly that and am getting an error which let me to believe it couldn't be done that way. Here is my code and error message:
    public class readPropsFile {
        String getURL() throws IOException {
            // default values for properties file
            String Family = "Family:jdbc" + ":oracle:" + "thin:@";
            String Server = "Server:111.111.111.111";
            String Port = "Port:1521";
            String Host = "Host:oradb";
            String Username = "Username:username";
            String Password = "Password:password";
            try {          
                new BufferedReader(new FileReader("C:\\data\\Properties.txt"));
            } catch (FileNotFoundException filenotfound) {
                System.out.println("Error: " + filenotfound.getMessage());
                // displays to console if file DOES NOT exist
                System.out.println("The file DOES NOT exist, now creating...");
                FileWriter fileObject = null;
                fileObject = new FileWriter("c:\\data\\Properties.txt");
                BufferedWriter out = new BufferedWriter(fileObject);
                // writes to output as simple text.
                out.write(Family);
                out.newLine();
                out.write(Server);
                out.newLine();
                out.write(Port);
                out.newLine();
                out.write(Host);
                out.newLine();
                out.write(Username);
                out.newLine();
                out.write(Password);
                out.newLine();
                out.close();
            // displays to console if file exists
            System.out.println("The file exists, or was created sucessfully");
    //      creates the properties object, assigns text file.
            Properties props = new Properties();
            FileInputStream in = new FileInputStream("c:\\data\\Properties.txt");
            props.load(in);
            Family = props.getProperty("Family");
            Server = props.getProperty("Server");
            Port = props.getProperty("Port");
            Host = props.getProperty("Host");
            Username = props.getProperty("Username");
            Password = props.getProperty("Password");
    //      prints properties to a file for troubleshooting
            PrintStream s = new PrintStream("c:\\data\\list.txt");
            props.list(s);
            in.close();
            String URL = "\"" + Family + Server + ":" + Port + ":" + Host + "\"" +
                    "," + "\"" + Username + "\"" + "," + "\"" + Password + "\"";
            System.out.println("This is the URL:" + URL);
            return URL;
    }And here is where I try to call the method:
    public class connWithProps1 {
        public static void main(String[] args) {
            readPropsFile callProps = new readPropsFile();
            try {
                callProps.getURL();
                String url = callProps.getURL(); // not needed
                System.out.println("The URL (in connWithProps1) is: " + csoProps.getURL());
                DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
                Connection conn = DriverManager.getConnection(url);
                // Create a Statement
                Statement stmt = conn.createStatement();
                ResultSet rs = stmt.executeQuery("select .... WHERE ....'");
                while (rs.next()) {
                    System.out.println(rs.getString(1));
                } // end of rs while
                conn.close();
            } catch (SQLException sqle) {
                Logger.getLogger(connWithProps1.class.getName()).log(Level.SEVERE, null, sqle);
            } catch (IOException ioe) {
                Logger.getLogger(connWithProps1.class.getName()).log(Level.SEVERE, null, ioe);
    }The error I get is:
    SEVERE: null
    java.sql.SQLException: Listener refused the connection with the following error:
    ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
    The Connection descriptor used by the client was:
    111.111.111.111:1521:oradb","username","password"
            at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
            at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)
            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)
            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:460)
            at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:411)
            at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:490)
            at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:202)
            at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:33)
            at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:474)
    {code}
    Although the URL prints out correctly and when I tried plugging in the URL manually, it works just fine. One other thing I noticed was the line "The file exists, or was created sucessfully" is output 3 times.
    I will go back and change my code to properly close the resultset, thanks for catching that. Id rather use what I have instead of JNDI unless it's nesessary.
    Edited by: shadow_coder on Jun 19, 2009 2:16 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Can't access weblogic server from internet but can from intranet

    Hopefully this isn't the wrong place to post but I've searched through many many
    newsgroups to figure out where to post this but can't find a specific enough one.
    I've recently run into a problem with my weblogic server in that it can not be
    accessed from the internet now. This was all working several weeks ago, when
    I had the wl server listening for SSL communications on port 7002. I could access
    the server from both within our corporate intranet (kind of) as well as access
    it from the internet. I say kind of for the intranet in that when I chose to
    setup SSL on the the wl server, I couldn't get port 7002 to communicate through
    our proxy server. After a little research I determined that it would be best
    to communicate on the default SSL port of 443. After switching to 443, I didn't
    need to bypass the proxy any longer, when accessing from within intranet, but
    now couldn't access the server from the internet. The wl server is behind a firewall,
    but I had the network administrators open up port 443 on the firewall. They ran
    a network sniffer and determined that the wl server is sending a TCP FIN packet
    immediately following the last ACK packet in a TCP session establishment. I don't
    really understand what that all means, but it seems really strange that everything
    works great when inside the intranet and I don't get any TCP FIN packets sent
    from the server, but when you try to communcate through the firewall you do.
    Does anyone have any insight into this issue? something else I could look at.
    The network administrators are basically saying it's the webserver that needs
    configuration (even though it worked great in the past when listening on port
    7002 instead of 443). PLEASE HELP!!!

    Got it.  This thread helped!
    Thanks!
    https://discussions.apple.com/thread/3193444?tstart=60

  • Accessing MXML ArrayCollection from ActionScript class?

    I have an MXML file that has an arraycollection for my Tree
    component. I am overriding the updateDisplayList function in order
    to add lines to all of my nodes in the Tree.. however I can't seem
    to figure out how to access that ArrayCollection from inside the
    actionscript class?
    I have tried the methods used to pass variables between two
    MXML files (like a popup window - which I have used in the past and
    it works great).
    My actionscript class code is almost identical to this
    example here:
    http://www.iepl.net/treeControlSample/treeControlSample.html
    In the above example the data is static, but my data is going
    to change sometimes and I need access to the entire dataProvider
    (ArrayCollection) in order to make the lines work right.. this has
    been very frustrating for me! :)
    if anyone knows of a better way to achieve gettign lines to
    the siblings in a Tree.. please let me know!
    Any help would be super duper awesome!

    I have found the solution to this. My problem was similar to
    the one cheftimo was having in this post:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60&catid=585&threadid =1367784&enterthread=y
    The answer is to import mx.core.Application into the
    component you are trying to access the variable from and then call
    it by using 'Application.application.<var name>'
    Thanks to Greg Lafrance!

  • Calling method from another class problem

    hi,
    i am having problem with my code. When i call the method from the other class, it does not function correctly?
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class Dice extends JComponent
        private static final int SPOT_DIAM = 9; 
        private int faceValue;   
        public Dice()
            setPreferredSize(new Dimension(60,60));
            roll(); 
        public int roll()
            int val = (int)(6*Math.random() + 1);  
            setValue(val);
            return val;
        public int getValue()
            return faceValue;
        public void setValue(int spots)
            faceValue = spots;
            repaint();   
        @Override public void paintComponent(Graphics g) {
            int w = getWidth(); 
            int h = getHeight();
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
            g2.setColor(Color.WHITE);
            g2.fillRect(0, 0, w, h);
            g2.setColor(Color.BLACK);
            g2.drawRect(0, 0, w-1, h-1); 
            switch (faceValue)
                case 1:
                    drawSpot(g2, w/2, h/2);
                    break;
                case 3:
                    drawSpot(g2, w/2, h/2);
                case 2:
                    drawSpot(g2, w/4, h/4);
                    drawSpot(g2, 3*w/4, 3*h/4);
                    break;
                case 5:
                    drawSpot(g2, w/2, h/2);
                case 4:
                    drawSpot(g2, w/4, h/4);
                    drawSpot(g2, 3*w/4, 3*h/4);
                    drawSpot(g2, 3*w/4, h/4);
                    drawSpot(g2, w/4, 3*h/4);
                    break;
                case 6:
                    drawSpot(g2, w/4, h/4);
                    drawSpot(g2, 3*w/4, 3*h/4);
                    drawSpot(g2, 3*w/4, h/4);
                    drawSpot(g2, w/4, 3*h/4);
                    drawSpot(g2, w/4, h/2);
                    drawSpot(g2, 3*w/4, h/2);
                    break;
        private void drawSpot(Graphics2D g2, int x, int y)
            g2.fillOval(x-SPOT_DIAM/2, y-SPOT_DIAM/2, SPOT_DIAM, SPOT_DIAM);
    }in another class A (the main class where i run everything) i created a new instance of dice and added it onto a JPanel.Also a JButton is created called roll, which i added a actionListener.........rollButton.addActionListener(B); (B is instance of class B)
    In Class B in implements actionlistener and when the roll button is clicked it should call "roll()" from Dice class
    Dice d = new Dice();
    d.roll();
    it works but it does not repaint the graphics for the dice? the roll method will get a random number but then it will call the method to repaint()???
    Edited by: AceOfSpades on Mar 5, 2008 2:41 PM
    Edited by: AceOfSpades on Mar 5, 2008 2:42 PM

    One way:
    class Flintstone
        private String name;
        public Flintstone(String name)
            this.name = name;
        public String toString()
            return name;
        public static void useFlintstoneWithReference(Flintstone fu2)
            System.out.println(fu2);
        public static void useFlintstoneWithOutReference()
            Flintstone barney = new Flintstone("Barney");
            System.out.println(barney);
        public static void main(String[] args)
            Flintstone fred = new Flintstone("Fred");
            useFlintstoneWithReference(fred); // fred's the reference I"m passing to the method
            useFlintstoneWithOutReference();
    {code}
    can also be done with action listener
    {code}    private class MyActionListener implements ActionListener
            private Flintstone flintstone;
            public MyActionListener(Flintstone flintstone)
                this.flintstone = flintstone;
            public void actionPerformed(ActionEvent arg0)
                //do whatever using flinstone
                System.out.println(flintstone);
        }{code}
    Edited by: Encephalopathic on Mar 5, 2008 3:06 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Data Control from Java Class

    Using JDev 11gPS4
    I have a java class that i want to use as a DC:
    (simplified)
    public class AccountDC {
        public AccountDC() {
            super();
        public void insertAccount(Account account){
            //Do some things
    }Account:
    public class Account {
        private String name,alias;
        public Account() {
            super();
        public void setName(String name) {
            this.name = name;
        public String getName() {
            return name;
        public void setAlias(String alias) {
            this.alias = alias;
        public String getAlias() {
            return alias;
    }When I create the data control from the first class, i get the insertAccount operation.
    When i drop the account parameter on my JSPX page, JDev suggest an ADF Form which is fine.
    When I drop the insertAccount method below the form, JDev suggest an ADF Button which is also fine.
    JDeveloper doesn't seem to know that the values provided in the above form should be mapped to an Account object for the insertAccount.
    How should I do this?
    In the bindings I do have the individual attributeValues for each attribute but I don't seem to have a reference to an Account object. Do i need to add something to my DC?
    Another question... Is it maybe better to create a VO with only transient attributes and an Application Module where i expose my own custom createInsert method?
    It's all custom code. It does not write anything to a database.

    You should have an object that represent your method's parameter in your data control - if you'll drag it into your page you'll get the fields needed.
    Similar to the way it is done in this example:
    http://blogs.oracle.com/shay/entry/updateinsert_with_adf_web_serv

Maybe you are looking for

  • Bought a mac mini and it's the wrong machine for my needs

    HI all I bought the solid state drive mini mac - stupidly didn't realise that it had such low storage - then I made my biggest mistake - I left it in the box for 2 months over xmas as I wanted plenty of time to make the transition from my old mac pro

  • Help ~~ Cannot compile servlet program

    I have recently written a servlet program. When I compile the program (let's say "HelloWorld.java"), I've got the following error message: package javax.servlet does not exist I've download the class files and set the classpath already. Have I missed

  • Customizing OI to add step progress bar

    Hello custom RTOI experts!  I am attempting to make a customization to the full-featured LabVIEW RTOI (for TestStand 3.0) in order to provide the seemingly simple feature of a step completion progress bar on the execution page of the tab control.  Le

  • Getting Older Flash Player Reinstalled

    I need to get Adobe 11.7 reinstalled. I've had nothing but problems with Chrome-based Pepper Flash Player. I installed your other 11.8 version and am having problems with it as well. Please advise as to how I can get the 11.7 version back.

  • Alternative to roadmovie for converting avi files to ipod format.

    Hey all, I am currently using roadmovie to convert my avi files to the ipod format. I like it, because it can do batch converts. Unfortunately, when I put some files to be converted, it always crashes after the first one. I was wondering if anyone kn