valcohen
Community profile valcohen Level 2
Job title here
Location here
10 BADGES
Level 2

Level 2

Learn more
Joined the community 01-07-2015 2:16:48 PM
Offline
Top badges earned by valcohen
Customize the badges you want to showcase on your profile
Re: How to get ResourceResolver in a background thread?
Avatar
Give Back 5
Level 2
valcohen
Level 2

Likes

7 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 1
Validate 1
View profile
valcohen
- Adobe Experience Manager
Sorry for the delay, but I finally got it working. A few notes:My initial design was never going to work. I tried to pass the servlet's request.getResourceResolver() down to my worker class and then reference it in the new Thread. But when the servlet then issues a redirect (or any other response) back to the client, the request, and therefore the ResourceResolver, is closed, and the thread throws an exception when trying to use the now-closed resolver.My second attempt was close, but I had @Ref...

Views

3.5K

Likes

0

Replies

0
Re: How to get ResourceResolver in a background thread?
Avatar
Give Back 5
Level 2
valcohen
Level 2

Likes

7 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 1
Validate 1
View profile
valcohen
- Adobe Experience Manager
Julio Tobar Wow, you're fast! I've been playing with a couple of approaches and still no-go, but haven't tried your latest suggestion yet. I'm wrapping up work now -- we have a holiday weekend here -- so I'll get back to this Tuesday morning. I'll let you know how it works out -- thanks very much for all the help!

Views

3.3K

Likes

0

Replies

0
Re: How to get ResourceResolver in a background thread?
Avatar
Give Back 5
Level 2
valcohen
Level 2

Likes

7 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 1
Validate 1
View profile
valcohen
- Adobe Experience Manager
Julio TobarWell , I just tried, but immediately inside the run() method of my Runnable, when I test the resolver I get an exception that says This makes sense to me -- I get the resolver from the request to my servlet. The servlet passes its resolver to my worker class (so far so good, it logs the admin user), but the worker class spawns a new thread and in its run() method the resolver is closed. I think that's by the time the Runnable executes run(), the servlet has already issued its redirect...

Views

3.3K

Likes

0

Replies

0
Re: How to get ResourceResolver in a background thread?
Avatar
Give Back 5
Level 2
valcohen
Level 2

Likes

7 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 1
Validate 1
View profile
valcohen
- Adobe Experience Manager
I'm not downloading from the response; I'm downloading from a separate URL. The flow is:user opens a page with a form from my AEM site, and POSTs the form to my servletservlet converts the form to PDF, sends it to docusign server-side, and gets back a DocuSign redirect URLservlet responds to the request from (1) with a redirect to the URL from (2)the redirect displays the DocuSign form-signing page. When the user completes it, that page GETs my servlet again, with an ID that lets me know where t...

Views

3.3K

Likes

0

Replies

0
Re: How to get ResourceResolver in a background thread?
Avatar
Give Back 5
Level 2
valcohen
Level 2

Likes

7 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 1
Validate 1
View profile
valcohen
- Adobe Experience Manager
Interesting, I'll give it a try and let you know how it works out.

Views

3.3K

Likes

0

Replies

0
How to get ResourceResolver in a background thread?
Avatar
Give Back 5
Level 2
valcohen
Level 2

Likes

7 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 1
Validate 1
View profile
valcohen
- Adobe Experience Manager
I'm working on a solution that receives an HTTP request containing a URL to a file, which I want to download and store in the JCR.So, I have a servlet that receives the request. It spawns a thread so that I can do the download in the background, and then redirects to a confirmation page. This allows me to send the user on their way without waiting while I try to download the file.I can download the file just fine, but I'm having trouble getting a usable ResourceResolver to store the file in the ...

Views

9.4K

Like

1

Replies

10
Re: How to control OSGi dependency injection in AEM?
Avatar
Give Back 5
Level 2
valcohen
Level 2

Likes

7 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 1
Validate 1
View profile
valcohen
- Adobe Experience Manager
rmahendr Yes, I've read that article, and the service ranking info tells me how the framework selects one implementation out of many. What it does not address, and what I'm still seeking, is how to change the service ranking value via configuration rather than by changing an annotation in the Java class. Changing the annotation means re-deploying, and I want to avoid that.From what I can tell, If an @Component has metatype=true, then @Property annotations on fields inside the class generate cont...

Views

6.0K

Likes

0

Replies

0
Re: How to control OSGi dependency injection in AEM?
Avatar
Give Back 5
Level 2
valcohen
Level 2

Likes

