Skip to content

L2p Service Migration v0.4 to v0.5

Jasper Nalbach edited this page Apr 8, 2016 · 7 revisions

Service API changes

Some methods have been added and some methods have been deprecated. These changes may not break your service, but it is good practise to use the new higher level features for permissions checking as described here and here.

Logging

DEPRECATION Logging has been unified in las2peer. Although old methods are still available (but deprecated) please migrate to the new Logger.

Remote Method Invocation

BREAKING CHANGE (in some cases) The service has now two methods for invoking other services: One that sends the UserAgent as calling agent, one that uses the ServiceAgent as calling agent. See Remote Method Invocation for more details. Moreover, you can now specify a service version to be called.

Multiple service versions, Class Loading and Deployment

  • BREAKING CHANGE las2peer now can run multiple versions of the same service at the same time. That means that you need to specify the exact service version in your start scripts since ServiceAgents are now mapped to a specific service version. E.g. you need to start a service using startService('package.serviceClass@1.2.1-123'). See L2pNodeLauncher Commands for details.

  • It is recommended that you put your service jar and all service dependencies that do not belong to the las2peer platform in the "services" folder of the node. A complete tutorial about services and versioning is available here: Dependency Management and Class Loading

  • For more information read also Publish your Service

Misc

  • BREAKING CHANGE UserAgents passed to Node.storeAgent must be unlocked now! Before storing an agent, it has to be unlocked using Agent.unlockPrivateKey(..). This is not the case in many service's jUnit test (as the Template Service).

Build Script

Clone this wiki locally