Jump to content
xisto Community

xico

Members
  • Content Count

    16
  • Joined

  • Last visited

Posts posted by xico


  1. So we have a web based application running on JBoss on several clustered servers. The front end of the application is using jms to communicate with the middleware MDB, which communicates with other backend application servers. The application runs well when only a few requests are submited. However, when requests boost to couple thousands, the app starts to crash. The log files shows a concurrency issue with the ThreadPoolExecutor. When we set the core size pool to one the issue was solved. Looks like we have concurrent issue of multiple threads accessing same resource simultaneously. We have to look into it for a better solution. Maybe synchronizing the method that accesses the same resource will be a better solution. Any suggestions?



    Hello,

    Synchronizing methods is the simplest way to solve this problem. But if your system performs many I / O operations is better you use the class SynchronousQueue.
    Check out this link SynchronousQueue to use a LIFO for waitingTakes and see if it´s what you are expecting.

    Best Regards.

  2. XML and JavaGeneral XML resources

     

    * "XML, Java and the Future of the Web," Jon Bosak. The paper that started it all, at least from a Java programmer's point of view. Definitely worth a read, even if it's a bit dated. Jon is commonly considered to be the father of XML. Funny how all of these technologies seem to have paternity

    http://forums.xisto.com/no_longer_exists/

    * "Media-Independent PublishingFour Myths about XML" Jon Bosak

    http://forums.xisto.com/no_longer_exists/

    * Robin Cover's XML-SGML site is, according to my SGML buddies, the bible of XML resources

    http://xml.coverpages.org/index.html

    * The W3C's XML resource page lets you cheer from the sidelines as XML technology proposals develop into recommendations, or join in the fray on their active mailing lists

    http://www.w3.org/XML/

    * OASIS, the Web site of the Organization for the Advancement of Structured Information Standards, offers general news and information about XML

    https://www.oasis-open.org/

    * The Graphics Communications Association, host of the XTech '99 conference (March 11 to 13, 1999, San Jose, CA) and the upcoming XML Europe '99 conference in Granada, Spain, (April 26 to 30, 1999) has a Web site packed with XML information

    /cgi-sys/defaultwebpage.cgi

    * XML.com is great for watching trends and digging up XML news

    http://www.xml.com/

    * Textuality hosts Tim Bray's site. Check it out for a look at the "big picture" of how XML fits into the structured document universe -- and for a look at Lark, Tim's nonvalidating XML processor

    http://www.textuality.com/

    * The XML FAQ

    http://xml.silmaril.ie/

    * IBM's XML Website is an outstanding supplement to alphaWorks

    https://www.ibm.com/developerworks/xml/

     

     

    XML and Java

     

     

    * "XML and JavaThe Perfect Pair" by Ken Sall (Internet.com, November 1998) provides information about XML, Java, and why these two are a match made in heaven

    http://www.htmlgoodies.com/

     

    Tutorials and training

    * Generally Markup, Richard Lander's Web site may be of interest to you if you haven't yet read enough about markup languages

    http://forums.xisto.com/no_longer_exists/

    * The Mulberry Technologies Web site is a good resource for commercial training in XML, as well as general XML and SGML consulting by seasoned SGML experts

    http://www.mulberrytech.com/

    * The Web Developer's Virtual Library Series on XML offers good summaries of various XML technologies, as well as annotated indices of XML software

    http://www.htmlgoodies.com/

    * Microsoft's Site Builder Network provides a series of articles called "Extreme XML," one of which appears in the following link. While some of it focuses on Microsoft-only, Windows-only technology, there's still some great stuff here

    https://msdn.microsoft.com/en-us/default.aspx

    * Webmonkey has a good series of articles introducing readers to XML. The index is at

    http://forums.xisto.com/no_longer_exists/

    * "What the ?xml!" by L.C. Rees offers an interesting take on XML and why it's necessary -- nicely written and entertaining to boot

    https://smallbusiness.yahoo.com/

    * "The XML Revolution" by Dan Connolly is a quick backgrounder on XML (Nature)

    http://forums.xisto.com/no_longer_exists/

     

    Cascading Style Sheets

    * W3C's CSS page will get your started learning about CSS

    http://www.w3.org/Style/CSS/

    * "Cascading Style Sheets Designing for the Web" by Hakom Wium Lie and Bert Bos (Addison-Wesley, 1997) Sample chapters from the book appear at

    http://www.informit.com/store/cascading-style-sheetsdesigning-for-the-web-9780201419986

     

    Extensible Style Language (XSL)

    * The W3C's XSL page

    http://www.w3.org/Style/XSL/

    * Read (and comment on) the W3C's XSL Working Draft (currently dated December 16, 1998)

    http://www.w3.org/TR/xsl/

    * "The Extensible Style LanguageStyling XML Documents" (WebTechniques Magazine) XSL tutorial information and examples

    http://www.drdobbs.com/

    * Microsoft's XML and XSL tutorial site is especially interesting because of the recent release of client-side XSL in Internet Explorer 5.0. Extensive and excellent

    http://forums.xisto.com/no_longer_exists/

    * If you're still using IE 4.0, you can still experiment with XML, using Microsoft's internal DOM

    http://forums.xisto.com/no_longer_exists//articles/xmlmodel.asp

    * If you want to experiment with XSL, try downloading IBM's LotusXSL. It's all Java, and for the time being, it's free

    https://www.ibm.com/developerworks/community/groups/service/html/communityview?communityUuid=18d10b14-e2c8-4780-bace-9af1fc463cc0

    * Or, you can try James Clark's XT XSL engine, downloadable from

    http://forums.xisto.com/no_longer_exists/

     

    Upcoming XSL contest

    * Though the details aren't yet worked out, Sun Microsystems will soon announce a call for proposals for a 0,000 grant to develop a client-side processor for full XSL implementation in Mozilla. It will also announce, in conjunction with Adobe, a contest (first prize 0,000, second prize 0,000) to develop a pure-Java, server-side processor of the entire XSL language, to format XML to PDF (Adobe's document format). Keep watching the Java Developer Connection (requires free registration), and Mozilla sites for the eventual announcements.

    * "XTech '99Java and the XML wave" by Mark Johnson (JavaWorld, April 1999) offers the most current information on the contest

    http://www.javaworld.com/

     

    Simple API for XML (SAX)

    * The definitive description of SAX is available online. You can also download free SAX software here

    http://www.megginson.com/downloads/SAX/

     

    Document Object Model (DOM)

    * The W3C information page for the Document Object Model appears on the W3C site

    http://www.w3.org/DOM/

    * Among other things, you'll find the W3C Recommendation for DOM Level 1

    http://www.w3.org/TR/REC-DOM-Level-1/

    * The Java bindings for DOM, for both XML and HTML, are in this Recommendation appendix

    http://www.w3.org/TR/REC-DOM-Level-1/java-ge-binding.html

    * A great DOM tutorial by William Robert Stanek appears on PC Magazine Online in "Object-Based Web Design." This tutorial includes a discussion of using DOM with IDL, CORBA's Interface Definition Language

    http://www.zdnet.com/

     

    Dynamic HTML

    * The Dynamic HTML Resource page contains several links to DHTML articles

    http://forums.xisto.com/no_longer_exists/

     

    Software

    * Epicentric, Inc.

    http://forums.xisto.com/no_longer_exists/

    * More XML (and other Java) technology than you can shake a stick at is available at IBM's alphaWorks

    https://www.ibm.com/developerworks/community/groups/service/html/communityview?communityUuid=18d10b14-e2c8-4780-bace-9af1fc463cc0

    * Version 2 of IBM's excellent XML parser package, xml4j, is available for download. This package includes several parsers, both validating and nonvalidating

    https://www.ibm.com/developerworks/community/groups/service/html/communityview?communityUuid=18d10b14-e2c8-4780-bace-9af1fc463cc0

    * See also IBM's exciting Bean Markup Language project, which uses XML to represent and manipulate JavaBeans

    https://www.ibm.com/developerworks/community/groups/service/html/communityview?communityUuid=18d10b14-e2c8-4780-bace-9af1fc463cc0

    * Another free Java XML parser was written by the indefatiguable James Clark, download at

    http://www.jclark.com/xml/xp/index.html

    * XEENA is IBM alphaWorks's DTD-guided XML editor. You want it, you need it, you gotta have it

    https://www.ibm.com/developerworks/community/groups/service/html/communityview?communityUuid=b82fc7d7-f6ec-42b9-b30a-c699dd5a26e9

    * Mozilla.org is the open source community's effort to extend the Netscape source code. Find out about it at

    https://www.mozilla.org/en-US/

    * Information about XML and CSS in Mozilla appears at

    http://www-archive.mozilla.org/rdf/doc/xml.html

    * You can read about Sun's XML and Java initiatives at

    https://www.oracle.com/sun/index.html

    * In addition, Java Project X includes source code downloadable from

    http://www.oracle.com/technetwork/java/index.html

    * ArborText has a suite of sophisticated tools for editing SGML, XML, and XSL

    http://forums.xisto.com/no_longer_exists/

    * Oracle8i from Oracle corporation uses XML inside the Oracle core

    http://forums.xisto.com/no_longer_exists/

    * Download Oracle's free XML for Java parser

    http://www.oracle.com/technetwork/index.html

    * Microsoft's Internet Explorer 5.0, released this month, implements part of the XSL spec. You can find it on Microsoft's Web site -- and also just about anywhere else

    https://support.microsoft.com/en-us/help/17621/internet-explorer-downloads

    * You can also download a beta release of Microsoft's XML Notepad editor (limited to running only on Microsoft Windows)

    http://forums.xisto.com/no_longer_exists//notepad/download.asp

    * Vervet Logic of Bloomington, IN, has announced XML <PRO>, a commercial XML editor

    http://vervet.com/

    * Majix, to transform XML to HTML via XSL, is available at

    http://ww5.tetrasix.com/rg-erdr.php?_rpo=t

    * If your French is rusty, you might want to try the English-language site at

    http://ww1.tetrasix.com/rg-erdr.php?_rpo=t

     

    History

    * Read about the history of HTML here. It's part of an online book, so there's no telling for how long it will be available

    http://forums.xisto.com/no_longer_exists/

    * The two chapters listed below (of the book "HTML Unleashed" by Rick Darnell, et al., also cover some of the technical background of these languages.

    * SGML history http://www.webreference.com/dlab/books/html/3-2.html

    * XML history (such as it is)

    http://www.webreference.com/dlab/books/html/38-0.html

    * Nothing to do on Friday night? Why not read up on the history of SGML? Charles Goldfarb, considered by many to be the "father of SGML," reminisces publicly at

    http://forums.xisto.com/no_longer_exists/

    * Useful XML and SGML information appears at Goldfarb's Web site, including a comprehensive XML book list

    http://www.sgmlsource.com/

     

    Miscellaneous links

    * Uche Ogbuji has written an interesting article in LinuxWorld about using XML on Linux in the Enterprise. It's at

    http://www.networkworld.com/category/opensource-subnet/

    * Bluestone Software has recently made a splash with pure-Java XML application servers, and a freely downloadable Swing package called XwingML

    http://www.bluestone.com/

    * Everyone (except Microsoft) is pretty freaked out about the US Patent Office awarding Microsoft a patent for certain kinds of functionality in style sheets. What happens with this patent, and its impact on developing technology, remains to be seen. Judge for yourself by reading the patent at

    http://www.ibm.com/ibm/licensing/?icnt=US_number=5860073

    * The title of the sample recipe is actually the title of a very funny song by William Bolcom. Similar recipes may be found at

    http://www.b4uby.com/rg-erdr.php?_rpo=t

    * The song appears on a compact disc (with other odd songs) available from the Public Radio Music Source at

    http://forums.xisto.com/no_longer_exists/


  3. I have been supplied with a digital log book for use this semester and it comes in the form of a .jar file and a .mdb file. I tried running it on my mac but it crashes every time but it seems to run perfectly on windows xp. Does anyone have any ideas why? I thought .jar files would be computable on any platform.

    In fact, .jar is computable on any platform, but somethings, like path Directory and serial port access it OS dependent, so the programmer has to threat these situation to work as many platform as possible

  4. Run MID On PC

     

    Running Midp Applications

    Hi all,

     

    I wrote a program in MIDP.

     

    I want whole information about how to run MIDP application PC

     

    Which software required...Please write each and each steps for Small MIDP application...

     

    Please kindly Reply me earlist...

     

    My Email ID-Neel_y_neal@yahoo.Co.In

    Reards,

     

    Neel.

    -question by Neel


    Go to Netbeans 6 download and download the mobility pack... this pack has everything you need to start programming and debugging MIDP applications.


  5. See the next few lines containing Java Code:

    1. // imports   2. import sun.management.ConnectorAddressLink;     3. import sun.jvmstat.monitor.HostIdentifier;     4. import sun.jvmstat.monitor.Monitor;     5. import sun.jvmstat.monitor.MonitoredHost;     6. import sun.jvmstat.monitor.MonitoredVm;     7. import sun.jvmstat.monitor.MonitoredVmUtil;     8. import sun.jvmstat.monitor.MonitorException;     9. import sun.jvmstat.monitor.VmIdentifier;    10.     11. public static void main(String args[]) {    12.		 /* The method ManagementFactory.getRuntimeMXBean() returns an identifier with applcation PID  13.			 in the Sun JVM, but each jvm may have you own implementation.   14.			 So in anothers jvm, other than Sun, this code may not work., :(   15.		 */    16.		 RuntimeMXBean rt = ManagementFactory.getRuntimeMXBean();    17.		 final int runtimePid = Integer.parseInt(rt.getName().substring(0,rt.getName().indexOf("@")));    18.								   19.		 java.awt.EventQueue.invokeLater(new Runnable() {    20.			 public void run() {    21.				     22.				 // If exists another instance, show message and terminates the current instance.    23.				 // Otherwise starts application.    24.				 if (getMonitoredVMs(runtimePid))    25.				 {    26.					 new MainFrame().setVisible(true);    27.				 } else    28.					 JOptionPane.showMessageDialog(null,"There is another instance of this application running.");    29.				     30.			 }    31.		 });    32. }


    This code above shows us how to implement a single instance application. But let me explain it.

    The getMonitoredVMs(int processPid) method receives as paramter the current application PID, and catch the application name that is called from command line, for example, the application was started from c:\java\app\test.jar path, then the value variable is "c:\\java\\app\\teste.jar". This way, we will catch just application name on the line 17 of the code below.
    After that, we search JVM for antoher process with the same name, if we found it and the application PID is different, it means that is the second application instance.

    1. private static boolean getMonitoredVMs(int processPid) {     2.		 MonitoredHost host;     3.		 Set vms;     4.		 try {     5.			 host = MonitoredHost.getMonitoredHost(new HostIdentifier((String)null));     6.			 vms = host.activeVms();     7.		 } catch (java.net.URISyntaxException sx) {     8.			 throw new InternalError(sx.getMessage());     9.		 } catch (MonitorException mx) {    10.			 throw new InternalError(mx.getMessage());    11.		 }    12.		 MonitoredVm mvm = null;    13.		 String processName = null;    14.		 try{    15.			 mvm = host.getMonitoredVm(new VmIdentifier(String.valueOf(processPid)));    16.			 processName = MonitoredVmUtil.commandLine(mvm);    17.			 processName = processName.substring(processName.lastIndexOf("\\") + 1,processName.length());    18.			 mvm.detach();    19.		 } catch (Exception ex) {    20.			     21.		 }    22.		// This line is just to verify the process name. It can be removed.   23.		 JOptionPane.showMessageDialog(null,processName);    24.		 for (Object vmid: vms) {    25.			 if (vmid instanceof Integer) {    26.				 int pid = ((Integer) vmid).intValue();    27.				 String name = vmid.toString(); // default to pid if name not available    28.				 try {    29.					  mvm = host.getMonitoredVm(new VmIdentifier(name));    30.					  // use the command line as the display name    31.					  name =  MonitoredVmUtil.commandLine(mvm);    32.					  name = name.substring(name.lastIndexOf("\\")+1,name.length());    33.					  mvm.detach();    34.					  if ((name.equalsIgnoreCase(processName)) && (processPid != pid))    35.						  return false;    36.				 } catch (Exception x) {    37.					  // ignore    38.				 }    39.			 }    40.		 }    41.		     42.		 return true;    43. }
    The problem of all this code are the imports, that are defined only in the file tools.jar file and has a size of 11MB. But to solve this problem, I have unpacked this file and a packed a new file called VM.ZIP only with the necessary classes, and it has a size of just 81kb.

    PS: When you're debbuging the code, the processName variable will be assigned to Class Main project, for example, the name of its class is Principal and is in the package com.main, then the variable processName will be assigned as "com.main.Principal." To test you have to open another instance of Debug and it will work.
    In the release case, it will be showed the application name as we can see in the line code JOptionPane.showMessageDialog(null,processName).


    Below the file attached VM.zip.
    VM.zip

  6. The real difference between with C and other two is that : * C is structured prgramming language. * Other languages are Object Oriented programming Languages.Ok, this is correct, but the main difference between C++ and C# is that C# has more approach with High Level programming by using features like Garbage Collector and special Classes for working easily with WEB, for example. C++ lets the programmer do all the job, but gives you more powerful and speedy.

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.