since ‎07-05-2012
‎10-12-2019
Ove_Lindström
Level 5
Re: JPorifler, YourKit, etc.
Avatar

Ove_Lindström

Ove_Lindström
- Adobe Experience Manager
Hi,first of all, you should not run a profiler on a production environment if you don't have problems that only occure in production. However, you should use a JMX Monitor to log memory usage and such and if you find yourself in trouble that you can't solve in another environment, then push the profiler to the environment. Don't monitor unless you need to.Over the years, I have taken a like in YourKit. It seems to be the one that has the least impact on the system. Some years ago, we got the err...

Views

1.2K

Likes

0

Replies

0
Re: Passing parameters between CQ pages
Avatar

Ove_Lindström

Ove_Lindström
- Adobe Experience Manager
It depends...If you just need to pass a selection, like "show med the cities in the country I selected" - use request parameter or Sling Suffix. This is always the default choice imho.If it is some sort of wizard, like a registration, then use the session or a cookie. That is if you need to be able to resume the flow or go back and forth. Otherwise, use request parameters./Ove

Views

960

Like

1

Replies

0
Re: Extending OSGI Configuration | Different configurations of a service according to the time of the server
Avatar

Ove_Lindström

Ove_Lindström
- Adobe Experience Manager
I think you are looking at the problem from a slightly wrong angle.Your angle is: I need to have ONE service that can do A or B depending on the time.My angle would be: I need a service that can create a task that runs depending on the date-time-pattern.This means that I would create a service factory, and have the instances run depending on a time pattern. Take a look at the Workflow purger. The purger service does not do anything unless you create an instance of a purger task, that is run depe...

Views

1.2K

Likes

0

Replies

0
Re: Why jcr:created property is being changed in case of any activation?
Avatar

Ove_Lindström

Ove_Lindström
- Adobe Experience Manager
This is a common misunderstanding that you are updating the same node on the publisher.What is actually happening is that you are creating a new version of the node when you activate it and on the publisher, you then insert the new node instead of the old one. If you look at the jcr:content of your node in the Publisher, then you will notice the properties jcr:baseVersion, jcr:predecessors and jcr:versionHistory that are all of the type Reference (or Reference array). Take a look at them nodes a...

Views

1.2K

Like

1

Replies

0
Re: Disabling Design mode in CQ author
Avatar

Ove_Lindström

Ove_Lindström
- Adobe Experience Manager
Don't let the users alter the design nodes, just read.http://helpx.adobe.com/experience-manager/kb/CQ53HowToHideCQNavigationButtons.html /Ove

Views

730

Like

1

Replies

0
Re: The type com.book.rental.modal.Book cannot be resolved. It is indirectly referenced from required .class files
Avatar

Ove_Lindström

Ove_Lindström
- Adobe Experience Manager
In the bundle that holds the class com.book.rental.modal.Book, make sure that it is exported in the OSGi-manifest. Otherwise, there is no bundle that will present this class to the system./Ove

Views

694

Likes

0

Replies

0
Re: How do we allow post request to CQ from external sites?
Avatar

Ove_Lindström

