Thursday, October 11, 2007

OFBiz, The Apache Open For Business Project - Open Source E-Business / E-Commerce, ERP, CRM, POS

OFBiz, The Apache Open For Business Project - Open Source E-Business / E-Commerce, ERP, CRM, POS

I'm so glad to know that OFBiz already became a top level project of Apache community.

Look at these features:

General

  • Free & open source software
    • No license or license maintenance costs
    • No vendor, service provider, or application lock-in
    • Active and supportive community
    • You get full source code
      • You can see how everything works
      • You can track down issues quickly
      • You can change anything you want
    • Apache 2.0 Open Source License
      • You don't have to open source your changes
      • You can repackage, distribute, and even sell derivative software
      • You can say it is based on Open For Business
  • Standards based
    • It is easy to learn for those familiar with similar software
    • It is easy to reuse existing software based on the same standards
    • It is easy to integrate with other internal or partner systems
    • Based on: Sun Java, J2EE; W3C XML, HTML, SOAP; WfMC XPDL; OMG GL, Party, Product, Workflow
  • All applications built on the same framework, tools & components
    • No need to learn and use many different technologies
    • No need to integrate applications
    • No need to deal with limited features because of poor integrations between disparate technologies
    • Huge cost savings because of consistent and easy to maintain components
  • Standards based flexible and generic data model
    • Covers all major entities used in businesses
    • Provides a structure to simplify the achievement of custom data needs
    • Uses common terms for entity names to make it easier to understand and use
  • Flexible and efficient to use data layer
    • No database system lock-in; supports many different databases
    • No need to write redundant persistence code and configuration
    • Easy to use XML data definitions
    • Powerful API offers generic operations that behave differently based on data definitions
    • Most operations can be done with a single line of code and no need to write supporting code
  • Loosely coupled multi-layer component architecure
    • It is easy to customize and reuse components
    • It is easy to build new applications through the composition of existing components
    • It is easy to find code and other components based on consistent patterns
    • Components can be replaced without breaking other components because of well defined and managed dependencies
  • Distributed architecture
    • It is easy to scale multiple servers or pools of servers
    • It is easy to seamlessly integrate & communicate with other systems
  • Service based logic layer
    • All logic modeled as a service
    • Makes it easy to reuse logic
    • Services can be automatically exposed as Web Services
    • Makes it easy add custom user interfaces, even many at once
    • Makes it easy to distribute the system over multiple servers
    • Makes it easy to communicate with other systems
  • Advanced web application framework
    • Separates input processing logic, view data preparation logic and view presentation templates
    • Supports many different types of logic, including scripting languages and services
    • Supports many different types of view templates including XML/XSLT, FreeMarker, Velocity, JSP, and any other
    • Tracks all visits and page hits for security and marketing purposes
    • Keeps statistical traffic and performance data since server start and in time bins


Applications

