Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Can I run any script while starting server?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Eugeny Kozhanov  
View profile  
 More options Oct 15 2012, 3:48 am
From: Eugeny Kozhanov <ving...@gmail.com>
Date: Mon, 15 Oct 2012 00:48:21 -0700 (PDT)
Local: Mon, Oct 15 2012 3:48 am
Subject: Can I run any script while starting server?

Can I run any script while starting server? or immediately after the started
server?
TIA.
Eugeny.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Neubauer  
View profile  
 More options Oct 16 2012, 9:40 am
From: Peter Neubauer <peter.neuba...@neotechnology.com>
Date: Tue, 16 Oct 2012 15:40:04 +0200
Local: Tues, Oct 16 2012 9:40 am
Subject: Re: [Neo4j] Can I run any script while starting server?
Mmh,
that depends on what your architecture is? What are you trying to do?

Cheers,

/peter neubauer

G:  neubauer.peter
S:  peter.neubauer
P:  +46 704 106975
L:   http://www.linkedin.com/in/neubauer
T:   @peterneubauer

Neo4j 1.8 GA - http://www.dzone.com/links/neo4j_18_release_fluent_graph_literacy.html


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eugeny Kozhanov  
View profile  
 More options Oct 17 2012, 12:19 am
From: Eugeny Kozhanov <ving...@gmail.com>
Date: Tue, 16 Oct 2012 21:19:07 -0700 (PDT)
Local: Wed, Oct 17 2012 12:19 am
Subject: Re: [Neo4j] Can I run any script while starting server?

I want to start my warmup script while starting server (for example, in my
plugin).


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Neubauer  
View profile  
 More options Oct 17 2012, 5:39 am
From: Peter Neubauer <peter.neuba...@neotechnology.com>
Date: Wed, 17 Oct 2012 11:38:43 +0200
Local: Wed, Oct 17 2012 5:38 am
Subject: Re: [Neo4j] Can I run any script while starting server?
Mmh,
I don't think there is any explicit lifecycle detection, I think the
easiest way is to expose the endpoint, and call it from outside after
server startup and before you do the regular workload?

Cheers,

/peter neubauer

G:  neubauer.peter
S:  peter.neubauer
P:  +46 704 106975
L:   http://www.linkedin.com/in/neubauer
T:   @peterneubauer

Neo4j 1.8 GA - http://www.dzone.com/links/neo4j_18_release_fluent_graph_literacy.html


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Hunger  
View profile  
 More options Oct 20 2012, 8:57 pm
From: Michael Hunger <michael.hun...@neotechnology.com>
Date: Sun, 21 Oct 2012 02:57:13 +0200
Local: Sat, Oct 20 2012 8:57 pm
Subject: Re: [Neo4j] Can I run any script while starting server?
If it is for Neo4j server, look into the PluginInitializer SPI that we discussed here:

Perhaps with a plugin lifecycle.

Michael

Am 17.10.2012 um 11:38 schrieb Peter Neubauer:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eugeny Kozhanov  
View profile  
 More options Oct 22 2012, 3:40 am
From: Eugeny Kozhanov <ving...@gmail.com>
Date: Mon, 22 Oct 2012 00:40:20 -0700 (PDT)
Local: Mon, Oct 22 2012 3:40 am
Subject: Re: [Neo4j] Can I run any script while starting server?

Can you send me small example? TIA.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Hunger  
View profile  
 More options Oct 22 2012, 4:42 am
From: Michael Hunger <michael.hun...@neotechnology.com>
Date: Mon, 22 Oct 2012 10:42:42 +0200
Local: Mon, Oct 22 2012 4:42 am
Subject: Re: [Neo4j] Can I run any script while starting server?

Please see this discussion: https://groups.google.com/d/topic/neo4j/Xy9fCSX4iMM/discussion

Michael

Am 22.10.2012 um 09:40 schrieb Eugeny Kozhanov:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eugeny Kozhanov  
View profile  
 More options Nov 8 2012, 1:04 am
From: Eugeny Kozhanov <ving...@gmail.com>
Date: Wed, 7 Nov 2012 22:04:44 -0800 (PST)
Local: Thurs, Nov 8 2012 1:04 am
Subject: Re: [Neo4j] Can I run any script while starting server?

 in neo4j-server.properties I wrote:

org.neo4j.server.thirdparty_jaxrs_classes=ru.myCompany.neo4j.auto=/auto_war mup/warmup

And my class like as:

package ru.myCompany.neo4j.auto;

import org.neo4j.graphdb.*;
import org.neo4j.tooling.GlobalGraphOperations;

import java.util.Iterator;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.Produces;

@Path( "/auto_warmup" )
public class autoWarmUp {
    private final GraphDatabaseService graphDb;

    public autoWarmUp(final GraphDatabaseService gdb) {
     graphDb = gdb;
    }

    @GET
    @Produces( MediaType.TEXT_PLAIN )
    @Path( "/warmup" )
    public Response warmup()
    {
GlobalGraphOperations gg = GlobalGraphOperations.at(graphDb);
Iterator<Node> iter = gg.getAllNodes().iterator();
Node node;
int relCount = 0;
int nCount = 0;
while ( iter.hasNext() ) {
node = iter.next();
nCount++;
for ( Relationship rel: node.getRelationships() ) {
if ( rel.hasProperty("type") ) {
relCount++;

}
}
}

        return Response.status( Status.OK ).entity(
         ( "WARM UP: " + nCount + " nodes and " + relCount + "
relationships." ).getBytes() ).build();
    }

}

Can I run this script automatically on starting server?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »