Interfaces in Java Beans

Can anyone provide a clear picture in dealing with interfaces used in EJB.
It can be confined to the use of only stateless session beans.
Some links where I acn see some articles will also be very helpful.
Thanks in Advance!!!

In EJBs, there are two types of interfaces, Remote interfaces and Home/Local Interfaces.
Try to read the following articles,
http://www.onjava.com/pub/a/onjava/2004/11/03/localremote.html

Similar Messages

  • Changing Java class into Java Bean

    Can anybody tell me how to change a Java class into simple Java Bean.I dont need any visual interface of Java Bean.I simply want to turn my Java class into Java Bean.

    You can use almost any class as a java bean.
    To be a bean it must
    1 - Have a constructor which takes no arguments (so it can be instantiated)
    2 - For properties/attributes which you want to have readable/writable, provide get / set methods of the appropriate type.
    Thats it.

  • Changing Java class in to Java Bean

    Can somebody tell me how to change a normal Java class into Java Bean.I dont need any visual interface in Java Bean.I simple need to turn my Java class into Java Bean.

    Hi,
    Chanchal,
    you didn't specify anything abt ur java class. In a java bean basically you use getter and setter methods to call. import relevant packages and extend them into your class. If u give sufficient info, then i can help you out.
    Durga

  • How can I interface a Java application which is not running under NetDynamics, to use the EJBs in a NetDynamics application?

    One of them uses Enterprise Java Beans implemented with a SUN NetDynamics application server. The other is a straight Java application. Ideally I want the second application to remotely invoke methods on the existing Java beans, so the existing business logic will not be duplicated.
    This would seem to be simple, but NetDynamics appears to substitute some proprietary code for part of the EJB interface, and it is not immediately obvious how to let "foreign" java programs access the beans.
    I would appreciate it if anyone is able to provide any information on how to achieve this. If you know of any sample code that I could look at, that would be a help too. This may (or may not) be known to SUN as a "stand alone java client".

    hi,
    can someone help me how to implement logging for method entry parameters and
    method exit return value.
    can someone help me how to use log4j and integrate it to the method entry
    logging and method exit logging.
    Here what i need is without writing the log statements for the method entry and
    method exit i need to log it to the file
    along with other log4j debug statements i provide in the file.I should be able
    to configure whether to enable/disable the logging
    for method entry and method exit. In method entry i should be able to log the
    parameters the method take and in method exit
    i should be able to log te return value to the log file, before the method is
    returned to the callee.
    i hope i am clear
    Thanks in advance.

  • WDVisibility type paramter in Java Bean(Web Dynpro DC in CE 7.1)

    Hi All,
    I need to set a WDVisibility type paramter in a java bean and i am able to do so.It imports com.sap.tc.webdynpro.progmodel.api.WDVisibility class .
    The problem is when i am creating a Java Bean model  it is not allowing me to select the Java bean class it gives an error message" Invalid Class : No class files found for JavaBean : com/sap/tc/webdynpro/progmodel/api/WDVisibility".
    The java Bean class exists in Web Dynpro DC>src folder.
    Any Pointers?
    Regards
    Avinash

    Hi Ondrej ,
    Refer the above links to convert the component of the first dc as a public part.
    Then declare the methods which are written in the component controller of the first DC in the interface controller with the same signature.( When method is called automatically component controller method is called)
    In second dc in component controller properties tab add the reference of the first dc.
    Then access the method in second dc as
    wdthis.wdget<UsedComponent name>Interface.methodname();
    Thanks & Regards,
    Ardhendu

  • Context mapping vs. Java beans

    Hi,
    I'm making a "Server" Component (Java Web Dynpro) that exposes a view to other "Client" Components (other Java Web DynPros). The Clients can insert the exposed view into their views to use the Server's services.
    The Server, obviously, has to be initialized with specific data from the Client.
    At first I thought of creating a context node in the Server, structured with all the attributes needed for its configuration, and then expose that node in the interface. In this way the Client creates a local copy of that node via node mapping and then populates its attributes with values. Once the client populates it in its wdDoInit() method, the embedded view's wdDoInit() method is called and the Server's View can initialize itself.
    Now, instead, I was considering using Java Beans (a class that wraps all the data that I've currently put in the context) because:
    1- The Client should not be able to alter the Server's configuration once it has been initialized. With context mapping the Client can alter at runtime the configuration node's content.
    2- The Server configuration has to be shared between multiple Server's views. When passing a configuration NodeElement as argument to methods shared between views, I've always the problem that I have to deal with the type of the NodeElement (the public interface of the component controller, the private interfaces of the views).
    What is the right way to do things in this scenario?
    Thanks to anyone who drops an answer,
    See you,
    Pietro
    PS. If it's unclear, let me know!

    You can implement some inteface at server,
    declare usage of this interface at client.
    then,
    you can initalise server component by getting that interface from server component,
    and calling methods with desired objects as arguments.
    other methods of this interface can be used to return server's configuration,
    so it will be shared.

  • Crystal Reports data connection using Java beans

    Hi
    My name is Bach Ong, i'm currently perform re-configuring Crystal reports 2008 to connect via
    Java bean to Jboss server, this uses look up service on JBoss server. The connection is using Connect
    look up using the properties:
    java.naming.provider.url=jnp://emgsydapp121:10499
    java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
    java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
    for file CRConfig.xml i put as follows:
    <JDBCURL></JDBCURL>
    <JDBCClassName></JDBCClassName>
    <JDBCUserName></JDBCUserName>
    <JNDIURL>jnp://emgsydapp121:10499</JNDIURL>
    <JNDIConnectionFactory>org.jnp.interfaces.NamingContextFactor
    y</JNDIConnectionFactory>
    <JNDIInitContext>/</JNDIInitContext>
    <JNDIUserName></JNDIUserName>
    Can you advise us if this step is correct, and is there any
    documentation that can guide us to right direction.
    for Java testing in Eclipse using remote call class it is working suing the following code:
            Properties p = new Properties();
            p.put(Context.INITIAL_CONTEXT_FACTORY,
            "org.jnp.interfaces.NamingContextFactory");
            p.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");
            p.put(Context.PROVIDER_URL, "jnp://emgsydapp121:10499");
             InitialContext ctx = new InitialContext(p);
      Date asAtDate = CrystalUtils.convertToDate("2014-01-01", CrystalUtils.relativeToToday(0), false);
         String asxCode = "BHP";
         ClosingPricesReportRequest criteria = new ClosingPricesReportRequest(asAtDate, asxCode);
         InitialContext context = new InitialContext(p);
         ClosingPricesReportService ejb = (ClosingPricesReportService) context.lookup(ClosingPricesReportService.REMOTE_JNDI);
         ClosingPricesReport report = ejb.createMTMClosingPriceReport(criteria);
         System.out.println(report.getClosingPrices()[0].getClosingPrice());
         testval = report.getClosingPrices()[0].getClosingPrice().toString();
         System.out.println(testval);
    when i run the tes code the results as follow:
    10:49:45,244 DEBUG [SecurityAssociation ] Using ThreadLocal: false
    10:49:45,338 DEBUG [MicroSocketClientInvoker ] SocketClientInvoker[709446e4, socket://emgsydapp121:10473] constructed
    10:49:45,338 DEBUG [MicroRemoteClientInvoker ] SocketClientInvoker[709446e4, socket://emgsydapp121:10473] connecting
    10:49:45,338 DEBUG [MicroSocketClientInvoker ] Creating semaphore with size 50
    10:49:45,338 DEBUG [MicroRemoteClientInvoker ] SocketClientInvoker[709446e4, socket://emgsydapp121:10473] connected
    10:49:45,369 DEBUG [ClientSocketWrapper ] reset timeout: 0
    10:49:45,650 DEBUG [InvokerRegistry ] removed SocketClientInvoker[709446e4, socket://emgsydapp121:10473] from registry
    10:49:45,650 DEBUG [MicroSocketClientInvoker ] SocketClientInvoker[709446e4, socket://emgsydapp121:10473] disconnecting ...
    10:49:45,650 DEBUG [SocketWrapper ] ClientSocketWrapper[Socket[addr=/10.137.2.40,port=10473,localport=64150].2cba5bdb] closing
    37.99000000000000198951966012828052043914794921875
    37.99000000000000198951966012828052043914794921875
    Can anyone assist me in convert the above settings to get access by Crystal reports.
    My attemp current are below:
    public class CFDClosingPricesRpt extends CrystalReport {    
        //Constructor
        public CFDClosingPricesRpt(){
            super(ClosingPriceBean.INSTANCE);
         * Returns the ResultSet for this report to Crystal.
         * @param asxCode
         * @param asAtDateString
         * @return
    public ResultSet getNewReport(String asxCode, String asAtDateString) {                     
         try {
             Properties p = new Properties();
             p.put(Context.INITIAL_CONTEXT_FACTORY,
             "org.jnp.interfaces.NamingContextFactory");
             p.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");
             p.put(Context.PROVIDER_URL, "jnp://emgsydapp121:10499");
             //InitialContext ctx = new InitialContext(p);
             clearCachedReportBeans();     
       Date asAtDate = CrystalUtils.convertToDate("2013-01-01", CrystalUtils.relativeToToday(0), false);
          asxCode = "BHP";
          ClosingPricesReportRequest criteria = new ClosingPricesReportRequest(asAtDate, asxCode);
          //ClosingPricesReportService ejb = (ClosingPricesReportService) ctx.lookup(ClosingPricesReportService.REMOTE_JNDI);
          ClosingPricesReportService ejb = (ClosingPricesReportService) ServiceLocator.getInstance().getService(ClosingPricesReportService.REMOTE_JNDI);           
          ClosingPricesReport report = ejb.createClosingPriceReport(criteria);
          // assemble Crystal-friendly DTO
          Collection closingPrices = Arrays.asList(report.getClosingPrices());
          for (Iterator iter = closingPrices.iterator(); iter.hasNext();) {
                    MBLXClosingPrice cp = (MBLXClosingPrice) iter.next();               
                    if (cp==null) continue;               
                    addReportBean(new ClosingPriceBean( report.getSuppliedDate(),
                                cp.getClosingPrice(),
                                cp.getAsxCode()));
      } catch (Throwable x) {     
          saveErrorMessage(x);
      return getAsResultSet();             
    Thanks
    Bach Ong

    Hi Don Thanks for the reply.
    I've was able to connect via Java beans and JNDI. But this one is going the JNDI of JBoss sever, which the JNDI already configure and working for Crystal reports v10.
    Bach

  • Hi, I have quick question about use of USEBEAN tag in SP2. When I specify a scope of SESSION for the java bean, it does not keep the values that I set for variable in the bean persistent.Thanks,Sonny

     

    Make sure that your bean is implementing the serializable interface and that
    you are accessing the bean from the session with the same name.
    Bryan
    "Sandeep Suri" <[email protected]> wrote in message
    news:[email protected]..
    Hi, I have quick question about use of USEBEAN tag in SP2. When I
    specify a scope of SESSION for the java bean, it does not keep the
    values that I set for variable in the bean persistent.Thanks,Sonny
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • Need advice about web services and Java beans

    Hi
    I am very new to web services and to Java beans as well.
    I am trying to understand if and how a web service can use functionality I have in a Java bean. I couldn't find any documentation I can use.
    For example:
    InitialContext ic = new InitialContext();
    Adder adder = (Adder) ic.lookup("ejb/AdderJNDI");In a EJB client project (I'm working with Eclipse) if I add the EJB project to the build path, the Adder interface is recognized.
    Theoritacally I thought I can do the same in a web service server project, but the Adder interface is not recognized.
    Is there something I can read to understand how I need to use the EJB or implement the web service?
    Many thanks
    Sigal

    Okay....I think I made some errors with the original scenario:
    It basically comes down to this....I think. OCS Calendar has a set of Java classes and methods that provide an abstraction for their web services interface. I know how to create something to use these classes using an IDE like JDeveloper, but I'm not sure how that would work with HTML DB.
    I've noticed that the SQL Workshop has a place for Java sources and classes, and I've heard mentions of PL/SQL wrapping. Is there a way to import classes into an HTML DB workspace, wrap 'em up, and access them via PL/SQL?
    Thanks again,
    Jonathan

  • Using java.beans.EventHandler to create javafx.event.EventHandler instances

    One thing I do not like about the JavaFX EventHandler is all the anonymous classes that need to be created. This messes up the way the code looks and I heard that creating all these anonymous classes adds to the total number of classes that get loaded.
    In searching for a way around this I found java.beans.EventHandler's create method. This method (there are a few variations of it) its suppose to provide a one liner to create anonymous implementations of listener interfaces (like JavaFX's EventHandler). So I decided to try it out against some of the sample JavaFX code that is out there.
    I used.... http://docs.oracle.com/javafx/2.0/events/KeyboardExample.java.htm... as my test code.
    I replaced...
            private void installEventHandler(final Node keyNode) {
                // handler for enter key press / release events, other keys are
                // handled by the parent (keyboard) node handler
                final EventHandler keyEventHandler = new EventHandler<KeyEvent>() {
                    @Override
                    public void handle(final KeyEvent keyEvent) {
                        if (keyEvent.getCode() == KeyCode.ENTER) {
                            setPressed(keyEvent.getEventType() == KeyEvent.KEY_PRESSED);
                            keyEvent.consume();
                keyNode.setOnKeyPressed(keyEventHandler);
                keyNode.setOnKeyReleased(keyEventHandler);
            }with....
            private void installEventHandler(final Node keyNode) {
                // handler for enter key press / release events, other keys are
                // handled by the parent (keyboard) node handler
                final EventHandler keyEventHandler = (EventHandler)java.beans.EventHandler.create(EventHandler.class, this, "handle", "");
                keyNode.setOnKeyPressed(keyEventHandler);
                keyNode.setOnKeyReleased(keyEventHandler);
    public void handle(final KeyEvent keyEvent) {
                if (keyEvent.getCode() == KeyCode.ENTER) {
                    setPressed(keyEvent.getEventType() == KeyEvent.KEY_PRESSED);
                    keyEvent.consume();
            }It worked. The new code behaved just like the old code.
    One caveat though. The class count did in fact go up by about 20 classes. I ran multiple runs and this was true for all of them. But I only applied this technique on one anonymous class. It could be the case that the real savings in class count come after many instances of swapping out anonymous classes with this technique.
    From the javadoc
    "Also, using EventHandler in large applications in which the same interface is implemented many times can reduce the disk and memory footprint of the application.
    The reason that listeners created with EventHandler have such a small footprint is that the Proxy class, on which the EventHandler relies, shares implementations of identical interfaces. For example, if you use the EventHandler create methods to make all the ActionListeners in an application, all the action listeners will be instances of a single class (one created by the Proxy class). In general, listeners based on the Proxy class require one listener class to be created per listener type (interface), whereas the inner class approach requires one class to be created per listener (object that implements the interface)."
    Edited by: jmart on Apr 23, 2012 2:13 AM

    Well, the idea is that with Java 8 they can be rewritten to something like this:
    private void installEventHandler(final Node keyNode) {
                // handler for enter key press / release events, other keys are
                // handled by the parent (keyboard) node handler
                EventHandler keyEventHandler = keyEvent => {
                        if (keyEvent.getCode() == KeyCode.ENTER) {
                            setPressed(keyEvent.getEventType() == KeyEvent.KEY_PRESSED);
                            keyEvent.consume();
                keyNode.setOnKeyPressed(keyEventHandler);
                keyNode.setOnKeyReleased(keyEventHandler);
            }Basically what you are doing now is sacrificing performance (both in real performance and in a lot of extra garbage created) for a little bit of memory gain. Unless you have good reasons and measurements to back this up I think this would definitely qualify as premature optimization.
    I'm a heavy user of anonymous inner classes myself, having several hundreds of them now in my project and I have yet to run into problems. I often write code like the example below purely for readability and convience:
    Set<String> someSet = new HashSet<>() {{
      add("A");
      add("B");
    new HBox() {{
      getChildren.add(new VBox() {{
        getChildren.add(new Label("Hi"));
      getChildren.add(new VBox() {{
        getChildren.add(new Label("There"));
    }};

  • Can we run java bean from forms client server??

    Hi,
    The OLTP application we are planning to build has lot of gui e.g
    tabs, drag and drop etc. Our aim is to make it web enabled but
    the network bandwidth available is small 16 - 64K . So even
    thoughwe plan toi use applet , we seriuosly doubt how good it
    will perform on such low network bandwidth. [The system will
    have 100 users]
    Q1. What will be a reasonable bandwidth to run an oltp
    application (say maintenance )
    Hence we are thinking of developing with developer 6i and
    deploying our application in client server mode, which can
    easily be web enabled in future. But we also have to integrate
    visual interfaces like gantt chart, which are not available with
    forms. We plan to use third party java component (e.g ILOG
    jviews), so that in future we can easily web enable the entire
    application.
    Q2. Can we run forms with java bean in client server mode? If
    not, what are the products to be installed on each machine to
    run it without using 9ias?
    best regards

    Yes. We can run sql loader from client machine.
    C:\Karthik>sqlldr user/pass@database data='test.csv' control='test.ctl' log='test.log' bad='test.bad'
    You can go through the following link for better understanding.
    http://www.oreilly.com/catalog/orsqlloader/chapter/ch01.html

  • Problems with the ActiveX bridge for Java beans when using third-party .jar

    I encountered the following problem when using the ActiveX bridge for a java bean:
    I am using JDK 1.4.2_09 and MS Visual Basic 6.0 (SP6). I wrote a java bean called ProcessViewer (my class ProcessViewer inherits from JComponent and implements the interfaces Serializable and AdjustmentListener) which I would like to use within a VB 6.0 application. I used the ActiveX bridge (packager.exe) to generate a DLL (ProcessViewer.dll) and registered it successfully. The java bean GUI-control works fine within my VB 6.0 application unless my java bean (ProcessViewer.jar) uses any third-party .jar files.
    But when I tried to add a reference to some third-party class (com.sap.xxx.xxx....) I got some problems. I could solve the problem with packager.exe by setting the correct CLASSPATH. But at runtime my VB 6.0 application does not work. It crashes or it reports an error like this: "The control ... could not be loaded from axbridge.dll" (although I deployed my .jar file correctly to the directory C:\Programme\Java\j2re1.4.2_09\axbridge\bin and lib). Setting the CLASSPATH environment variable before calling my VB 6.0 application (exe) did not solve the problem.
    How can I teach my VB 6.0 application (containing the Java bean ActiveX control) where to find the third-party .jar file? Copying the third-party .jar file to the JRE lib-folder or to the axbridge\lib folder did not solve the problem either.
    I studied the documentation about the ActiveX bridge given at:
    http://java.sun.com/j2se/1.4.2/docs/guide/beans/axbridge/developerguide/index.html
    but I am missing informations on how the third-party .jar files can be found during runtime of the ActiveX container (e. g. a VB 6.0 application).

    See how to solve your problem with JNI:
    http://codeproject.com/cpp/OOJNIUse.asp
    More examples (for SWING) in tools setup:
    http://www.simtel.net/product.php[id]95126[SiteID]simtel.net
    http://www.simtel.net/product.php[id]94368[SiteID]simtel.net
    http://www.simtel.net/product.php[id]93174[SiteID]simtel.net

  • Getting Java Beans working with Developer Forms 6i

    Hello everyone,
    I have been trying to get Java Beans to work with the Developer Forms 6i. I keep getting diffrent errors depending on the bean I play with. I will detail the problems and the computer setup. I am sure this problem is a configuration one, I just dont seem to have enough experiance to determine the issue or the configuration problem.
    Here are the problems I am encountering:
    Problems 1:
    --JDeveloper 10g
    I cant see the VBean class. When I add this code, the VBean decleration comes up with an error.
    import oracle.forms.ui.VBean;
    public class MyNewClass extends VBean
    public Class1()
    This code shows the IMPORT statement with a wavy blue line under it and the word VBean after the extends also has on. I understand that this means that the JDeveloper cant find the class, I just cant seem to find the correct environment variable to set to point to this.
    Second Problem:
    --Forms 6i
    I open forms, and create a new form. I then add a datablock and a canvas. I open the canvas and drop the BeanArea component on the canvas. I enter the fully pathed/qualified Bean in the Implementation Class and get one of three errors. Either a FRM-13008, a FRM-99999 with a 13009 or a 13010 error. I suspect that the 13008 error is because the bean I created does not have the correct decleration types or IView interface calls. My problem is that when I load any of the Oracle provided beans I get the 13009 or 13010 errors. I have looked here and in Metalinks for some kind of solution that I haven't already tryed, but to no avail.
    Any advice on either of these problems would be appreciated. Please keep in mind that we cant upgrade to version 9 or 10 yet (silly aif force and their regulations), so those type of solutions arn't usable to me.
    Here is the configuration information that I know about. If there is more information that can be provided or I need to provide more information, please let me know and I will get what I can.
    Thanks,
    Bill Hunsicker
    ============= Config Information =======================
    Forms Version 6.0.8.25.2
    JBuilder Version and Information
    Oracle IDE     9.0.5.13.88
    Business Components Version     9.0.5.13.52
    UML Modelers Version     9.0.5.12.38
    Versioning Support     9.0.5.12.38
    WebDAV Support Version     9.0.5.12.38
    Designer Generators Framework     9.0.5.3.39
    java.version     1.4.1_02
    java.home     C:\Oracle\JDeveloper\jdk\jre
    java.vm.name     OJVM Client VM
    java.vm.vendor     Oracle Corp.
    java.vm.version     9.0.5.972 4dopv
    user.language     en
    user.region     <no value assigned>
    user.name     Bill.Hunsicker
    user.home     C:\Documents and Settings\Bill.Hunsicker
    user.dir     C:\Oracle\JDeveloper\jdev\bin
    os.name     Windows XP
    os.version     5.1
    os.arch     x86
    ide.patches     
    ide.user.dir     
    FORMS60_JAVADIR = C:\orant\FORMS60\java
    CLASSPATH = C:\orant\FORMS60\java;C:\orant\TOOLS\COMMON60\JAVA\IMPORTER.JAR;C:\orant\forms60\java\P3load.jar;C:\orant\forms60\java\f60all.jar

    Ok, I added the f60all.jar to the project. This allowed me to create the file using the VBean. I created the JAR file and copied it to the forms60/java directory. I also copied the new .class files to the forms60/java/mil/af/rs/leads direcory.
    I then edited my formsweb.cfg file and had to add the jinit_archive tag. I set it = f60all.jar, P3load.jar. I also added my P3load.jar file to the default archive tag.
    When I open up Forms, drop the bean area component on the canvas, and set the Implementation Class, I still get an error (13008), and when I run the form in web, and click the button to invoke the bean I get no response from the bean.
    here is the code to invoke the bean. in_filename is a text component on the canvas and contained in the CTRL block. The bean area is named BEAN (because the demo was that way).
    :in_filename := get_custom_property('BEAN',1,'getFileName');
    synchronize;
    Not sure where to go from here, but thanks for the help so far.

  • Java.beans.Statement & java.sql.Statement

    My old code from jdk1.3.1 throws the ambiguous class thingie-mo-bob. Why did they implement the new java.beans.Statement, and is there anyway to make it default to the old java.sql.Statement without having to go through all the old code and add import java.sql.Statement. I have like 200 jsp files 'n it will take a loooong time!
    Pete

    There r two ways to do this.
    (i) One is Implement the java.sql.Statement
    like
    package java.beans;
    public interface Statement implements
    java.sql.Statement {
    }What? Are you suggesting he edit the source code for java.beans.Statement and make it implement java.sql.Statement?? I would most certainly not suggest that solution- beside violating the licensing agreement, it has troubling consequences since you are basically redefining the structure of a class in a way that makes no functional sense- that is, there is no reason for java.beans.Statement to implement methods like getConnection() and the other signatures of java.sql.Statement.
    I'm not sure if I'm reading your response correctly or not, but I would definitely not refactor java.beans.Statement just to get this problem solved with out editing files ... ... since java.sql.Statement is used so widely, perhaps they should have considered a different name for java.beans.Statement , although you hate to base a name off of what's going to cause the least problems, rather then what makes the most sense ... ... any way, I guess it doesn't matter now: the name has been selected .... I'd be interested to hear how you solved the problem.

  • Java bean to get information from serial port

    we are migrating from 6i to 10g. In 6i, we used mscomm32.ocx to access to com port. Now in 10g we need a java bean. Anybody has a java bean to access to serial port or anything similar?
    My email is [email protected]
    Thanks in advance.

    we set properties to the serial port, open the port, read (listen) from port, ... Here there are some pieces of code to you see it:
    -- Si está abierto el puerto puedo leer
    IF (MsCommLib_ImsComm.PortOpen(:ITEM('IF_OCX_COM').INTERFACE)=-1) THEN
    -- Miro si hay caracteres
    a:=MsCommLib_ImsComm.InBufferCount(:ITEM('IF_OCX_COM').INTERFACE);
    IF a>0 THEN
    set_item_property('COMUNICACION_ICS.ESPERA',DISPLAYED,PROPERTY_FALSE);
    --Datos de un bloque nuevo, hay que insertar la fecha
    IF :global.estado = 0 THEN
    --Leo la fecha en la que se ha leído los datos
    --SELECT SYSDATE INTO fecha
    --FROM DUAL;   
    fecha := To_Date(:System.Current_Datetime,'dd-mon-yyyy hh24:mi:ss');
    -- Borro la pantalla si hay mas de 1920 caracteres
    :global.tc := :global.tc + 21;
    IF :global.tc > 1920 then
    :comunicacion_ics.if_txt_com_rec :='';
    :global.tc := 0;
    end if;
    --Introduzco la fecha en el control de texto, para su posterior proceso
    :comunicacion_ics.if_txt_com_rec := :comunicacion_ics.if_txt_com_rec||CHR(10)
    ||'__' || To_Char(fecha,'DD-MM-YYYY,HH24:Mi:SS')||chr(10);
    guarda := Fichero.Escribe(:global.fic,CHR(10)||'__' || To_Char(fecha,'DD-MM-YYYY,HH24:Mi:SS')
    ||chr(10));
    if guarda < 0 then
    raise e;
    end if;
    END IF;
    -- Indico que se están recibiendo datos de este bloque
    :global.estado := 2;
    --Leo la cadena
    linea_ics := Var_To_Char(MsCommLib_ImsComm.Input(:item('IF_OCX_COM').INTERFACE));
    linea_ics := replace(linea_ics,chr(13),CHR(10)); -- CHR(10)
    --La añado al control de texto para que se vea
    -- Borro la pantalla si hay mas de 1920 caracteres
    :global.tc := :global.tc + a;
    IF :global.tc > 1920 then
    :comunicacion_ics.if_txt_com_rec :='';
    :global.tc := 0;
    end if;
    :comunicacion_ics.if_txt_com_rec := :comunicacion_ics.if_txt_com_rec||
    linea_ics;
    --Escribo la linea en el fichero
    -- Propiedades de Buffers
    -- Tamaño del Buffer de Entrada
    :prop_com.txt_in_buf := MsCommLib_ImsComm.InBufferSize(:ITEM('IF_OCX_COM').INTERFACE);
    -- Tamaño del Buffer de Salida
    :prop_com.txt_out_buf := MsCommLib_ImsComm.OutBufferSize(:ITEM('IF_OCX_COM').INTERFACE);
    -- Tamaño de la cadena de Entrada
    :prop_com.txt_input_len := MsCommLib_ImsComm.InputLen(:ITEM('IF_OCX_COM').INTERFACE);
    -- RThreshold
    :prop_com.txt_rthres := MsCommLib_ImsComm.RThreshold(:ITEM('IF_OCX_COM').INTERFACE);
    -- SThreshold
    :prop_com.txt_sthres := MsCommLib_ImsComm.SThreshold(:ITEM('IF_OCX_COM').INTERFACE);
    -- EOF Enable
    :prop_com.chk_eof_enable := MsCommLib_ImsComm.EOFEnable(:ITEM('IF_OCX_COM').INTERFACE);
    -- Propiedades Hardware
    -- Parity replace
    :prop_com.txt_par_repl := MsCommLib_ImsComm.ParityReplace(:ITEM('IF_OCX_COM').INTERFACE);
    -- NULL Discard
    :prop_com.chk_null_discard := MsCommLib_ImsComm.NULLDiscard(:ITEM('IF_OCX_COM').INTERFACE);
    -- RTS Enable
    :prop_com.chk_rts := MsCommLib_ImsComm.RTSEnable(:ITEM('IF_OCX_COM').INTERFACE);
    -- NULL DTR
    :prop_com.chk_dtr := MsCommLib_ImsComm.DTREnable(:ITEM('IF_OCX_COM').INTERFACE);
    Thanks. Inma

Maybe you are looking for

  • Creation of Procedure, view in the TimesTen IMD

    Hi, Query No. 1 Existing procedure of Oracle Database we are trying to compile in TimesTen In-Memory database. One temporary table of that same procedure we have cached in the TimesTen IMD. but there are other objects (sequence, table, functions) in

  • Imac printing to NETgear router

    My new iMac duo connects to the web via a Netgear wireless router connected to the cable modem. Also connected to the router is a print server/printer. My PC can print wirelessly to the router/print server/printer. The PC prints wirelessly because Ne

  • PC went to sleep 3 hours into a migration assistant transfer to MBA.

    Is there any way to recover?  The situation was complicated by the fact that while the screen was dark on the PC, I must have inadvertently hit the close box.  I turned off the sleep function on the PC (too bad the migration assistant didn't remind m

  • IPod Nano ad will play with VLC, not with QT Pro 6.5.2

    I downloaded the new iPod Nano ad from apple's website but all I get is music when I play it and a message saying that there may be some problems with video (QT Pro 6.5.2). I tried it wih Video Lan Client and it played without problems. Is QT 6 unabl

  • Reg: warn] (22)Invalid argument: setsockopt: (TCP_NODELAY)

    Hi, I am getting the error msg below, in the file $ORACLE_HOME/Apache/Apache/logs/error_log warn] (22)Invalid argument: setsockopt: (TCP_NODELAY) Cheers...