With AEM as a Cloud Service, which format should be used for the OSGI configuration files?
For AEM as a Cloud Service, the correct format to use for OSGi configuration files is .cfg.json. This format is specifically designed for use in AEM as a Cloud Service and supports both structured and unstructured data, making it versatile for various configuration needs.
Steps to create and deploy OSGi configurations in .cfg.json format:
Create Configuration File: Create a .cfg.json file in your codebase, typically under the apps directory, for example:
/apps/myproject/config/org.apache.sling.commons.log.LogManager.cfg.json
Define Configuration: Add your configuration properties in JSON format:
{
'org.apache.sling.commons.log.level': 'debug',
'org.apache.sling.commons.log.file': 'logs/error.log'
}
Deploy to AEM: Deploy the configuration along with your code package to AEM as a Cloud Service. The configuration will be applied automatically.
A developer is using sling context-aware configuration trying to get the configuration resource using:
This works as intended in author and in publish when logged in lo publish as admin. However this gives a null when run as anonymous. Which method is going to fix the issue?
The issue arises because the anonymous user does not have the necessary read permissions for the /content directory. When using Sling context-aware configurations, access to the configuration resource is required. If the anonymous user lacks read permissions, the configuration cannot be retrieved, resulting in a null value.
To fix this issue, you need to grant read permissions to the anonymous user for the /content directory.
Steps to apply read permissions:
Access CRXDE Lite: Log into your AEM instance and navigate to CRXDE Lite (http://localhost:4502/crx/de).
Navigate to the /content Directory: In the CRXDE Lite interface, browse to the /content directory.
Set Permissions:
Right-click on the /content directory and select 'Permissions'.
Add the anonymous user (if not already present).
Grant read permissions to the anonymous user.
Save Changes: Apply the changes and ensure that they are saved correctly.
Test the Configuration: Log out of the AEM instance and test the context-aware configuration as an anonymous user to ensure that the configuration resource can now be retrieved.
By granting read permissions to the anonymous user for the /content directory, you allow access to the necessary configuration resources, resolving the issue.
A customer is having trouble with some search queries and provides the following information:
* The logs show the following warning occurs many time: WARN* Traversed 1000 nodes with filter Filter (query=select...)
* The client has more than 100,000 stored in their AEM instance
* The client uses a custom page property to help search for pages of a given type
What should the AEM Developer do to help resolve the client's issue?
The warning WARN* Traversed 1000 nodes with filter Filter (query=select...) indicates that the query is performing a traversal instead of using an index. This results in poor performance, especially when the client has a large number of nodes (e.g., more than 100,000).
To resolve this issue, you should create a custom Oak index for the custom page property. This ensures that the queries can leverage the index for efficient data retrieval.
Steps to create a custom Oak index:
Define the Oak Index:
Navigate to the /oak:index node in CRXDE Lite (http://localhost:4502/crx/de).
Create a new node of type oak:QueryIndexDefinition.
Configure the Index:
Set the properties of the new index node to define the indexing rules for the custom page property.
{
'jcr:primaryType': 'oak:QueryIndexDefinition',
'type': 'property',
'propertyNames': ['customPageProperty'],
'reindex': true,
'async': 'async'
}
Deploy and Reindex:
Save the changes and initiate a reindexing process.
Ensure that the reindex flag is set to true for the newly created index.
Validate the Index:
Use the Index Manager or the AEM Web Console to validate that the new index is enabled and functioning correctly.
By creating a custom Oak index for the custom page property, the queries will be optimized to use the index, significantly improving the search performance and resolving the client's issue.
Which practice should be used to push a code fix to make it into the current release candidate?
To push a code fix into the current release candidate, the best practice is to cherry-pick the fix commit into the release candidate branch. Cherry-picking allows you to apply specific changes from one branch to another, ensuring that only the necessary fixes are included without introducing unrelated changes.
Here's how to cherry-pick a commit:
Identify the Commit: Locate the commit hash of the fix you need to apply. This can be found in your version control system (e.g., Git).
Checkout the Release Candidate Branch:
git checkout release-candidate-branch
Cherry-pick the Commit:
git cherry-pick <commit-hash>
Resolve Conflicts (if any): If there are conflicts, resolve them manually and then continue the cherry-pick process:
git add <resolved-files>
git cherry-pick --continue
Test the Changes: Ensure that the changes are tested thoroughly in the release candidate environment to confirm the fix works as expected.
Push the Changes:
git push origin release-candidate-branch
Cherry-picking ensures that only the required changes are applied to the release candidate, maintaining the stability and integrity of the codebase.
What two types of testing are available OOB in AEM Cloud Manager Pipeline? (Select Two.)
Stefan
4 days agoAnnamae
18 days agoKaycee
20 days agoJustine
25 days agoLisbeth
1 months agoMicheline
2 months agoTamar
2 months agoMy
2 months agoKenneth
2 months agoSanjuana
2 months agoEzekiel
2 months agoDewitt
3 months agoGolda
3 months agoEdna
3 months agoNan
3 months agoEzekiel
4 months agoJutta
4 months agoEric
4 months agoMarti
4 months agoCristy
4 months agoShad
5 months agoQuiana
5 months agoGeoffrey
5 months agoShawnda
5 months agoGracia
5 months agoChristiane
6 months agoLinsey
7 months agoVerona
7 months agoGilberto
8 months agoJohnna
8 months agoShelton
8 months agoLilli
8 months agoGerman
8 months agoBurma
9 months ago