eCommerce

  • Perfect for B2C and B2B eCommerce
  • Can be easily configured for secure or public catalog viewing
  • Supports automatic switching from HTTP (insecure) to HTTPS (secure) and back based on protection desired for each page
  • Product Finding
    • Product search
      • Supports any combination of constraints per search, including keyword, category, feature, and other constraints
      • Indexed Product Keyword Constraints
        • Can search for all keywords specified or any keyword specified
        • Configurable stop words are removed during indexing and searching so they won't affect search results
        • Configurable suffixes (such as -y, -ies, etc) are removed during indexing so they won't affect search results
        • Different product fields can be weighted differently when indexing
      • Category Constraints
        • Can restrict search to products in a given category; this makes it possible to only have the products for the active catalog show up in keyword search results and other effects
        • Can search in a category and include all child categories
        • Can include multiple categories in the search to get a cross section of products in the categories, ie the products must be in all categories
      • Can restrict search to products with a given feature applied
      • Search results are ordered by default based on keyword weights determined during indexing, other orderings are supported as well
      • When search results are presented all constraints are listed that were used in the search and any one can be removed
    • Product category browse
      • Expandable browse tree shows current category context in the left column on relevent pages (by default)
      • Products in a category can be layed out with different templates assigned to different categories, and different sub-templates assigned to different products
      • By default 10 products are shown at a time and you can go to previous and next pages (these settings are easily changed)
      • Products can belong to multiple categories
      • Sub-categories can belong to multiple parent categories
      • Root browse category will change automatically based on the settings associated with the active catalog
      • All product, category and catalog associations are effective dated with from and thru dates
      • Unlimited number of products, categories and catalogs
    • Product detail view
      • Displays large product image (if one is specified), with a link to the detail image (if one is specified)
      • Displays all relevant product information including name, short & long descriptions, price, whether or not inventory is available, etc
      • Displays all cross-sells, up-sells, products deprecated by this product, products that deprecate this product, and any other desired associated product through simple template changes
      • For products with variants (aka "virtual" products) shows drop downs for each feature type that is associated as a selectable feature; to handle available feature combinations shows all avilable in the first drop down, and each additional one is populated when a selection in a previous drop-down has been chosen
      • For products with variants can display small images for each of the features of the first selectable feature type; a useful application of this is having the color be the first selectable feature type and having small images for each different color; when large images are associated with the variant products the large image will change as corresponding features are selected in the drop-down(s)
      • Displays links to previous and next products in the current category for easy browsing through the details of a given category
      • With flexible product attributes and features additional structured information can easily be added and displayed just how you want
    • Special categories
      • Shown on special pages like the main page
      • Examples include top 10 most popular, promoted items, new items, etc.
      • These categories are attached to the active catalog
    • Cross-sells and up-sells
      • Modeled as special types of product associations
      • Can also include product deprecations, marketing packages, etc
      • Shown on the product detail page for each product
    • Shopping cart random cross-sells
      • Random cross-sells are chosen from all items currently in the shopping cart
      • Shown three at a time; when more than three unique products are available a different set is chosen on each new page
      • As a product is added to the shopping cart it is no longer shown
      • Displayed on the shopping cart detail page
      • Displayed in a small box in the right column underneath the mini shopping cart on relevant pages (by default)
    • Quick re-order
      • Re-order list built from products previously ordered
      • List is weighted by quantity ordered and frequency of ordering
      • Default re-order quantity is an average of all quantities previous ordered for a given product
      • Only the top five are shown at any given time
      • As a product is added to the shopping cart it is no longer shown
      • Displayed in a small box at the bottom of the right column on relevant pages (by default)
  • Promotions
    • Promotion Conditions Supported
      • Cart Sub-total
      • Total Amount of Product
      • X Amount of Product
      • X Quantity of Product
      • Account Days Since Created
      • Party
      • Role Type
    • Promotion Actions Supported
      • Gift With Purchase
      • Free Shipping
      • X Product for Y% Discount
      • X Product for Y Discount
      • X Product for Y Price
      • Order Percent Discount
      • Order Amount Flat
    • Use limits per order, customer, promotion
    • Promotion Codes
      • Can be required for promotion to apply
      • Use limits per customer, code
      • Can be restricted to only allow use by a customer with a specific email address or party ID
    • Can associate products and/or categories with the entire promotion or a specific condition or action, support include, exclude, and always associations
    • With conditions and actions can support buy X get Y free (or for Z% discount) and many other options
  • Rule Based Pricing

  • Customer Profile

  • Shopping Cart & Checkout Process

  • Order History

  • Affiliate & Marketing Data

Party Manager

Note: A Party can be either a Person, or a group of Parties. A Party Group could be a company, an organization within the company, a supplier, a customer, and so forth. Information that describes Parties or is directly related to Parties is contained in these entities.
  • Party Types: Persons and Groups
  • Finding Parties
  • Party Data Maintenance
    • Personal Data
    • Organization Data
    • UserLogin & Security Data
    • Contact Mechanisms: Telecom Number, Postal Address, Email Address, Web Page Address, etc.
    • Payment Mechanisms: Credit Cards, EFT Accounts
    • Party Roles
    • Party Relationships
  • Security Data Maintenance
    • Security Permissions
    • Security Groups
    • UserLogin Group Membership
    • Group Permission Association

Marketing Manager

  • Tracking Code Management
  • Marketing Campaign Management
    • Central place to track marketing activities
    • Right now includes promotions and tracking codes

Catalog Manager

Everything involving your products that will be seen by your customers is managed from here.
  • Product Stores
    • Identify the venue from which sales will be made
    • Select which stores will handle which catalogs, categories and products
  • Product Catalogs
    • Create new catalogs
    • Develop collections of products or categories, assigning them to their related catalogs
    • Associate product with price, location, availability, features, graphics, and other details
  • Product Categories
    • Specify what products or features will be gathered under what categories
    • Create categories as needed here
  • Products
    • Define products
    • Describe products
    • Associate graphic images with products
    • Gather information on facilities, inventory, content, IDs, keywords, associations, suppliers, attributes, and more
  • Product Features
    • Add, delete or modify features as shown in the catalog for any product
    • Changes to features can be date defined to start and to stop
  • Price Rules
    • Prices can be modified at a working employee or ordering level when the rules are defined here for price variations such as discounts, special sales conditions, etc.
    • Create names (IDs) for prices rules to be applied to events, categories, products, stores, etc.
  • Promotions
    • Define product promotions
    • Specify text for promotion
    • Specify rules for administration
    • Identify stores for applicability
    • Assign tracking codes

