Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question
0

Debugging an app in a GigaSpaces container in Eclipse

I followed the instructions in the Remote Debugging section of the 'Running and Debugging within your IDE' tutorial but cannot get it to work.

Here's what I did:

  1. Add this to the GSC_JAVA_OPTIONS env variable in gs-agent.bat. -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000

  2. Run the batch file and see the 'listening on port 8000; message

  3. Using localhost:8000 within an Eclipse Remote Java Application debug configuration, start the Debug process.
  4. I see the batch file at this point progress, so I know it is connecting.
  5. Now when I run the gs-ui.bat file and GigaSpaces Management Center comes up, I don't see the instance registered.

If I take out the debug options and restart gs-agent.bat, everything works fine.

I was hoping to debug into my processor app while it is running in the GigaSpaces container.

Has anyone done this?

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=4021]{quote}

asked 2013-01-16 10:17:37 -0500

rickfish gravatar image

updated 2013-08-08 09:52:00 -0500

jaissefsfex gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

Rick,
If you need the debug your PU within eclipse you don't need to use remote debugging.
Use the Integrated container , run the PU within eclipse and just have a break point. Eclipse will break as usual.
See:
http://wiki.gigaspaces.com/wiki/display/XAP91/RunningandDebuggingWithinYourIDE#RunningandDebuggingWithinYourIDE-UsingIntegratedProcessingUnitContainerintheIDE

Shay

answered 2013-01-16 10:25:31 -0500

shay hassidim gravatar image
edit flag offensive delete link more

Comments

Thanks Shay...yes I did see that but I could not figure out how to deploy my app to my Integrated Container...I have been using the gs-ui.bat file to bring up the GMC and deploying using the admin facilities. Is there any way to attach the GMC to my Integrated Container or do I need to use the GigaSpaces API to deploy the apps?

rickfish gravatar imagerickfish ( 2013-01-16 10:54:03 -0500 )edit

Rick,

You don't need to start anything to deploy your PU within the IDE. Just have new eclipse configure to use the integrated container as main class as described in the doc. If you have the pu.xml in the right location (\src\META-INF\spring\pu.xml) the integrated container will pick it up and run the PU instance within your IDE. You can run actually a clustered PU using the relevant main arg setting.

Shay

shay hassidim gravatar imageshay hassidim ( 2013-01-16 16:19:59 -0500 )edit

Shay, thanks for your response.

I wish there were a beginners section to the forum because that is what I am. While I think the Gigaspaces documentation is plentiful I find it lacking (even in the Quick Start guide section) on doing what seems like simple setup tasks like this.

So I apologize for the simple question :)

I have gone through the basic stuff and can deploy a 'processor' app using the Management Center UI but have no idea the mechanics of doing it through a pu.xml.

Rather than taking up your valuable time with a lengthy exchange, can you point me to a document that goes over this? I have already created a Java Application profile in Eclipse and can launch an instance and see the output in the Eclipse console using this pu.xml: <beans ...>="" <os-core:space="" id="space" url="/./dataGrid"> </os-core:space> </beans>

and I have created a 'feeder' and 'processor' and exported their jar files (with their own pu.xml files) to the file system and deployed them using the GSMC UI to a GS instance.

But I don't know how to 'deploy' these using the pu.xml only.

Please bear with me...I truly am new to this platform.

rickfish gravatar imagerickfish ( 2013-01-17 07:44:33 -0500 )edit

Rick, You have a very valid question. Many times the best way to be familiar with GigaSpaces is to go through the training. Within 2-3 days you will get all the knowledge required to build your application with GigaSpaces. You can join on of our public training or have a costume training that got your exact needs scheduled. The documentation provides users info about: - Specific topics. Info about each product feature described in details. - Quick start guide with tutorials for different scenarios the product support for different user levels. The one that seems to fit your scenario located [here|http://wiki.gigaspaces.com/wiki/display/XAP91/Your+First+XTP+Application]: In Step Two - Creating the Hello World Application) you will see the “Compiling and Running the Application within your IDE” section that will guide you how to run the different processing units within your IDE. You don’t need to run the gs-agent and GSC to run your application within the IDE. All you need is to create an eclipse Run configuration that is using the org.openspaces.pu.container.integrated.IntegratedProcessingUnitContainer as described [here|http://wiki.gigaspaces.com/wiki/display/XAP91/Running+and+Debugging+Within+Your+IDE]. Please let me know if this helps. Shay

shay hassidim gravatar imageshay hassidim ( 2013-01-21 09:48:50 -0500 )edit

Thanks Shay. That response was very helpful...

rickfish gravatar imagerickfish ( 2013-01-25 08:18:49 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-01-16 10:17:37 -0500

Seen: 677 times

Last updated: Jan 16 '13