Performance when using java beans

Am currently implementing a web site using JSP/servlets. I was looking at the model whereby a web client connects to a controller which connects to an entity bean which connects to the database. One thing I am concerned about in this model is performance. How can I make the entity beans stay in memory so I don't have to constantly create/destroy them, how will my controllers reference them. One proposed solution was to have a permanently running "server process" which could accept socket connections and keep the database connection live, but I'm not too happy with this model

probably what I really want is to be able to reference the server class without creating new instances of it every time. Does tomcat provide some kind of built-in object which can provide me with a reference to it or something?

Similar Messages

  • App crash when using JAVA callbacks from native threads in solaris

    Hi all,
    Sorry for putting the thread here. I did use the native methods forum, I wasnt lucky. I Hope more people would look into this forum, which brings me here.
    I have a solaris application which crashes when I try to callback the JAVA methods and variables from the native code. The description of the problem is below
    Written a native library, the library is multithreaded (i.e) I create a thread using pthread_create() in the native code which performs the operation of calling a JAVA method from the native code. The routine of calling the JAVA method works perfectly elsewhere outside the new thread.
    There are two scenarios I've tested it in
    1. I created a thread (say X) from the main thread (say Y) and made the y to wait until the X is complete using the pthread_join(). The JAVA callbacks works fine when called from Y but the app crashes if done from X.
    2. Did not make the Y to wait until the X is complete, hoping that both will run paralelly and even the the App crashes.
    And to be precise the Y is the thread where the native method is called from JAVA.
    I have tested for any memory leaks or stack corruption by removing the JAVA callbacks and bulding a executable and using purify, the report doesnot hint any such occurances.
    The linker options used for building the shared library is as follows
    ${GPP} ${INC} -G ${LIB} -mt -g -lCstd -lCrun -lpthread ${OBJS} -o <lib-name>
    I wonder if we can create threads in the native code when using JAVA callbacks and even if we can whether it would be appropiate to use the callbacks with in the threads
    Looking forward for any help.
    Regards,
    Vamsi

    Guys... can't any one help me with this problem :(

  • Using java bean with jsp

    hello friends,
    i'm new to jsp. i want to create an html form that accepts username and a value from four radio buttons and display back the entered name and checked radio button's value using java bean.
    i use the <jsp:setProperty id="" property="*"> method. i don't know how to access the radio buttons value from the html.
    also when i use an additional field other than username the jsp page is showing error.
    Please give me the correct method to use java bean with jsp in this circumstance.
    thank you.

    thank you, but i have a problem left. the case is like this.
    i got the jsp and bean worked fine when i have a sinle input text field.
    but when i added a second text field i recieved the following error.
    javax.servlet.ServletException: basket.newbean.getUserPass()Ljava/lang/String;
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
         org.apache.jsp.newform.process_jsp._jspService(process_jsp.java:69)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    where userPass is the new form element. I have made the subsequent chanes in my bean program and jsp file.
    pls hlp.

  • Unable to load performance pack, using Java I/O instead

    I'm writing because we're having some troubles with the performance pack load.
    We're getting this error message when the server starts:
    <Feb 1, 2005 11:30:26 AM CST> <Error> <Performance Pack> <Unable to load performance pack, using Java I/O instead.
    Please ensure that libmuxer library is in /bea/jdk131/jre/bin/../lib/PA_RISC2.0/native_threads:/bea/jdk131/jre/bin/../lib/PA_RISC2.0/server:/bea/jdk131/jre/bin/../lib/PA_RISC2.0:/siven/shlib:/bea/wlserver/lib/hpux11:/bea/wlserver/lib/hpux11/oci816_8:/usr/lib
    java.lang.UnsatisfiedLinkError: getBuildTime
    We have checked the following things:
    1.- The library libmuxer.sl exists in the path: /bea/wlserver/lib/hpux11
    2.- The file has the correct privileges so it can be read by the server
    3.- We've run an 'nm -o libmuxter.sl |grep getBuildTime' to ensure that the method exists in the library
    We have four managed servers running in the same machine and the error message apears only in one of them.
    Any idea of what might be happening?
    Does any one know on what OS librarys depends libmuxer.sl?
    We're running WebLogic Server 6.1 SP6 on HP-UX 11.0

    That's very odd that the same machine has 4 servers and only 1 sees this
    error.
    I'm assuming they all have the same environment/user etc. If not,
    that's the first thing you should check.
    I wonder if this is a resource issue in the OS. If you start a 5th
    server, does it also see this error? Is it the 4th server you start
    that hits this error, or just one of the 4 you run?
    -- Rob
    Miguel Chavez wrote:
    I'm writing because we're having some troubles with the performance pack load.
    We're getting this error message when the server starts:
    <Feb 1, 2005 11:30:26 AM CST> <Error> <Performance Pack> <Unable to load performance pack, using Java I/O instead.
    Please ensure that libmuxer library is in /bea/jdk131/jre/bin/../lib/PA_RISC2.0/native_threads:/bea/jdk131/jre/bin/../lib/PA_RISC2.0/server:/bea/jdk131/jre/bin/../lib/PA_RISC2.0:/siven/shlib:/bea/wlserver/lib/hpux11:/bea/wlserver/lib/hpux11/oci816_8:/usr/lib
    java.lang.UnsatisfiedLinkError: getBuildTime
    We have checked the following things:
    1.- The library libmuxer.sl exists in the path: /bea/wlserver/lib/hpux11
    2.- The file has the correct privileges so it can be read by the server
    3.- We've run an 'nm -o libmuxter.sl |grep getBuildTime' to ensure that the method exists in the library
    We have four managed servers running in the same machine and the error message apears only in one of them.
    Any idea of what might be happening?
    Does any one know on what OS librarys depends libmuxer.sl?
    We're running WebLogic Server 6.1 SP6 on HP-UX 11.0

  • Unable to load performance pack, using Java I/O on WL60, sp2

    Dear friends,
    I am seeking help from you. When we start WL60 SP2 on Sun Soloris 5.6, we got
    the following exception:
    <Jul 31, 2001 5:39:53 PM EDT> <Error> <Performance Pack> <Unable to load performance
    pack, using Java I/O.
    java.lang.UnsatisfiedLinkError: getFdLimit
    at weblogic.socket.PosixSocketMuxer.getFdLimit(Native Method)
    at weblogic.socket.PosixSocketMuxer.<init>(PosixSocketMuxer.java:104)
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:237)
    at weblogic.socket.SocketMuxer.makeTheMuxer(SocketMuxer.java:128)
    at weblogic.socket.SocketMuxer.getMuxer(SocketMuxer.java:83)
    at weblogic.t3.srvr.ListenThread.run(ListenThread.java:224)
    >
    Hoever, the server itself started, and our applications runs ok
    (at least so far). But this exception appears every time on some user accounts.
    I was wondering what causes this exception. Some user accounts in the same machine
    don't have this problem.
    I also wondering if it will cause performance problem when the traffic is high.
    We already applied the patches.
    Any hits and suggestions are welcome.
    Thanks in advance.
    -Ju

    Dear Deyan,
    Thanks for your help. We do have $WEBLOGIC_HOME/lib/solaris in LD_LIBRARY_PATH,
    which is set when running ". setEnv.sh" before startWebLogic.sh.
    We failed on one patch: 105210-27, for some reason.
    The strange thing is: in the same machine, all WL60 instances running under user
    accounts (under /users/developers/) have no such error. But it happens under some
    account, like accounts under /export/home/, etc. /user/developers is mounted on
    another physical machine.
    -Ju
    "Deyan D. Bektchiev" <[email protected]> wrote:
    >
    You should have the $WEBLOGIC_HOME/lib/solaris directory in your LD_LIBRARY_PATH
    so that
    the server can load the performance pack (which is a shared library called
    libmuxer.so).
    If it is present then do a ldd libmuzer.so and you will see if any libraries
    that it
    depends on are missing.
    Also make sure you have all of the requered patches for 2.6 installed.
    --dejan
    Ju Rao wrote:
    Dear friends,
    I am seeking help from you. When we start WL60 SP2 on Sun Soloris 5.6,we got
    the following exception:
    <Jul 31, 2001 5:39:53 PM EDT> <Error> <Performance Pack> <Unable toload performance
    pack, using Java I/O.
    java.lang.UnsatisfiedLinkError: getFdLimit
    at weblogic.socket.PosixSocketMuxer.getFdLimit(Native Method)
    at weblogic.socket.PosixSocketMuxer.<init>(PosixSocketMuxer.java:104)
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:237)
    at weblogic.socket.SocketMuxer.makeTheMuxer(SocketMuxer.java:128)
    at weblogic.socket.SocketMuxer.getMuxer(SocketMuxer.java:83)
    at weblogic.t3.srvr.ListenThread.run(ListenThread.java:224)
    >
    Hoever, the server itself started, and our applications runs ok
    (at least so far). But this exception appears every time on some useraccounts.
    I was wondering what causes this exception. Some user accounts in thesame machine
    don't have this problem.
    I also wondering if it will cause performance problem when the trafficis high.
    We already applied the patches.
    Any hits and suggestions are welcome.
    Thanks in advance.
    -JuContent-Description: Card for Deyan D. Bektchiev
    begin:vcard
    n:Bektchiev;Deyan
    tel;home:1-650-363-6055
    tel;work:1-650-289-1046
    x-mozilla-html:TRUE
    url:http://www.appl.net/
    org:Application Networks
    adr:;;444 Ramona St;Palo Alto;CA;94301;USA
    version:2.1
    email;internet:[email protected]
    fn:Deyan D. Bektchiev
    end:vcard

  • Use Java Bean or Java Importer

    I have created my java class to validate a user against LDAP and now I would like to use that class in my own 9i login form. In order to pass the class variable values to the form is it better to create a java bean or use the Java Importer? Which is better for performance?

    Mike,
    Java Beans added to Forms are downloaded to teh client as part of the application startup. The jar files get permanently cached on teh client until they are renewed on the server. For your original request, the funtionality already exists in a Forms9i demo
    http://otn.oracle.com/sample_code/products/forms/files/Forms9iOID_DEMO.zip
    Viewlet:
    http://otn.oracle.com/sample_code/products/forms/demo/9i/forms_services_demos/sso_oid_integration/viewlet/forms_integration_oid/OID90_viewlet.html
    To authenticate
    <Java Importer class package>.authenticateUser(<obj ORA_JAVA.JOBJECT>,user_dn VARCHAR2,password VARCHAR2) RETURN BOOLEAN;
    Frank

  • How can I using java bean to insert new record

    Hi everybody,
    I'd some problem when I insert a record using java bean. When insert a record, the resultset executeUpdate return 0 anc cannot add record to database. Would you please tell me what's wrong in my code?
    java bean
    package miniproj;
    import java.sql.*;
    public class Register{
    private String sql;
    private String username;
    private String usertype;
    private String password;
    private String blocknum;
    private int floornum;
    private String owner;
    private int rows;
    private String s;
    // set parameter to database
    public int setMember(){
    try{
    //load database driver
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    // Get a connection to the database
    Connection sqlConn = java.sql.DriverManager.getConnection("jdbc.odbc:WFBS");
    // Get a statement from the connection
    Statement sqlStmt = sqlConn.createStatement();
    sql = "INSERT INTO USERS(user_name, password) VALEUS ('aaa', 'aaa')";
    // sql = "INSERT INTO USERS(user_name, password) VALEUS (" + user_name + "," + password + ")" ;
    rows = sqlStmt.executeUpdate(sql);
    // sqlRst.close();
    sqlStmt.close();
    sqlConn.close();
    catch(SQLException se){
    catch(Exception e){
    return rows;
    // set user name method
    public void setUsername(String name){
    username = name;
    // set passwrod method
    public void setPassword(String pwd){
    password = pwd;
    // set block num mehtod
    public void setBlockNum(String block){
    blocknum = block;
    // set floor num method
    public void setFloorNum(int floor){
    floornum = floor;
    // set owner method
    public void setOnwer(String own){
    owner = own;
    // get user name method
    public String getUsername(){
    return username;
    // get password method
    public String getPassword(){
    return password;
    jsp code
    <%@ include file="Header.jsp" %>
    <%@ page errorPage="Error.jsp" %>
    <jsp:useBean id="register" class="miniproj.Register" />
    <jsp:setProperty name="register" property="*" />
    User name : <%=register.getUsername()%><br>
    Password : <%=register.getPassword()%><br>
    <%
    int i = register.setMember();
    out.println(i);
    %>
    Thanks a lot
    Chris

    Seems to me that executeUpdate() would throw an SQLException, which in turn would get caught by your empty catch. The SQL keyword VALUES is misspelled. Put a 'se.printStackTrace()' in your catch to confirm this.

  • Value cannot refresh using Java bean

    When I use java bean to get a value. It suppose to refresh and show new value but it doesn't. So any code can help to resolve this issue.
    here is my code
    (Testing.jsp)
    <html>
    <head>
    <title>Page 3</title>
    <link rel=stylesheet type="text/css" href="auction.css">
    </head>
    <table class="mainBox" width="200">
    <tr><td class="boxTitle" >
    Testing number 3
    </td></tr>
    <tr><td>
    <span class="headline">
         <jsp:useBean id="testing2" class="com.jsp.newsys.testing.Testing2" scope="request">
         <jsp:setProperty name="testing2" property="user" value="Hello World"/>
    <jsp:getProperty name="testing2" property="user2"/>
         </jsp:useBean>
    </span>     
    </td></tr>
    </table>
    </html>
    The bean file which is Testing2.java
    package com.jsp.newsys.testing;
    import java.beans.*;
    import java.util.*;
    public class Testing2 extends Object implements java.io.Serializable {
         private String user;
         private String test;
    public Testing2() {
    public void setUser(String user)
              test="";
              if (user.equals("Hello World"))
                   test="Hi dqwqwd";
         public String getUser2()
         return this.test;
    I need to restart my tomcat everytime then only the value will refresh. Please help.
    Message was edited by:
    wesleygch
    Message was edited by:
    wesleygch
    Message was edited by:
    wesleygch

    Your bean maybe have misspelling error
    look at test and test2 on the jsp file. But I couldn't find any bean property test2 in your bean. Maybe you should try
    ${testing2.test} instead of ${testing2.test2}
    I am a new bie also....:-)

  • Performance difference between java.beans.Expression and Java Reflection

    What is the Performance difference between using java.beans.Expression class and Java Reflection classes like Class,Method ??

    negligible

  • Search in form by using java bean or PJC.

    hi all
    i am confused because i do not know java bean to much,is it possible to create a search button with one text item in java bean to display all records
    example:
    if i enter dept 10 then it display all records related to dept 10?
    is it possible?
    if yes please cany anyone send me a demo?
    here is my email add.
    [email protected]
    sarah

    hi
    Francois thanks for the link and its very useful and i am studying the codes and also i downloaded demos and run them its working fine and its very very nice.
    i like java and trying to learn and its very useful.
    why i want to use java bean because one of my friend her name is sheela she wants me to do it but i am failed i did not do it in java bean
    so i thought lets try on the forum may be someone help u.
    so i posted a thread over here.
    thanks Francois.
    u r appreciated.once again thanks.
    sarah

  • Why use Java Beans?

    Why should we use java beans?
    Everybody says it is used to set the properties. What does this mean?
    Can anyone give me a realtime scenario of the problems it can solve?
    How does Spring framework utilize beans to solve problems? i.e wiring beans, declaring them in context file.

    shalearns wrote:
    Why should we use java beans?[http://java.sun.com/docs/books/tutorial/javabeans/index.html]
    Everybody says it is used to set the properties. What does this mean?[http://java.sun.com/docs/books/tutorial/javabeans/whatis/index.html]
    Can anyone give me a realtime scenario of the problems it can solve?[http://java.sun.com/docs/books/tutorial/javabeans/nb/index.html]
    How does Spring framework utilize beans to solve problems? i.e wiring beans, declaring them in context file.[http://static.springframework.org/spring/docs/1.2.x/reference/beans.html]
    ~

  • How to use Java Beans In JSTL?

    Hi
    I want to know how to use Java bean in JSTL
    please explain this with giving any one example.
    Thanks-
    Swapneel

    A bean is obtain by <jsp:useBean> tag nd once bean is obtained we can get its property by using getProperty tag.

  • Help : Unable to use Java Beans in Oracle forms 6i

    Hi ,
    I have been trying to run few sample code to understand how to use Java beans in oracle forms 6i .But have been largely unsuccessfull.
    It will be great if somebody can provide me with some simple form( and java code )which uses java beans concept to give some data to the java program and receive some data from it . Pls inform me about the settings that need to be done.
    If you guys know it then pls take the pains of writing a simple form and java code.
    i hope somebody will respond because your reply is very necesary for me to proceed.
    U can email me the code > [email protected]
    Thanks in advance.

    Thanks for your reply Francois.
    Actually i am not facing problem understanding the programming technique.
    I think the problem at my end is more of a cofiguration one.I am using forms version 6i
    on oracle 8.
    Every time i set the imlementation class property of the bean area it gives an error 13010 which translates to that "the class being mentioned is not extending the IView class".
    The class i have written extends VBean so i am not sure why this error is occuring.
    I think if oracle (correctly) finds the java class to use then i will be able to proceed.
    Pls reply.
    If you have some code that is working fine then pls send it to me.And also inform is some environment variables have to be set for its use.

  • Unable to load performance pack, using Java I/O.

    Hi there,
    I am trying to start weblogic 6.0 from jBuilder. It does start, and
    working. But, I got the one problem about loading performance pack. The
    message is the following. Any comment?
    Thank you
    ----------------------------------------->Starting WebLogic Server ....
    <Jun 27, 2001 1:35:13 PM EDT> <Notice> <Management> <Loading configuration
    file C:\bea\wlserver6.0sp1\config\mydomain\config.xml ...>
    log file:
    C:\bea\wlserver6.0sp1\config\mydomain\config\config\mydomain\logs\weblogic.l
    og
    <Jun 27, 2001 1:35:14 PM EDT> <Info> <Logging> <Only log messages of
    severity "Error" or worse will be displayed in this window. This can be
    changed at Admin Console> mydomain> Servers> myserver> Logging> General>
    Stdout severity threshold>
    <Jun 27, 2001 1:35:46 PM EDT> <Notice> <WebLogicServer> <ListenThread
    listening on port 7001>
    <Jun 27, 2001 1:35:46 PM EDT> <Notice> <WebLogicServer> <WebLogic Server
    started>
    <Jun 27, 2001 1:35:46 PM EDT> <Error> <Performance Pack> <Unable to load
    performance pack, using Java I/O.
    java.lang.UnsatisfiedLinkError: no wlntio in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1312)
    at java.lang.Runtime.loadLibrary0(Runtime.java:749)
    at java.lang.System.loadLibrary(System.java:820)
    at weblogic.socket.NTSocketMuxer.<init>(NTSocketMuxer.java:173)
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:237)
    at weblogic.socket.SocketMuxer.makeTheMuxer(SocketMuxer.java:126)
    at weblogic.socket.SocketMuxer.getMuxer(SocketMuxer.java:83)
    at weblogic.t3.srvr.ListenThread.run(ListenThread.java:224)
    >

    Thank you
    But, it does not work. It does the same. Here is the message.
    ------------------------------------------------------------>C:\bea\jdk130\bin\javaw -classpath
    "S:\Java\classes;C:\jdk1.3\jre\lib\rt.jar;S:\Java\lib\activation.jar;S:\Java
    \lib\classes12.zip;S:\Java\lib\cos.jar;S:\Java\lib\dx3.0.jar;S:\Java\lib\dx3
    .0-res.jar;S:\Java\lib\fscontext.jar;S:\Java\lib\j2ee.jar;S:\Java\lib\java40
    .jar;S:\Java\lib\jgl3.1.0.jar;S:\Java\lib\jsdk21.jar;S:\Java\lib\junit.jar;S
    :\Java\lib\mail.jar;S:\Java\lib\msclasses.zip;S:\Java\lib\rootriver.report.j
    ar;S:\Java\lib\servlet.jar;S:\Java\lib\ServletExecDebugger.jar;S:\Java\lib\s
    truts.jar;C:\bea\wlserver6.0sp1\lib\weblogic.jar;C:\bea\wlserver6.0sp1\lib\x
    mlx.jar;C:\bea\wlserver6.0sp1\bin;C:\junit3.5\junit.jar;C:\jakarta-struts-1.
    0-b1\lib\struts.jar;C:\JBuilder4\jdk1.3\demo\jfc\Java2D\Java2Demo.jar;C:\JBu
    ilder4\jdk1.3\jre\lib\i18n.jar;C:\JBuilder4\jdk1.3\jre\lib\jaws.jar;C:\JBuil
    der4\jdk1.3\jre\lib\rt.jar;C:\JBuilder4\jdk1.3\jre\lib\sunrsasign.jar;C:\JBu
    ilder4\jdk1.3\lib\dt.jar;C:\JBuilder4\jdk1.3\lib\tools.jar" -ms64m -mx64m -
    classpath
    "C:\bea\wlserver6.0sp1;C:\bea\wlserver6.0sp1\bin;C:\bea\wlserver6.0sp1\lib\w
    eblogic_sp.jar;C:\bea\wlserver6.0sp1\lib\weblogic.jar;S:\Java\classes;S:\Jav
    a\lib\classes12.zip;C:\jakarta-struts-1.0-b1\lib\struts.jar;S:\Java\lib\dx3.
    0.jar;S:\Java\lib\rootriver.report.jar;S:\Java\lib;S:\Java\lib\struts.jar;"
    "-Dweblogic.RootDirectory=C:\bea\wlserver6.0sp1"
    "-Dweblogic.Domain=mydomain" "-Dweblogic.Name=myserver" "-Dbea.home=c:\bea"
    "-Djava.security.policy==c:\bea\wlserver6.0sp1\lib\weblogic.policy"
    "-Dweblogic.management.password=password" weblogic.Server -hotspot
    Starting WebLogic Server ....
    <Jun 27, 2001 4:00:39 PM EDT> <Notice> <Management> <Loading configuration
    file C:\bea\wlserver6.0sp1\config\mydomain\config.xml ...>
    log file:
    C:\bea\wlserver6.0sp1\config\mydomain\config\config\mydomain\logs\weblogic.l
    og
    <Jun 27, 2001 4:00:50 PM EDT> <Info> <Logging> <Only log messages of
    severity "Error" or worse will be displayed in this window. This can be
    changed at Admin Console> mydomain> Servers> myserver> Logging> General>
    Stdout severity threshold>
    <Jun 27, 2001 4:02:32 PM EDT> <Notice> <WebLogicServer> <WebLogic Server
    started>
    <Jun 27, 2001 4:02:32 PM EDT> <Notice> <WebLogicServer> <ListenThread
    listening on port 7001>
    <Jun 27, 2001 4:02:32 PM EDT> <Error> <Performance Pack> <Unable to load
    performance pack, using Java I/O.
    java.lang.UnsatisfiedLinkError: no wlntio in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1312)
    at java.lang.Runtime.loadLibrary0(Runtime.java:749)
    at java.lang.System.loadLibrary(System.java:820)
    at weblogic.socket.NTSocketMuxer.<init>(NTSocketMuxer.java:173)
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:237)
    at weblogic.socket.SocketMuxer.makeTheMuxer(SocketMuxer.java:126)
    at weblogic.socket.SocketMuxer.getMuxer(SocketMuxer.java:83)
    at weblogic.t3.srvr.ListenThread.run(ListenThread.java:224)
    >

  • Fragmented sound when using Java Synthetizator

    Hi,
    What is the reason for sound fragmentation when using
    Java synthetizator in playing midi files:
    ByteArrayInputStream mididata = new ByteArrayInputStream(data);
    AudioStream as = new AudioStream(mididata); //pre fragment? Priority problem?
    mididata.close();
    p.start(as);
    as.close();}
    catch (IOException f){System.out.println("error - " + f.toString());}
    And why there is a "blob" in loadspeakers a few seconds before
    the music starts?
    See the whole source:
    http://users.skynet.be/belgia/musitives/Synestesia.html
    Regards,
    LG
    Metacomposer GR�HN http://users.skynet.be/belgia/midi/gallery.html
    SYNESTESIA Open Source Java code generates music from any pictures

    Not sure about the fragmentation, but I guess the Blob is because you have crap in your buffer before you start to play. I don't remember what the fix is for it, but I think there is some way of clearing out the buffer.

Maybe you are looking for

  • Cannot install iTunes 10.6.3 to windows 7 64 bit

    While attempting to install iTunes 10.6.3 to a new computer that hasWindows 7 64 bit os, I get a message that states "This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application

  • Problem starting SAP - 2EETW169 no connect possible: "DBMS = ORACLE

    Hi there, Recently I just restored my QAS database and now, I'm having a problem to start the SAP application. I'm using ECC6, HPUX B11.23 and Oracle 10. drqaecc:qasadm 22> R3trans -d This is R3trans version 6.14 (release 700 - 05.03.09 - 08:28:00).

  • HT201365 Iphone Activation Fail

    I bought an original from an authorized service provider but can't activate my iphone! It says that activation server is temporarily unavailable! And it has been, for days! This activation lock is flawed. Fix this, apple.

  • Imap email error on iPad air

    I keep getting an error message while trying to setup my imap Gmail and Aol  accounts on my new ipad air. The error says user name or password is incorrect but I know for a fact they are correctly entered. How do I correct this?

  • Do older models always lag behind/run slow?

    The reason why I ask is I currently have an iPhone 4S. I got it in July of 2012 right before the iPhone 5 came out. After iOS 7 came out I noticed performance decreases. I don't think I had any major performance issues before 7. My question is, do ol