Facility Manager

  • Facility Management
    • Facility
      • Facility can be a Warehouse, Retail Store, Office, Building, Meeting Room, etc, etc.
      • Inventory & Warehouse Management
        • Inventory Location Management
        • Pick/Primary and Bulk Location Management, set thresholds for recommend replenishment stock moves
        • Inventory Management: Quantity On Hand & Available To Promise with Order Inventory Reservations and Item Issuance for Shipments
        • Pick & Pack Management with picklist generation, supports limited number of orders per picklist, sorts list by location, can generate pick lists separately for different shipment methods
        • Handles order splitting preference to ship all at once or as available
        • Order only included in picklists when sufficient inventory is on hand in pick/primary locations
        • Streamlined or detailed packing and shipping processes with serial scale support for weighing and label printing support

    • Facility Group
      • Grouping facilities under a common topic enables consolidated assignments or instructions
      • Group features
        • Rollups (parent/child relationships)
        • Role assignments
          • Party to group
          • Group to party
        • Time of existence or relationship
          • From
          • Thru
  • Shipment Management
    • Parties
      • Contact mechanism content
    • Automatic Shipment Creation from Purchase and Sales Orders
      • Estimated Costing
      • Latest Cancel Date
    • Shipment Scheduling
    • Shipment Items
    • Shipment Packages
    • Shipment Item Package Assignment
    • Shipment Route Segments
    • Shipment Package Route Segment Assignment
    • Generate a Shipment Plan
    • UPS XML-based Integration (XPCI)
      • Confirm Shipment (gets tracking number, pricing and other information)
      • Accept Shipment (gets shipping label image and finalizes the shipment)
      • UPS then knows what to pickup and has all information about shipments and packages
      • Void Shipment
      • Track Shipment (updates tracking info)

Order Manager

  • Search for existing orders
    • By Order ID or Customer PO#
    • By Product ID
    • By Role Type
    • <>By Party ID or User LoginID
    • By Order Type
    • <>By Store or Web Site
    • By Status
    • With Date Filter
  • View existing orders
  • Order Entry
    • Sales Orders
    • Purchase Orders
  • Purchase Order Receipt Scheduling
  • Back Orders: includes customer notification, delivery estimates, partial CC settlements, CC refunds, etc
  • Returns & Refunds: based on order items, track reasons, put refunds on CC, billing account, mail a check, store credit, etc; assisted creation of replacement order

Accounting Manager

  • General Ledger Accounts
    • View Chart of Accounts
    • Create New GL Account
    • Edit an existing GL Account
  • Billing Accounts
    • Find a Billing Account
    • View/Edit a Billing Account
      • Delete
      • Update
      • Modify Roles
      • Modify/Create new Terms
      • Find/View Invoices
      • Payments
  • Invoices
    • Find/View existing Invoices
    • Automatic Invoices from Purchase and Sales Orders
  • Payments
    • Find a Payment Received
      • by Payment ID
      • by Payment Method Type
      • by Status
      • From/To Party
      • with Date Filter
    • Record a Manual Transaction

Work Effort Manager

  • Track work efforts
    • Tasks & to-do items
      • Hierarchical items for projects, phases, tasks, sub-tasks, etc.
      • Assign items to multiple parties
      • Track priority, cost estimates, etc
      • Track estimated and actual: start times, end times, durations
    • Calendar events
      • Manage shared and private scheduled calendar event
      • View by day, by week or by month
      • Notify other parties of events, tasks, assignments, and accomplishments
    • Workflow activities
      • View all activities assigned to you
      • View all activities assigned to a role or party group that you belong to
      • Update the status of your involvement in the activity
      • Based on your status updates the system will automatically update the activity status
      • Custom templates and views can be added to display information related to each activity from the workflow process context or other database data
    • Work efforts are associated with the cost side of the Cost-Benefit analysis; to manage both sides of the comparison work efforts can be associated with requirements or requests
  • Track requests
    • Supports requests: for support, for features, for fixes, for information, for quotes, for proposals
    • Associate requests with requirements
    • Associate requests with work efforts (tasks, projects, etc)
    • Each request consists of multiple items, each of which contains details about what is desired
    • The request acts as a package of multple desired items
    • Each request item contains a "story" of what is desired
    • In the Cost-Benefit scheme of things a request is associated with the benefit side; costs are associated with the resulting work efforts, allowing you to track and manage BOTH sides of the comparison
  • Track requirements
    • Used to internally manage required features for a product
    • Usually based on requests, or request items to be more accurate
    • Each requirement contains a "use case" for a more formal description of what is to be created
    • Requirements are also on the benefit side of the Cost-Benefit analysis, but the benefits are generally better understood through associated requests

