How Ignite Launch the ./libs customer Jar - deployment

Need help, or give a link, or give a hint on this deployment,
Ignite Jar deployment case,
Say I have a jar package with the main-class defined, and put it into the ./libs folder, what will the ignite do, ignite how to launch this Jar? Which is the endpoint for Ignite launch this Jar?
Any specification for the Jar to the ./libs, btw , is there a full example of the userversion xml of ignite.xml, if put below content into the ignite.xml, ignite shows cannot recognize the userVersion tag,
<!-- User version. -->
<bean id="userVersion" class="java.lang.String">
<constructor-arg value="0"/>
</bean>
my problem is don't know what ignite launch this Jar, I expect ignite can help launch the Jar main-class, and monitoring the cache put event, and it will fire the compute/tasks. And which is a loop forever.
Thanks a lot.

Ignite is not going to launch main-classes from JARs that you put to libs/. However, your code can be used from Apache Ignite APIs and elsewhere after you do that.

Related

Getting error "Missing elastic.cluster and elastic.host...." while running indexer job in nutch in eclipse

I have configured apache nutch 1.13 with solr 5.5.0 and hbase 0.90.6 in eclipse. Now, I am able to run the jobs from injector to invertlinks, but while running indexing job it throws error "Missing elastic.cluster and elastic.host....". I have set indexer-solr under plugin.includes in nutch-site.xml file. But still getting these error. Can anybody help me why this is happening?
The problem is with the nutch-site.xml. If you see there are two nutch-site.xml; one is under the conf folder and other is in src/test folder. We generally configure nutch-site.xml file under conf folder but when we import it in eclipse, it considers that file under src/test folder. So the way to fix this error is to configure your setting under src/test folder. Generally that file contains very basic config, you need to replace
<property>
<name>plugin.includes</name>
<value>.*</value>
<description>Enable all plugins during unit testing.</description>
</property>
with below lines
<property>
<name>plugin.includes</name>
<value>protocol-http|urlfilter-regex|parse-(html|tika)|index-(basic|anchor)|indexer-solr|scoring-opic|urlnormalizer-(pass|regex|basic)</value>
<description>Regular expression naming plugin directory names to
include. Any plugin not matching this expression is excluded.
In any case you need at least include the nutch-extensionpoints plugin. By
default Nutch includes crawling just HTML and plain text via HTTP,
and basic indexing and search plugins. In order to use HTTPS please enable
protocol-httpclient, but be aware of possible intermittent problems with the
underlying commons-httpclient library. Set parsefilter-naivebayes for classification based focused crawler.
</description>
</property>
So if you want to use solr then use indexer-solr, elastic then indexer-elastic and so on.
Hope this help others.

Red5 server Integration with C application

I am newbie to Red5 server. I have a C command-line application which outputs RTMP stream to given ingestion point. Now I am writing a wrapper application to automate (on the fly) Red5 application creation/configuration and RTMP stream ingestion in a single command. Here are my query:
Once I create/Configure Red5 application do I need to restart Red5 server to publish streams or it will be published automatically??
More queries on the way. Many thanks in advance.
I explored further about Red5 and found that applications can be deployed without having to restart Red5 server. Here are the steps to do that:
Create/Configure Red5 application as per your requirement.
Create a war file out of your config directory.
place the generated war file under /webapps/
Red5 uses a War deployment Bean which can be identified as the warDeployService. This is a scheduler service with watches for new Red5 applications in the webapps directory. New applications must be deployed as .war files. When the warDeployService discovers a new .war file candidate it attempts to extract it automatically and install the Red5 application in less than 10 minutes.The warDeployService checks for new war files as defined by the bean descriptor(checkInterval).The service may fail if your .war file is not packed in appropriate structure.
Note: Packaging .war file of your application may not be same as “Export as War” feature in eclipse, due to difference in application structure.
The Red5 warDeployService bean can be found in the file /conf/red5-common.xml located in Conf directory as shown below.
<!-- War deployer -->
<bean id="warDeployService" class="org.red5.server.service.WarDeployer" init-method="init" destroy-method="shutdown">
<property name="scheduler" ref="schedulingService"/>
<property name="checkInterval" value="${war.deploy.server.check.interval}"/>
<property name="deploymentDirectory" value="${red5.root}/webapps"/>
</bean>
War file polling time is 10 Mins(600000 in milliseconds) by default. It can be configured in /conf/red5.properties file.
war.deploy.server.check.interval=600000

