Skip to content
GigaSpaces Logo GigaSpaces Logo
  • Products
    • InsightEdge Portfolio
      • Smart Cache
      • Smart ODS
      • Smart Augmented Transactions
    • GigaSpaces Cloud
  • Roles
    • Architects
    • CXOs
    • Product Teams
  • Solutions
    • Industry Solutions
      • Financial Services
      • Insurance
      • Retail and eCommerce
      • Telecommunications
      • Transportations
    • Technical Solutions
      • Operational BI
      • Mainframe & AS/400 Modernization
      • In Memory Data Grid
      • Transactional and Analytical Processing (HTAP)
      • Hybrid Cloud Data Fabric
      • Multi-Tiered Storage
      • Kubernetes Deployment
      • Streaming Analytics for Stateful Apps
  • Customers
  • Company
    • About GigaSpaces
    • Customers
    • Partners
    • Support & Services
      • University
      • Services
      • Support
    • News
    • Contact Us
    • Careers
  • Resources
    • Webinars
    • Blog
    • Demos
    • Solution Briefs & Whitepapers
    • Case Studies
    • Benchmarks
    • ROI Calculators
    • Analyst Reports
    • eBooks
    • Technical Documentation
  • Contact Us
  • Try Free

Update to project-creator.jar

Subscribe to our blog!

Subscribe for Updates
Close
Back

Update to project-creator.jar

Owen August 21, 2007
3 minutes read

Hi Again,
The changes are:
1) Added a NotifyContainer template — to use this execute the following script:
rem This script starts the projectCreator so as to create a PU containing a NotifyContainer – a SpringBean with a default method that gets invoked when a matching object appears or is modified in the space. Note this is good for a listener (a take is not performed as part of the NotifyContainer operation) and could be implemented with either a remote or embedded space.
rem In addition: This script specifies that the classpath in the eclipse project uses a GS_HOME variable in the same way the examples that come with the product do – this makes for a more portable project. Note that the build.xml file created as part of the project will still use an explicit path and will need to be edited if the project is used in a new environment and the ant tasks are invoked.
set JAVA_HOME=c:\java\jdk1.5.0_07
call %JAVA_HOME%\bin\java -jar project-creator.jar -eclipse -overwrite -project test -out C:\tmp\projectcreator -setServiceTemplateName service.javasrc -setPUTemplateName pu.xmlsrc_notifyContainer -gigaHomeVar c:\GigaSpacesXAP6.0
Notice that other than the change to the -setPUTemplateName, this script is identical to the one used for the pollingcontainer.
2) Fixed two bugs:
a) Extra HelloWorld directory is no longer created inside the processing unit directory
b) The FIXME properties offered in the templates for the pollingcontainer and notifycontainer are now inside comments in the XML so they will not break your build if you simply ignore them.
Added these simple print statements to the java templates so you can see activity as soon as you build and deploy it:
TimerTask:
System.out.println(this.getClass().getName()+” Wrote @dataObjectName “+obj);
(note: you need to uncomment the sample code block in the execute method to enable this behavior)
PollingService:
System.out.println(this.getClass().getName()+” Received @dataObjectName: “+data);

Practical Instructions for use:

  1. Run the command(s) to generate a publisher, poller, or listener processing unit project supplying args as you see fit. (see example commands in this and earlier posts)
  2. Import the project(s) into eclipse
  3. Uncomment the code in your publisher execute method to see the default behavior
  4. Run the project that declares an embedded space by right-clicking it in eclipse and selecting ‘Run As’ | ‘Open Run Dialog…’ Then select the configuration with the same name as the project you right-clicked and click ‘Run’
  5. Run any other projects that share that space – you may want to wait to start the publisher until after all listeners and pollers are started.
  6. Watch as the default print Statements prove the various pieces are communicating.
  7. Edit the java files so they perform some real logic and process real information. be sure to keep your common libraries in sync — I will provide a simpler way to manage as part of this utility in the future.

Cheers,
Owen.

CATEGORIES

  • GigaSpaces
  • Java
  • JavaSpaces
  • OpenSpaces
Owen

All Posts (36)

YOU MAY ALSO LIKE

September 18, 2009

Why GigaSpaces XAP 7.0.1 is…
3 minutes read

August 28, 2008

GigaSpaces & Maven Setup :…
3 minutes read

June 21, 2012

Trade and Event Processing at…
1 minutes read
  • Copied to clipboard

PRODUCTS, SOLUTIONS & ROLES

  • Products
  • InsightEdge Portfolio
    • Smart Cache
    • Smart ODS
    • Smart Augmented Transactions
  • GigaSpaces Cloud
  • Roles
  • Architects
  • CXOs
  • Product Teams
  • Solutions
  • Industry
    • Financial Services
    • Insurance
    • Retail and eCommerce
    • Telecommunications
    • Transportation
  • Technical
    • Operational BI
    • Mainframe & AS/400 Modernization
    • In Memory Data Grid
    • HTAP
    • Hybrid Cloud Data Fabric
    • Multi-Tiered Storage
    • Kubernetes Deployment
    • Streaming Analytics for Stateful Apps

RESOURCES

  • Resource Hub
  • Webinars
  • Blogs
  • Demos
  • Solution Briefs & Whitepapers
  • Case Studies
  • Benchmarks
  • ROI Calculators
  • Analyst Reports
  • eBooks
  • Technical Documentation
  • Featured Case Studies
  • Mainframe Offload with Groupe PSA
  • Digital Transformation with Avanza Bank
  • High Peak Handling with PriceRunner
  • Optimizing Business Communications with Avaya

COMPANY

  • About
  • Customers
  • Management
  • Board Members
  • Investors
  • News
  • Events
  • Careers
  • Contact Us
  • Book A Demo
  • Try GigaSpaces For Free
  • Partners
  • OEM Partners
  • System Integrators
  • Value Added Resellers
  • Technology Partners
  • Support & Services
  • University
  • Services
  • Support
Copyright © GigaSpaces 2021 All rights reserved | Privacy Policy
LinkedInTwitterFacebookYouTube

Contact Us