Content Manager

  • Web Site Management
    • Create sites
    • Modify sites
    • Associate parties
    • Assign Hosts and Ports
    • Establish Standard and Secure Content Prefix
    • Specify Cookie Domain
  • Dynamic Survey Management
    • Create survey
    • Find existing survey
    • Edit existing survey
  • General Information/Concepts
    • Basic Content application screens for creating/updating content, data resources, meta data, content structure, etc.
    • Use slightly modified WYSISWIG editors from WSPublisher for editing of HTML, XML, plain text and other content
    • Tools to mount content structures as webapp resources
    • Associate parties with content for administrative purposes or for things like keeping track of who has read and who must read specific content
    • Categorization and security features so that sets of content can be administered and view by limited groups of users.
    • FreeMarker/XSLT/Velocity to allow for templating in content text, makes it more flexible like JSPs for dynamic content when needed
    • Utility transforms put in the FreeMarker context for content templates that allow for including other content, refering to external resources such as images, javascript files, CSS files, etc.
  • Data Resource Management
    • Powerful search engine to find existing resources
    • Specify/Identify resources
    • Locate/Edit Text, HTML, Images, Attributes, Roles and Product Features
  • Content Management
    • Specify the Content Setup by updating the Content Type ID for Parent TYpe Id, description, etc.
  • Layout Editor

WebTools

  • Cache Tools
    • Cache Maintenance
      • View cache size and hit/miss statistics
      • Clear all caches, individual caches, even individual cache lines
      • Clear all expired cache entries
      • Manage cache prameters such as size limit, expire time, soft references, etc
      • View inidividual elements in each cache
  • Debug Tools
    • Adjust Debugging Levels
      • Adjust debug log message levels as the application is running
      • Changes here stay until the server is shut down
      • For permanent changes, use the debug.properties file
  • Entity Engine Tools
    • Entity Data Maintenance
      • Find, view, create, update, and remove data in any entity
      • Works dynamically according to entity definitions
      • Uses flexible permissions to allow access to all entities, or to a specific set of entities
    • Entity Reference & Editing
      • Displays detail about all defined entities including fields, types, table & column names, relationships, etc
      • In main view frame entities are sorted alphabeticly by package
      • In the left frame there is an alphabetical list of package and an alphabetical list of all entities
      • Relationships are displayed with links to the related entities, making it easy to browse the data model
      • An editing page can be used to create and modify entity definitions in memory
      • A page that compares entity definitions to the database (just like what is done on startup) and optionally adds missing tables and columns to the database
      • Templates that write the entity model and entity group model XML files in a consistent way for easy comparison (note that these must be used to save in memory entity definition changes); these templates can also be used to output this information to the browser
      • A template that reads database meta-data and creates first pass XML entity definitions which can then be refined according to your preferences
    • XML Data Export
      • Exports data from entities as an XML file
      • The XML is structured such that there is one element for each entity instance, and one attribute or sub-element for each populated field in the entity
      • The XML file can be saved to the disk on the server or delivered through the browser to be viewed and/or saved on the client
      • High performance and scalable stream based output technique can export an unlimited number of entity instances in each pass
    • XML Data Import
      • Imports data from entities in an XML file
      • The XML is structured such that there is one element for each entity instance, and one attribute or sub-element for each populated field in the entity
      • The XML file can be loaded from the disk on the server or uploaded through a form in the browser
      • High performance and scalable stream and SAX based input processing technique can import an unlimited number of entity instances in each pass
  • Service Engine Tools
    • Job List
      • View all scheduled "job" services
      • Displays job ID, start date/time, finish date/time, and service name to invoke
    • Schedule Job
      • Allows the manual scheduling of a named service
      • Can specify interval size and count
      • Can specify an absolute start and finish date/time
      • Can manually add data to the persisted context used for running the service
    • Thread Viewer
  • Workflow Engine Tools
    • Workflow Monitor
      • View all running processes
      • Displays package & version, process & version, status, priority, start date, etc for each process
      • Can drill down to see all activity instances that are part of the process
      • Displays activity ID, priority, status, start date, complete date and assignments for each activity
      • Links to activity management page in the Work Effort Manager for each activity
      • Links to party profile management page in the Party Manager for each party assigned to each activity
    • Read XPDL File
      • Reads, verifies, and displays an XPDL file
      • Can be located in a file on the server or at any URL location
      • Can verify only, or also write the data to the database for workflow process execution
  • Rule Engine Tools
    • Logikus - Run Rulesets
      • Provides a web-based user interface for querying a ruleset containing facts and inductive rules
      • Currently only supports backward chaining
      • Can determine one result at a time or all results at once
      • Many example rulesets are included for experimentation
  • Data File Tools
    • View Data File
      • Displays data from flat files based on a format definition file
      • Can write the data file back out to verify the format definition and read/write repeatability
      • Can load data file and format definition file from a URL or file on the server
  • Misc. Setup Tools
    • Edit Custom Time Periods
      • Browse, create, update, and delete hierarchical custom time periods
      • Time periods can be associated with an organization party, and browsing time periods can be filtered by party ID
      • Manages fiscal years, quarters, months, bi-week, week and any custom period type
      • Track a period number, period name, from date and thru date with each time period
    • Edit Enumerations

    • Edit Status Options

  • Server Hit Statistics Tools
    • Stats Since Server Start
      • Displays server load and performance statistics for each resource, group of resources, and for all resources
      • Tracks data about different types of resources including requests, events and views
      • Displays accumulated data since the server started
      • Links to pages that display the same data for specifc time bins
      • Time bin data is persisted for future analysis