Add new workflow into Alfresco share

I'm new to Alfresco/Activiti.
Our company is using Skelta BPM.NET (in integration with our self developed RMS) and now we would like to take a look into other BPM software.
I last days I found our how to create new workflow using Eclipse and Import them into standalone installation of Activiti.
Now I would like to publish this workflow into Alfresco share. Is there any easy way to do that? I was searching whole day on Google but didn't find anything useful.
And another question about installation:
Is it possible to install Activiti with all it's webapps on the same tomcat, that alfresco is running on? That Apache Ant can build only standalone installation. So can this two application be merged?
Thanks for your info, Anze
If you place your BPMN 2.0 process definition XML somewhere in the Alfresco classpath, you can use Alfresco's workflow console to deploy the definition.
For example, I always place my workflows under WEB-INF/classes/alfresco/extension/workflows/someFolder where someFolder is a unique folder for each process definition I am using.
The workflow console is in http://localhost:8080/alfresco/faces/jsp/admin/workflow-console.jsp. Assuming you are using 3.4.e, which is a preview release showing Activiti integration, you can deploy a process through the workflow console with this command:
deploy activiti /alfresco/extension/workflows/activiti/activitiHelloWorld.activiti
You can see other helpful workflow console commands by typing help.
Alternatively, as Gagravarr suggests, you can use Spring to deploy your workflow when Alfresco starts up. The Spring config file must have a name ending with "-context.xml". I usually place mine in WEB-INF/classes/alfresco/extension.
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<bean id="someco.workflowBootstrap" parent="workflowDeployer">
<property name="workflowDefinitions">
<list>
<props>
<prop key="engineId">activiti</prop>
<prop key="location">alfresco/extension/workflows/activiti/activitiHelloWorld.bpmn20.xml</prop>
<prop key="mimetype">text/xml</prop>
<prop key="redeploy">false</prop>
</props>
</list>
</property>
<property name="models">
<list>
<value>alfresco/extension/model/scWorkflowModel.xml</value>
</list>
</property>
<property name="labels">
<list>
<value>alfresco.extension.messages.scWorkflow</value>
</list>
</property>
</bean>
</beans>
If you'd like working examples of some simple workflows, with the same workflows implemented for both jBPM and Activiti for easy comparison, take a look at this blog post: http://ecmarchitect.com/archives/2011/04/27/1357
Jeff
For the second part of your question:
If you want to use Alfresco with Activiti, then you should try the 3.4.e release (or a recently nightly build). 3.4.e has Activiti build in, so you don't need to do any merging of webapps. It's all already there for you.
For the first part, as long as you're using 3.4.e (or a later nightly build), then you ought to be able to deploy to Activiti in much the same way that you would previously deploy to JBMP. The Workflow With Activiti wiki page ought to help you with this too, as might this wiki too.

Transforming XSD Import for WSDL in Spring WS