7 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 1
Validate 1
View profile
valcohen
- Adobe Experience Manager
That sounds promising -- I looked at ReferenceCardinality but didn't look at ConfigurationPolicy. And, I was hoping to be able to make the service.ranking a property -- that would generate a Felix GUI for it -- but I've only done that on fields within a class, so I didn't think it could be done. Can you sketch out some example code that would show how I would decorate the class to make service.ranking into a property?I have to leave for the day -- I'll take a look back here tomorrow. Thanks for ...

Views

6.0K

Likes

0

Replies

3
Re: How to control OSGi dependency injection in AEM?
Avatar
Give Back 5
Level 2
valcohen
Level 2

Likes

7 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 1
Validate 1
View profile
valcohen
- Adobe Experience Manager
Jorg, thanks, that's interesting -- but in my case, at least for now, I only want a single implementation at a time. I now understand how the impl is selected -- service.ranking if it exists, or a filter, or if none specified, the oldest impl -- but I'm now trying to see how I can change the service.ranking via configuration so I can change it at runtime or based on runmode. I'd really like not to have to recompile and redeploy to change the resolution order.

Views

6.0K

Likes

0

Replies

5
Re: How to control OSGi dependency injection in AEM?
Avatar
Give Back 5
Level 2
valcohen
Level 2

Likes

7 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 1
Validate 1
View profile
valcohen
- Adobe Experience Manager
Thanks, this looks like the right direction: on each implementation class, add@Property(name="service.ranking", intValue=)However, to change the order, I need to change code, rebuild and redeploy. When I add the @Property on the class, I don't see this the service.ranking property in the Felix console. is there any way to see and edit that value in configuration, so I can simply change it in the console, inactivate and reactivate the components or bundle, and have the new value take effect, rath...

Views

6.0K

Likes

0

Replies

0
How to control OSGi dependency injection in AEM?
Avatar
Give Back 5
Level 2
valcohen
Level 2

Likes

7 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 1
Validate 1
View profile
valcohen
- Adobe Experience Manager
I'm trying to understand how dependency injection works in OSGi (specifically Apache Felix as used in AEM). I have a servlet with an `@Reference` annotation on a field that references an interface -- in my case, it represents a secure document signing provider. I have an implementation class that implements the interface, and it's automatically injected into the servlet.In the servlet: @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) private DocumentSigningProvider signingProvider;...

Views

7.6K

Likes

0

Replies

9
Re: What is the difference between Scene7 and Dynamic Media?
Avatar
Give Back 5
Level 2
valcohen
Level 2

Likes

7 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 1
Validate 1
View profile
valcohen
- Adobe Experience Manager
Sandeep, thanks for the extra details!

Views

2.2K

Likes

0

Replies

0
Re: What is the difference between Scene7 and Dynamic Media?
Avatar
Give Back 5
Level 2
valcohen
Level 2

Likes

7 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 1
Validate 1
View profile
valcohen
- Adobe Experience Manager
That's great, I'll check it out -- thanks!

Views

2.1K

Likes

0

Replies

0
Re: What is the difference between Scene7 and Dynamic Media?
Avatar
Give Back 5
Level 2
valcohen
Level 2

Likes

7 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 1
Validate 1
View profile
valcohen
- Adobe Experience Manager
Thanks, Ankhur, that makes sense -- thanks for addressing the difference!

Views

2.1K

Likes

0

Replies

0
Re: What is the difference between Scene7 and Dynamic Media?
Avatar
Give Back 5
Level 2
valcohen
Level 2

Likes

7 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 1
Validate 1
View profile
valcohen
- Adobe Experience Manager
Thanks, I'll read through the upgrade portal. I hope the AEM 6.3 docs get updated soon; the current docs are very confusing. Thanks for running down this info for me!

Views

2.1K

Likes

0

Replies

0
Re: What is the difference between Scene7 and Dynamic Media?
Avatar
Give Back 5
Level 2
valcohen
Level 2

Likes

7 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 1
Validate 1
View profile
valcohen
- Adobe Experience Manager
Sorry, that didn't help at all. While the page you linked to says it's about using Dynamic Media with Experience manager, the recorded session in fact talks about Lazybones and Editable Templates. On top of that, I'm not at all happy about watching videos to get product information; I'd much rather read a document with diagrams and illustrations. Assuming there's another recording that contains the discussion of Dynamic media, is there also a transcript?Can you simply tell me the difference betw...

Views

2.2K

Likes

0

Replies

0
What is the difference between Scene7 and Dynamic Media?
Avatar
Give Back 5
Level 2
valcohen
Level 2

Likes

7 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 1
Validate 1
View profile
valcohen
- Adobe Experience Manager
I'm trying to understand image handling capabilities in AEM and the documentation leaves me more confused than when I started.in the AEM 6.3 docs under Working with Assets there are sections for Adding Scene7 Features and Working with Dynamic Media. The docs indicate that if I enable Scene7 I can't use Dynamic Media, and vice-versa. This implies they are separate products, but the features seem to overlap to a large degree.In the Dynamic Media docs regarding interactive images, there's a pointer...

Views

6.9K

Likes

3

Replies

10
Re: How to emit the server path to the current file?
Avatar
Give Back 5
Level 2
valcohen
Level 2

Likes

7 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 1
Validate 1
View profile
valcohen
- Adobe Experience Manager
I posted this on StackOverflow at aem - How to emit the server path to the current file using Sightly? - Stack Overflow and got a satisfactory answer:Create a JavaScript file that asks Sling for the path to the current file:component-path.js:use( function() { return { "path" : sling.getScript().getScriptResource().getPath() };});Then reference this where needed in the component markup:This results in an HTML comment like One thing to watch out for: the path to the script is relative to the marku...

Views

950

Likes

0

Replies

0
Re: How to emit the server path to the current file?
Avatar
Give Back 5
Level 2
valcohen
Level 2

Likes

7 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 1
Validate 1
View profile
valcohen
- Adobe Experience Manager
Sorry, I should have been more clear. I want a way to automatically inject the path to the current file. I don't want to hard-code it; I want a single snippet of code I can drop into each file that echoes the current path. That way, if I move the file, the comment automatically updates. I did this just the recently -- I refactored a component into smaller fragments, and then a few days later I re-organized the fragments into subfolders and renamed some of them for clarity. If I had hard-coded co...

Views

958

Likes

0

Replies

0
How to emit the server path to the current file?
Avatar
Give Back 5
Level 2
valcohen
Level 2

Likes

7 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 1
Validate 1
View profile
valcohen
- Adobe Experience Manager
I have some components that I've broken into multiple smaller files. The main file includes them using data-sly-include attributes.I'd like to generate HTML comments containing the current filename in both the main file and the included files, so that when I view the rendered output I can easily tell which file generated the output. Something like:... some HTML from the template or other components... This is from the main file This is fromt the first include This is fromt the second include ...

Views

1.9K

Likes

0

Replies

3
Re: <sly> element in <script> tag not evaluating?
Avatar
Give Back 5
Level 2
valcohen
Level 2

Likes

7 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 1
Validate 1
View profile
valcohen
- Adobe Experience Manager
That worked perfectly -- thanks!

Views

1.5K

Likes

0

Replies

0
<sly> element in <script> tag not evaluating?
Avatar
Give Back 5
Level 2
valcohen
Level 2

Likes

7 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 1
Validate 1
View profile
valcohen
- Adobe Experience Manager
I have a problem similar to this one: Sightly in <script> tag not evaluating? In that thread, the problem was that Sightly expressions inside a script element were not being rendered, and the solution was to add @ context = 'scriptString' to the expression.My situation is a slightly different: Inside my HTML script element, I want to put a Sightly element: <sly data-sly-include="availabilitiesTemplate.html"></sly>But the included file is not rendered to the output.I suspect this is also a context problem, but I can't find any docs on setting the contex...

Views

3.3K

Like

1

Replies

2
Re: AEM Search Solution
Avatar
Give Back 5
Level 2
valcohen
Level 2

Likes

7 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 1
Validate 1
View profile
valcohen
- Adobe Experience Manager
@PhilipBae heh, I was at Summit, and I had the opposite impression -- I was afraid Search&Promote was on its way out, since I didn't hear it mentioned once! I guess they're emphasizing the "Target" part of the name. So far we're using it to good effect -- I hope it works out for you.

Views

1.7K

Likes

0

Replies

0
Re: AEM Search Solution
Avatar
Give Back 5
Level 2
valcohen
Level 2

Likes

7 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 1
Validate 1
View profile
valcohen
- Adobe Experience Manager
@PhilipBae, I'll second @karthickky2k4's recommendation to look at Adobe Search and Promote (SnP). We're using it on two sites. I'm not sure what you mean by "search has to go through Publisher", but in our case load on the Publish servers is low and controllable, because it's only hit when indexing content, not when conducting the search or presenting results.We're using SnP to search our product catalog, not (yet) for full-text search of AEM pages. Catalog inventory can change throughout the d...

Views

1.7K

Likes

0

Replies

0
Re: [New] Welcome to AEM Community! Please Introduce Yourself
Avatar
Give Back 5
Level 2
valcohen
Level 2

Likes

7 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 1
Validate 1
View profile
valcohen
- Adobe Experience Manager
Hi all, I'm Val. I'm a web architect at a real estate company in Southern California. I've been doing web development since the mid-90s, and have extensive experience with content management systems of various sizes. We're new to AEM -- after a year-long project, we're about to launch our first pair of websites on AEM 6.1. Looking forward to learning from the experts here!

Views

22.7K

Likes

2

Replies

0