Great!!! Come on, build your applications by using this pure free and open source technology.

Java HotSpot VM Options

Java HotSpot VM Options

A collection of java VM options.


Some Useful -XX Options


Default values are listed for Java SE 6 for Solaris Sparc with -server. Some options may vary per architecture/OS/JVM version. Platforms with a differing default value are listed in the description.

  • Boolean options are turned on with -XX:+ and turned off with -XX:-.
  • Numeric options are set with -XX:. Numbers can include 'm' or 'M' for megabytes, 'k' or 'K' for kilobytes, and 'g' or 'G' for gigabytes (for example, 32k is the same as 32768).
  • String options are set with -XX:, are usually used to specify a file, a path, or a list of commands

Flags marked as manageable are dynamically writeable through the JDK management interface (com.sun.management.HotSpotDiagnosticMXBean API) and also through JConsole. In Monitoring and Managing Java SE 6 Platform Applications, Figure 3 shows an example. The manageable flags can also be set through jinfo -flag.

The options below are loosely grouped into three categories.

Monday, October 8, 2007

做了一个事业类型测试(PsyTopic.com制作)

结果如下:
PsyTopic分析:您的得分介于100分到139分: 爱幻想,思维较感性,以是否与自己投缘为标准来选择朋友。性格显得较孤傲,有时较急噪,有时优柔寡断。事业心较强,喜欢有创造性的工作,不喜欢按常规办事。性格倔强,言语犀利,不善于妥协。崇尚浪漫的爱情,但想法往往不切合实际。金钱欲望一般。

Wednesday, September 26, 2007

Good and Bad Reasons to Open Source Your Software @ ENTERPRISE OPEN SOURCE MAGAZINE

Good and Bad Reasons to Open Source Your Software @ ENTERPRISE OPEN SOURCE MAGAZINE

Look at this:
Three Worst Reasons
Open sourcing your software isn't always the best business strategy. This section reviews some of the worst reasons you can have to open source a particular technology or create a new open source project:
  1. You have obsolete software that you want to get rid of and you think that open sourcing it is a good way to get rid of it.
  2. You're looking to leverage free engineering from the open source community and by open sourcing you think open source developers will lineup to contribute to your project.
  3. You have software that you don't need anymore and instead of terminating the project or canceling it, you decide to open source it and then call it a win.

In my perspective, most of the companies have this kind of idea when they decided to open source their codes. IBM, Borland, Sun or some one else. And yes, they call it success.
A real funny thing.

SSH tunnel and vnc

Creating an SSH tunnel for secure authentication (Windows)

ssh -N -L 9090:remote-internal-system:80 root@gateway-hostname

and please keep the session on


and vnc to the remote-internal-system:
a. setup vncserver on remote-internal-system
b. vncviewer -via root@gateway-hostname remote-intenal-system
actually this step is the same as ssh tunnel: ssh -f -L 5599:remote-internal-system:5900 root@gateway-hostname

I google a lot, and this is the simplest solution.

create xen VM via xenguest-install.pyi

FC5Zimbra - Xen Wiki

Create And Boot The Initial Xen Guest

The initial Xen guest domain will be named xen0, and will be built on a logical volume. First, run a couple of checks to verify the Xen kernel booted and that xend is running OK.

  • uname -r
    2.6.15-1.2054_FC5xen0
  • xm list
    Name ID Mem(MiB) VCPUs State Time(s)
    Domain-0 0 2487 2 r----- 467.5

Next, remount the install disc, start the vsftpd server, and create a 2 GB logical volume named xen0 (for the first guest).

  • mount -o loop /dev/hda /var/ftp/pub
    service vsftpd start
    lvcreate -L 2G -n xen0 xen

Use the xenguest-install.py tool to create the first Xen guest image. If all goes well, a text-based install script will start. The various options to xenguest-install.py are shown

  • -n xen0 Name Of Xen Guest

  • -f xen0 Pathname To Logical Volume To Use For Guest

  • -r 256 Memory To Allocate For Guest

  • -l ftp://192.168.151.6/pub/ Location Of FC5 Install Disk. The IP address is to the vsftpd server. Since the guest won't know the DNS domain, use the raw IP address. The guest is connecting over a virtual IP network, so 127.0.0.1 won't work either.

    xenguest-install.py -n xen0 -f /dev/xen/xen0 -r 256 -l ftp://192.168.151.6/pub/

The xenguest-install.py script will start a text-based installation script almost identical to what you would see with a default FC5 installation. Early in the installation, the option to switch to a VNC-based GUI will be presented. Text-based is quicker, but VNC does a better job of package selection (and it's kind of cool), so take your pick.

  • To use the VNC method, connect to the provided IP address from a VNC client from elsewhere on the network. A GUI install script will appear in the VNC client window. Proceed through install process, setting parameters as necessary. The script creates a virtual hard disk, /dev/xvda. Unless you have specific needs, you should probably let the install script automatically partition the virtual disk. Do a custom package selection, deselecting everything but Yum and OpenSSH server/client packages. Complete the installation.
  • To use the text-based install process, everything will be functionally the same as the VNC method above, except for deselecting software packages. You won't be able to drill down into package groups, so just deselect everything. This will install a few unnecessary packages and services, which can be removed later if necessary.

After the guest installation script complete, control is returned to the xenguest-install.py script, which will hopefully indicate success and then exit. It is now (way past) time to start the first Xen guest. To start the guest, use the xm command. The xm command is used to manage all Xen clients. For a synopsis of availabe options, simply enter xm.

  • xm create -c xen0

The console window of the guest will appear, including a text-based GRUB screen, followed by normal boot/init messages, concluding with a login screen. To break from the console and return to the host, enter CTRL-] (control key plus the right-bracket key). To list the running Xen guests from the host (Dom0), use the "xm list" command as shown below.

  • xm list
    Name ID Mem(MiB) VCPUs State Time(s)
    Domain-0 0 2487 2 r----- 755.5
    xen0 18 256 1 -b---- 14.4

To return to the Xen guest's console, enter the following command from the host.

  • xm console xen0 


Monday, September 24, 2007

Solving too many open named pipes in a java process

Too many open named pipes in a java process...


Too many open named pipes in a java process..

In a java process (that uses JNI and socket communications), I get "Too
many open files" error.

When debugging further using lsof or pfiles, (with the process id), I
saw many named pipes (FIFO) in open state.

lsof:
jsvc 10805 userid 951w FIFO 0,6 2989015 pipe
jsvc 10805 userid 952w FIFO 0,6 2988104 pipe
jsvc 10805 userid 953w FIFO 0,6 2989588 pipe
jsvc 10805 userid 954w FIFO 0,6 2988290 pipe
jsvc 10805 userid 955w FIFO 0,6 2988626 pipe

there are more than 500 processes opened.

Obviously there might have some streams I didn't close.

And the usage of Runtime.exec() will also cause the pipe here. The inputstream, outstream, errorstream should be closed.