I'm tring to extend the example in chapter 5 of the Spring WS guide. I'm using Spring WS 1.5.9 .
I've added ...
<import namespace="http://myco.com/schemas/promotion/v1_2"
schemaLocation="http://localhost:8080/ordersService/Promotion_1_2.xsd" /> ...
But spring doesn't appear to be transforming the location of the import like it does for the port. So on my company website it still shows "localhost:8080"
I have the WSDL generation defined as such
<bean id="orders" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition">
<property name="schema" ref="schema" />
<property name="portTypeName" value="Orders" />
<property name="locationUri" value="http://localhost:8080/ordersService/" />
Does/Can Spring Framework transform the imports some way ???
UPDATE: Some more background....
We use the same XSD with the maven JaxB2 plugin to build our response schema objects. That all works great, and we use the Catalog resolver to actually find the addional business domain XSDs in an included JAR file. We have 100's of XSDs that describe our business domain.
SO i'm trying not to break that.
What I would like to see is a more detailed example. An example where JaxB2 is used and XSD -> WSDL functionality.
Should I refactor the XSDs ?
Should I use a WSDL and not an XSD
How do I properly idenitfy the XSDs to spring ?
Do I use "classpath:My_file.xsd" ? Will I have to list possibly 100's of XSDs to schemaCollection ?
The spring Docs are great but I would like a practical example that matches.
I want to add detail on the solution we ended up with. We have been moving to Spring WS 2x. Here's an updated link...
http://static.springsource.org/spring-ws/site/reference/html/server.html#server-automatic-wsdl-exposure
The trick / key was in that section it says... "If you want to use multiple schemas, either by includes or imports, you will want to put Commons XMLSchema"
So that was the final answer to add that to our project.
<dependency>
<groupId>org.apache.ws.commons.schema</groupId>
<artifactId>XmlSchema</artifactId>
<version>1.4.7</version>
</dependency>
Now spring enables additional functionality to allow classpath resolution to work.
Spring-WS can automagically inline all schema elements directly into the WSDL, so that they appear as a single document. This avoids the problem of inaccessible <import> URLs.
See the section of the Spring WS manual which talks about CommonsXsdSchemaCollection.

What should I do with custom Log4j appender dependancies

I've written a custom log4j appender that creates a new Solr document for each log entry and I'm having problems deploying it to JBoss.
The source is viewable on github but the real problem is trying to use the appender from JBoss.
The relevent bits of jboss-log4j.xml look like this:
<appender name="SOLR" class="com.stuartgrimshaw.solrIndexAppender.SolrIndexAppender" />
<root>
<priority value="${jboss.server.log.threshold}"/>
<appender-ref ref="CONSOLE"/>
<appender-ref ref="FILE"/>
<appender-ref ref="SOLR"/>
</root>
The dependencies for Solr are all available in the .war file that's supplied, but I'm guessing that when the appender is initialised quite early on in the boot process, that application hasn't been deployed yet, which is why I see this error in the log:
2009-11-29 10:40:57,715 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Create: name=jboss.system:service=Logging,type=Log4jService state=Configured mode=Manual requiredState=Create
java.lang.NoClassDefFoundError: org/apache/solr/client/solrj/SolrServerException
Is there any way I can delay the initialization till the solr app has been deployed, or is there a way to deploy the Solr app so it's libraries are visible to jboss while it boots?
I think you could either deploy the Solr libs in server/[jboss-configuration]/lib (in JBoss 4 that is, might be the same in newer versions), then they are available at boot time.
Or don't use the JBoss log4j configuration and define your own log4j.xml in your WAR (either in a JAR in lib or in classes). It will be loaded by the application classloader when it is deployed.
As you've discovered, you'd have to put your JAR into the JBoss config's lib directory in order to refer to its types in jboss-log4j.xml, but this is generally not good practise.
A pretty straightward alternative is to invoke the log4j API programmatically from inside your application. If you have a WAR, then define a ServetContextListener (or something similar) which is invoked when the WAR deploys, and which attaches your appender. Similarly, when undeployed, it detaches the appender.
See the answer to this previous question for how to get started doing this.
I am guessing that this is to manage your log files and make them easier to search, a la Splunk???? However, this feels like a fairly odd way of doing this.. kind of the "look, I can make a dog walk on it's hind legs" kind of thing... Cool, but why would you want to?
I think a much simpler, more robust approach is to a) grab Splunk Free Edition! b) have a seperate process that consumes your log files from disk and send them to Solr using Solr4J.
I think requiring Solr, just to do logging adds a huge level of complexity.