Ove_Lindström
- Adobe Experience Manager
This is the CORS-problem (Cross-Origin Resource Sharing)Basically, there are two ways of doing this.1. Have the external domain use a JSONP and implement that interface. (See http://stackoverflow.com/questions/13893361/access-control-allow-origin-localhost).2. You can manipulate on the Access-Control-Allow-Origin header in your response. (See https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS?redirectlocale=en-US&redirectslug=HTTP_access_control)Notice that this is not fully suppo...

Views

875

Likes

0

Replies

0
Re: Granite jQuery UI interferes with site jQuery UI (dialogs etc)
Avatar

Ove_Lindström

Ove_Lindström
- Adobe Experience Manager
dcollie wrote... You need to either "scope" your own jQuery UI CSS, or scope the CQ version. If you choose to scope the CQ version, you need to change "\etc\clientlibs\granite\jquery-ui\css\jquery-ui.css" file. Add the scope of ".cq5jqui" to all the classes. If you continue to have problems, please log a Daycare ticket. Wouldn't it then also be necessary to add that css scope to all the places where AEM is using jquery-ui dialogs? IMHO, that is a bit to intrusive on the author system and I think...

Views

913

Likes

0

Replies

0
Re: Removing values from the cq:tags property using values entered in the text Field inside a Dialog
Avatar

Ove_Lindström

Ove_Lindström
- Adobe Experience Manager
That is exactly what the Sling Post Servlet can do.Attached is a small package I've done for test and education purposes (change the ext to zip). It adds a node /content/geometrixx-media/en/propertytest and 8 subpages that all has the tag Music but only half of the pages has the "wrongly set" Movies (named hastag#). The acceptance criteria is to use a POST to remove the Movies tag. I used curl to post my content, but you can use whatever POST-tool you want.The curl command to remove a tag is:cur...

Views

848

Likes

0

Replies

0
Re: Removing values from the cq:tags property using values entered in the text Field inside a Dialog
Avatar

Ove_Lindström

Ove_Lindström
- Adobe Experience Manager
What you need to do is sending the following information in the request to the metadata to remove is, here removing the tag year/2011:./cq:tags -year/2011 ./cq:tags@Patch true ./cq:tags@TypeHint String[]The magic is in the @TypeHint String[] that tells the SlingPost servlet that it should handle the value as a String array. Without it, it tries to default to just String, since that is what you provide for it./Ove

Views

840

Likes

0

Replies

0
Re: Accessing older versions of web-pages in Publish instance
Avatar

Ove_Lindström

Ove_Lindström
- Adobe Experience Manager
Easiest in this case would actually be to create a rudimentary version handling system using the content system. What you can do is that you create a workflow that whenever a new version of a page is created, it also creates a subpage with the same content and numbering it according to some schedule like incrementaly increasing integer or timestamp. What you then should do is to have the node internally go for the "current" version when you access the page.As I see it, the requirement is not cor...

Views

658

Likes

0

Replies

0
Re: Import page in AEM
Avatar

Ove_Lindström

Ove_Lindström
- Adobe Experience Manager
Hi,when you say "to the same location", have you unpacked the zip, edited, and then re-packed it? Some text editors automatically add .txt when you save so make sure that you have the correct suffix on your files.One thing I have notices is that it perfectly ok to unpack the files and edit it, but if you are on a Windows based system, you need to drop the __MACOSX folder before you repack the zip and I had to touch all the files so that they get "windowsified"./Ove

Views

813

Likes

0

Replies

0
Re: Import page in AEM
Avatar

Ove_Lindström

Ove_Lindström
- Adobe Experience Manager
What that error tells you is quite clear. The file index.html or index.htm needs to be in the root of the zip file. It can't be named anything else and it can't be in a substructure.What does your zip look like?/Ove

Views

802

Likes

0

Replies

0
Re: Which one is best to query the jcr ? Is SQL or JCRSQL2 or JQOM ?
Avatar

Ove_Lindström

Ove_Lindström
- Adobe Experience Manager
SQL is the one that most developers knows and is most likely to get correct. But, some things are not doable.JCR-SQL2 has a lot of power an the ability to do whatever you want in the JCR tree.JQOM is just a Java representation of the JCR-SQL2 and eventually boils down to a SQL2 query. I actually like this one, since I don't have mess around with a lot or String concatenation.Just my $0.02. /Ove

Views

803

Likes

0

Replies

0
Re: Best Approach to get all the pages and their metadata, page properties information into a DB
Avatar

Ove_Lindström

Ove_Lindström
- Adobe Experience Manager
Is this for analysis tool like Coremetrix?The best approach, IMHO, would be to create a workflow that is triggerd on modify (create, update and delete) of a node, check if the change is on a node of the type Page and then write it to the database according to specification. Of course, you need to have a second workflow or service that sends all the pages to the workflow initially as a workflow payload.The question I instantly have to ask is "what is a page"? Is "A page node in AEM" or is it "A U...

Views

709

Likes

0

Replies

0
Re: Change Quickstart Name in CQ5.5
Avatar

Ove_Lindström

Ove_Lindström
- Adobe Experience Manager
What we do is that we have a tag that we quard with the WCM and check if the runmode is a test environment.This tag displays information about the bundles we have deployed on the site, what runmodes that are enabled on the site, if it is an author or publish. All the build information is generated and inserted in the bundles. Then you will see it on the pages and not in the quickstart toggler. Even if the server is started as a service.If I get any spare time, I will add this feature to the ACS ...

Views

710

Likes

0

Replies

0
Re: How journal observation works and where the log got persist ?
Avatar

Ove_Lindström

Ove_Lindström
- Adobe Experience Manager
Jörg Hoh wrote... Why do you want to process the journal data? There is no API to access this data from outside of Jackrabbit/CRX, it's an implementation detail. Jörg I ask the same question as Jörg. Why do you want to analyze the journal? Data masturbation?Ove

Views

708

Likes

0

Replies

0
Re: retrieve random images from JCR
Avatar

Ove_Lindström

Ove_Lindström
- Adobe Experience Manager
Hi,no, the JCR query language does not have any randomizer, but the result set is a collection and you can always use the Java Collections.shuffle(List).A better solution, if you are going to collect from a named path, is to use the http://dev.day.com/docs/en/cq/current/javadoc/org/apache/sling/api/resource/ResourceWrapper.html#getChildren%28%29./Ove

Views

826

Likes

0

Replies

0
Re: How to save the host in the link during url mapping?
Avatar

Ove_Lindström

Ove_Lindström
- Adobe Experience Manager
You should, as much as possible, use relative linking and relative resolving. It should not matter if it is on admin.mysite.com, acc-admin.mysite.com or www.mysite.com or acc-www.mysite.com. Everyone should resolve to the same node. So IMHO, you are doing it the right way. /Ove

Views

663

Likes

0

Replies

0
Re: Inline editing of page tags
Avatar

Ove_Lindström

Ove_Lindström
- Adobe Experience Manager
Hi Scott,no, I am just trying to make the life easier for my authors. We have ended up in creating two components instead of one and inlineing the dialogue that holds the tags so that when you double click on the "tag defining" component, it replaces the text that represents it. So instead of my "card" having the properties of both tags and values, we split it so that the card now consists of card-tag and card-value components./O

Views

1.1K

Likes

0

Replies

0
Inline editing of page tags
Avatar

Ove_Lindström

Ove_Lindström
- Adobe Experience Manager
Hi,I am stuck on a problem where I try to create an inline editing of a tag page property (xtype = tag). Is it even possible to do that so that the editor don't have to go into the page properties to be able to set the tag. To display it, that is easy, but to actually inline edit it?? /Ove

Views

1.1K

Likes

0

Replies

2
Re: The value of allowedParents is not being respected on the component
Avatar

Ove_Lindström

Ove_Lindström
- Adobe Experience Manager
The allowedParents property is an array of paths to the components where defining component can be used. In my understanding, it is not the component name in the page that is defined but the component type. If you do not have a component type that is called /apps/something/something/article then I don't think that is would work.What we have done, when we want paragraps that has restricted set of allowed children is one of two things.1. Define the allowedChildren in the parent type definition suc...

Views

678

Likes

0

Replies

0
Re: Performance of Search Predicates vs SQL2 queries
Avatar

Ove_Lindström

Ove_Lindström
- Adobe Experience Manager
LinearGradient wrote... Thanks for the comment Ove. Just one question: is there anywhere officially indicated that Predicates are converted to SQL 2 queries? Because a colleague of mine thought the reverse is true: that SQL 2 queries are converted to predicates in the backend. Well... converting structured code to SQL2 is easy. Converting text to code... a bit harder.Empirical studies. When I use Predicates, if fires a query, sometimes XPATH, sometimes SQL./O

Views

1.4K

Likes

0

Replies

0
Re: Performance of Search Predicates vs SQL2 queries
Avatar

Ove_Lindström

Ove_Lindström
- Adobe Experience Manager
Short answer: No.Longer answer: No, since the Search Predicates generates SQL2 queries in the backend there are, in theory, no difference. However, my experience is that developers tend to be better in using Predicates in Java code and get better preformance out of those queries than when they use SQL2 directly. My quess is that this is because the fellows that has been writing the Predicates actually know what they are doing and optimize the queries and most of us does not understand SQL2 well ...

Views

1.3K

Likes

0

Replies

0
Re: QueryBuilder's API, p.limit = vs p.limit = 1
Avatar

Ove_Lindström

Ove_Lindström
- Adobe Experience Manager
LinearGradient wrote... Thanks for the reply Ove. But what's the difference between "unlimited with intention" "the default unlimited". And are they documented anywhere? Thanks. Hi,it is more of a way of thinking when you create query languages. There might be limitations set by a connector or something that then honors the default limit notation (0) and if you want to intentionally get everything, regardless of any limitations, then you use the unlimited flag (-1).I have myself done quite a lot...

Views

1.4K

Likes

0

Replies

0
Re: QueryBuilder's API, p.limit = vs p.limit = 1
Avatar

Ove_Lindström

Ove_Lindström
- Adobe Experience Manager
The -1 is used for "unlimited with intention" and the 0 is "the default unlimited". If you use p.limit=, that is the limit of the anwswers you get.That is why only -1 is documented. /Ove

Views

1.3K

Likes

0

Replies

0
Re: how does template script is resolved when a certain page is requested
Avatar

Ove_Lindström

Ove_Lindström
- Adobe Experience Manager
See http://sling.apache.org/documentation/tutorials-how-tos.html/Ove

Views

727

Likes

0

Replies

0
Re: Maven SCR-plugin over version 1.7.4?
Avatar

Ove_Lindström

Ove_Lindström
- Adobe Experience Manager
Hi,no, it turned out to be a "I did more than one change at the time without knowing about it"-error. The faults we got when we changed the maven-scr-plugin was actually due to a Java 7 error. Our mocking framwork needed some extra parameters. Not it seems to be working./Ove

Views

1.0K

Likes

0

Replies

0
Maven SCR-plugin over version 1.7.4?
Avatar

Ove_Lindström

Ove_Lindström
- Adobe Experience Manager
Hi,is there anyone that has used the maven-scr-plugin and the org.apache.felix.scr.annotations higher than 1.7.4 with AEM5.6.1?Whenever I try to step the version of the plugin or the annotation, I get the error "Bad type on operand stack in arraylength". /Ove

Views

1.2K

Like

1

Replies

3
Re: Which is the recommended persistence manager for mid-sized AEM 5.6 project ?
Avatar

Ove_Lindström

Ove_Lindström
- Adobe Experience Manager
Hi,what is "mid-sized"? Number of components? Number of nodes? Number of authors? How will the rest of the system look like? Will you have the need for many author instances? Will there be need for multi-server-hall distributions? Will there be a need for 10 second catastrofy recovery?To many things that are unknown./Ove

Views

642

Like

1

Replies

0