Looks like SolrServer.shutdown() is the more standard approach. For embedded server, it just calls container.shutdown() anyway.
Regards, Alex. Personal blog: http://blog.outerthoughts.com/ LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch - Time is the quality of nature that keeps events from happening all at once. Lately, it doesn't seem to be working. (Anonymous - via GTD book) On Thu, Feb 7, 2013 at 1:58 PM, Ahmet Arslan <iori...@yahoo.com> wrote: > Hi, > > I think yes CoreContainer.shutdown() is the right method for embedded solr > server. > > But i believe embedded solr server is not preferred anymore after javabin > codec. And it is not well tested compared to http server. > > > --- On Thu, 2/7/13, Alexandre Rafalovitch <arafa...@gmail.com> wrote: > > > From: Alexandre Rafalovitch <arafa...@gmail.com> > > Subject: Re: What is the graceful shutdown API for Solrj embedded? > > To: solr-user@lucene.apache.org > > Date: Thursday, February 7, 2013, 8:01 PM > > Thanks, but it is not quite the same. > > I am talking about SolrJ, where Solr > > is hosted within an application, not in a servlet > > container. > > > > Regards, > > Alex. > > > > Personal blog: http://blog.outerthoughts.com/ > > LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch > > - Time is the quality of nature that keeps events from > > happening all at > > once. Lately, it doesn't seem to be working. > > (Anonymous - via GTD book) > > > > > > On Thu, Feb 7, 2013 at 12:07 PM, Ali, Saqib <docbook....@gmail.com> > > wrote: > > > > > Hello Alex, > > > > > > I asked a similar question on server fault: > > > http://serverfault.com/a/474442/156440 > > > > > > > > > On Wed, Feb 6, 2013 at 7:05 PM, Alexandre Rafalovitch > > <arafa...@gmail.com > > > >wrote: > > > > > > > Hello, > > > > > > > > When I CTRL-C the example Solr, it prints a bunch > > of graceful shutdown > > > > messages. I assume it shuts down safe and > > without corruption issues. > > > > > > > > When I do that to Solrj (embedded, not remote), it > > just drops dead. > > > > > > > > I found CoreContainer.shutdown(), which looks > > about right and does > > > > terminate Solrj but it prints out a completely > > different set of messages. > > > > > > > > Is CoreContainer.shutdown() the right method for > > Solrj (4.1)? Is there > > > more > > > > than just one call? > > > > > > > > And what happens if you just Ctrl-C Solrj > > instance? Wiki says nothing > > > about > > > > shutdown, so I can imagine a lot of people > > probably think it is ok to > > > just > > > > kill it. Is there a danger of corruption? > > > > > > > > Regards, > > > > Alex. > > > > Personal blog: http://blog.outerthoughts.com/ > > > > LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch > > > > - Time is the quality of nature that keeps events > > from happening all at > > > > once. Lately, it doesn't seem to be working. > > (Anonymous - via GTD book) > > > > > > > > > >