Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Associative array

807589Jan 19 2009 — edited Jan 19 2009
Hello,

I have come across this line in a piece of code
ThreadLocal<DiagnosticContext> tl= new ThreadLocal<DiagnosticContext>();

Have not come across this kind of statement in any other java code earlier, but i presumed this shld be an associative array declaration.
Google search did not fetch me resources explaining the associative array like above though I believe the same can be achieved via Maps, Arraylist

So my question is
Whether Java is still using the above one for declaring an associative array?
Can someone please explain the syntax of the above statement? ie How to declare an associative array and use it like above one.

Thank you in advance.

Comments

Kalpataru

Try this

crlf varchar2(2) := chr(10)||chr(13);

it will work.

HamidHelal

What is your database version ?

Did you give privilege SYS UTL_ENCODE,UTL_SMTP and UTL_TCP to the user ? Are you assign the Mail serve port ?

Hamid

Hmusman

i user oracle 10 g and tell me way how to assign privileges to user

Kalpataru

Hi Hmusman,

Which privilege you are talking about.

If you want to give privilege to user connect to sys as sysdba give grant.

grant execute on FSC.SEND_MAIL to scott; <--scott is the username i have taken scott. You change according to your's username.

grant execute on UTL_ENCODE to scott;

grant execute on UTL_SMTP to scott;

grant execute on UTL_TCP to scott;

Hmusman

i use oracle express edition so i cant i find

.SEND_MAIL , UTL_ENCODE, UTL_SMTP, UTL_TCP

HamidHelal

Hmusman wrote:

i use oracle express edition so i cant i find

.SEND_MAIL , UTL_ENCODE, UTL_SMTP, UTL_TCP

This are the content of SYS. I don't remember Oracle XE has this.

Just connect SYS as SYSDBA and

issue

grant execute on UTL_ENCODE to <user_name>;

grant execute on UTL_SMTP to <user_name>;

grant execute on UTL_TCP to <user_name>;


Hope this helps


Hamid

1 - 6
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 16 2009
Added on Jan 19 2009
8 comments
185 views