Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added better examples to the fcrepo-camel component #42

Closed
wants to merge 3 commits into from
Closed

Added better examples to the fcrepo-camel component #42

wants to merge 3 commits into from

Conversation

acoburn
Copy link
Contributor

@acoburn acoburn commented Jan 21, 2015

This addresses https://jira.duraspace.org/browse/FCREPO-1282
(more examples would be a good thing)

added OSGi example
added scala-based example

<package>org.fcrepo.camel.examples.osgi</package>

<!-- Configuration of REST indexing endpoint -->
<restConfiguration component="restlet" port="{{rest.port}}"/>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the {{...}} syntax also get replaced by property values in a similar fashion to ${...}? or does it have some other purpose?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the {{...}} syntax is for property values. The difference is that you can use {{...}} inside a camel context (i.e. in the URIs) while ${...} can only be used outside the camel context (i.e. in a bean definition) -- the property values, however, can all be defined in a single configuration file. The documentation for this is here: http://camel.apache.org/using-propertyplaceholder.html

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tl;dr
the URIs in camel are the main way to configure endpoints, and the camel folks invented a syntax for accessing certain things like headers, exceptions, the body, etc within those URIs like so: ${headers}

This gets in the way of properties which are typically defined in the same way, so this is a means for accessing those, too.

@awoods
Copy link

awoods commented Jan 21, 2015

What are the main differences between the solr-indexer and fcrepo-camel-osgi example projects? When would someone reference one over the other?

@acoburn
Copy link
Contributor Author

acoburn commented Jan 22, 2015

My mistake, the solr-indexer example wasn't supposed to be part of the commit -- it is a half-baked version of fcrepo-camel-osgi

added scala-based example
fixed blueprint placeholder namespace version
updated readme.txt
@awoods
Copy link

awoods commented Jan 22, 2015

Resolved with: 0dbe6b6

@awoods awoods closed this Jan 22, 2015
@acoburn acoburn deleted the more-examples branch January 27, 2015 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants