Using WebLogic Server Embedded LDAP

LDAP is widely used in webapplication for authorization .we have to set embedded weblogic LDAP server for setting up development enviroment.
First question we have – What is LDAP ?

LDAP is Lightweight Directory Access Protocol.LDAP is a protocol for accessing a directory. A directory contains objects; generally those related to users, groups, computers, printers and so on; company structure information (although frankly you can extend it and store anything in there).
LDAP gives you query methods to add, update and remove objects within a directory (and a bunch more, but those are the central ones).

-Connect to a directory (with varying levels of security)
-Read the entries in a directory
-Write entries in a directory
-Search a directory
-Rename entries in a directory
-Delete entries in a directory

IF you are reading about LDAP the you should also know –

what is directory
A directory is a type of hierarchical database. It is made up of entries, that have a globally unique name, and contain attributes that are named collections of data values. directories are optimised for fast look up, they have a strong security model and they scale well. Because they are a tree structure, different parts of the tree can be maintained by different directories and different administrators. The tree data structure also fits some cases much better than a relational database. (BTW – If you’re familiar with relational databases, ldap is conceptually similar to SQL.)

CONNECT TO WEBLOGIC SERVER EMBEDDED LDAP USING LDAP BROWSER-

WebLogic Server includes an embedded LDAP server that acts as the default security provider data store for the Default Authentication, Authorization, Credential Mapping, and Role Mapping providers.embedded LDAP server contains user, group, group membership, security role, security policy, and credential map information. By default, each WebLogic Server domain has an embedded LDAP server configured with the default values set for each type of information. The Default Authentication, Authorization, Credential Mapping, and Role Mapping providers use the embedded LDAP server as their data store.

In the WebLogic Server Administration Console, change the credential for the embedded LDAP server:

Expand Domain > Security > Embedded LDAP.

– In the Credential field, enter the new credential.

– In the Confirm Credential field, enter the new credential again.

– Click Save.

– Restart WebLogic Server.

Now we will be needing the LDAP browser to access it.There are multiple LDAP browser like

– OpenLDap -http://www.openldap.org/
– jxplorer – jxplorer.org

Following is connection parameter as below –

Hostname: Hostname of the WebLogic Server.
Port: WebLogic Admin Server port.
Base DN: This is the WebLogic domain name.
User DN: By default the Admin user DN is cn=Admin.
Password: Admin user password

1 In the LDAP browser, configure a new connection in the LDAP browser:

-Select the QuickConnect tab.

-Set the host field to localhost.

-Set the port field to 7001 (7002 if SSL is being used).

Set the Base DN field to dc=mydomain where mydomain is the name of the WebLogic Server domain you are using.

– Uncheck the Anonymous Bind option.

– Set the User DN field to cn=Admin.

– Set the Password field to the credential you specified in Step 2.

2 Click the new connection.

– Use the LDAP browser to navigate the hierarchy of the embedded LDAP server.

Now You can create users/groups .

Hope it helps ..happy coding with Vinay in techartifact ……

Don’t use managed bean , when you really don’t need it- Use Page Definition Variables in ADF

Requirement – to understand the concept of page variable for storing temporary page value.

Use Case- We have a check box and a table.on checking of checkbox we should show table otherwise we should not show the table.
Normally most of ADF developer will say– oh , its easy, they bind checkbox with managed bean and select the value of it and make visible true and false to table. But , in actual it impacts performance.You really don’t need a managed bean,Why you need to interact with model layer.You don’t need it.
You can create a page variable and store temporary page value.Most people don’t know about it or don’t know how to create it.Today we will discuss this.

i am assuming you have a HR schema and create a table and a checkbox.On checking of checkbox table should be visible.

Go to page definition file of page.Inside executable ,select variable and click insert inside variable like below

Now we will be creating binding for this variable.Click + on binding

Select attributValue and select variable as data source and attribute as Show Table, which we have created earlier.

Now our page defition file will look like this-

Select checkbox and bind value as #{bindings.ShowTable1.inputValue} and make autosubmit to true.
Go to table and put id of selectCheckbox to partial trigger of table.
Thats it .You have’nt used managed bean here. I think its more easy than this.Now run your page first it will look like this

Now Checked the checkbox

You are done.Now you know how to create page defition variable in page.Managed bean will not have less code.. šŸ˜€

Happy coding with Vinay Kumar in Techartifact ….

java.lang.OutOfMemory Java Heap Space error in JDeveloper

Quite annoying error and you don’t know what went wrong.

Well you can resolve by yourself.

First step – Search for ide.conf and jdev.conf in you JDeveloper installation folder like …/jdeveloper/ide/bin/ide.conf

Second step-In ide.conf file, copy extactly these properties into that.
AddVMOption -Xmx940M
AddVMOption -Xms128M

Third Step – In jdev.conf file, make sure the following properties are set exactly the same
AddVMOption -XX:MaxPermSize=356M

Fourth Step – Disable the SVN versioning system that is built into JDeveloper.Uncheck the checkbox for Subversion for example support for GIT

In JDeveloper -> Choose Versioning menu -> Choose Configure -> Uncheck ā€œVersioning support for Subversionā€

Happy learning with Vinay in Techartifact…..