Saturday, 15 February 2014

adobe - session shows null when it uses SlingRepository service, why? -


I created a bundle that deploys in the OSGI container and is now in active status, and provides some services.

And I have another bundle that uses these services and to get the admin prevalaid to create nodes in another service i.e., Slingerpozerry , Apache Jababibit.

The second bundle is to use only the implementation which is written in the first bundle.

For this, the code to run the first bundle to activate the annotation of the second bundle. But when I deploy the second bundle, it shows the null for the session.

  @reference session = repository Login admin administrator (zero); After this, I will try another way in which I will create a square in the first bundle instead of making another for it, i.e., the activator class which implements the bundle activator interface.  

Can you tell me how can I solve this problem?

Can you tell me how can I run the first bundle using the second bundle?

P> Look in advance for your kind reply.

The reference on this type of code is incorrect, but take a look for more information. Examples of

For example, using a @reference to get a slinger repository, you can use it as a starting point.

In addition, you probably do not need a catalyst for this, declaratory services annotations should be sufficient, you will see in the sample.

No comments:

Post a Comment