Sunday, 30 August 2015

Hybris Certification Questions 2

Hotelwatchdog
1. Which of the following are bad principles of OOD?
Tight coupling of objects for robust code
Tight cohesion of methods for modular approach
Encapsulation of data to enable loose coupling
Naming classes with verbs or doing words like cleanDatabase or VerifyCustomer to make it clear to other developers
2. Examine the following SQL statement
        Select p.code from Product as p where p.p_ean like “%123%”  Which of the following is true??
A plain SQL Query must be used in this case because flexible search doesn’t support the use of aliases (the “as p” clause)  
This is plain SQL and cannot be executed successfully as a valid flexible search query
This is plain SQL but can be executed successfully as a valid flexible search query
This query will fail if Code isn’t declared as an attribute of  Product in the type system (relevant –items.xml) even if the column exists on the Products database table
3. In a development environment, if you wanted to configure a setting to specify a JDBC URL, the best place to put it would be…
The localextensions.xml file in the configuration directory/Eclipse project
The extensioninfo.xml file of you extension
The local.properties file in the configuration directory/Eclipse project
The project.properties file in the platform bin directory

4. To configure a hybris instance to run your e-shop on a different database, which of the following are necessary step?
Specifying the correction parameters, like JDBC driver, which of the following are necessary steps
Checking the items.xml files in any extensions you have created to ensure that all of your item type definitions are compatible with you new database.
Initializing the system, for example by using the hybris Administration Console.
Creating a database for each tenant that you want (e.g. JUNIT) in the new configuration.
5. Examine the following incomplete spring descriptor xml fragment
<bean id=”myservice” class=”de.hybris.plateform.example.DEfaultMyservice” XXX=”tenant”?/>
<property name=”modelservice” ref=”modelservice”/>
<property name=”userservice” ref=”userservice”/>
</bean>
which of the following is true
This bean has a tenant scope which means that you are guaranteed that exactly one instance of the DEfaultMyservicebean will be injected per tenant
This bean has a tenant scope which means that you are guaranteed that exactly one instance of the DEfaultMyservicebean will be injected across all tenants
This bean has a tenant scope whichis the hybris implementation of a prototype scope in spring
This bean has a tenant scope whichis the hybris implementation of a session scope in spring
6. A good reason to use Dynamic Attributes would be
To increase the efficiency of working with large numbers like BigDecimal and Double.
To hold calculated fields for increased efficiency and less database activity.
To implement any non-persistent domain class which is not defined as an item type, and is not mapped to the database.
To implement attributes that are written directly to the database when modified and override the caching mechanism.
7. Which of the following would be good uses for hybris cronjob?
Synchronizing the stock level with external warehouse once per day
Perform an inventory once per week at midnight
Notify the system administrator when the server load passes a critical point
Any task that is not database related, hybris cronjobs are designed to perform Operating system tasks, not database tasks
8. What would a possible solution be if you got  the following error?
AntMacros.xml:94:Error while evaluating file ‘\hybris\config\localextensions.xml’ 
ExtensionInfo file ‘\bin\<directory>\<extensionname>\extensioninfo.xml’ could not be found!
Check the extensions path specified in your \hybris\config/localextensions.xml?
Checking t6hat you need the extensions <extensionname> and if you don’t then removing or commenting out the extension list in the localextensions.xml
Running the clean task in the ant build script to remove unused extension references
Running the extgen ant task to create the extension info.xml file for all referenced extensions
Checking that you need the extension <extensionname> and if you do, then making sure that the extension is a valid project in the specified directory and has a valid extensioninfo.xml
9. In the hybris platform when you write an extension A which has dependency on another extension B which of the following is true?
You must specify that A has dependcy on B using <requires-extension> tag in the localextensions.xml of the configuration or eclipse project
You must specify the dependency on B using <requires-extension> tag in the extensioninfo.xml in the extension A project
You must specify the dependency using the <requires-by> tag  in the locationextensions.xml file in the extension B project
Nothing additional needs to be done, dependencies are automatically resolved by the hybris build tools.
10. Which of the following is true about creating your own cockpit extension?
You can create a new extension using the ycokcpit template
You can reuse functionality from standard hybris cockpits
You cannot create your own cockpit extension
You should create the configuration for all types you wish to manage in the cockpit.xml file in your extension

No comments:

Post a Comment