02. JNDI - start of work with Context interface (1)

  Рет қаралды 23,765

jEdu

jEdu

Күн бұрын

Пікірлер: 13
@ruixue6955
@ruixue6955 6 ай бұрын
3:30 code demo 4:06 (naming) *service provider* configuration 5:28 in this example case, 5:38 specify: use file system as service provider
@PriyankaShinde-mp6lt
@PriyankaShinde-mp6lt 5 жыл бұрын
I have created a topic in jms module in weblogic but while searching with it's jndi name I'm not able to lookup the topic. How to lookup that topic? Thank you..
@ashishburnwal9010
@ashishburnwal9010 5 жыл бұрын
Thank you for clear explanation, I have one question, let say I have a web-app called myApp, and it contains a context.xml. And during deployment the name of the context.xml is automatically changed to myApp.xml. Then how does the context lookup happens, given we are doing it with Context envContext = (Context)initContext.lookup("java:comp/env"); How java:comp/env does all the magic?
@takuntorfred2212
@takuntorfred2212 9 жыл бұрын
Thank you Sir. Good simple practical explanation. Even a novice like me can understand. Thank you.
@thecritique5464
@thecritique5464 10 жыл бұрын
Best explanation of the concept. +1
@galmalachi4859
@galmalachi4859 9 жыл бұрын
thank you very much! very helpful and well explained!
@takuntorfred2212
@takuntorfred2212 9 жыл бұрын
Sir I am using your tutorial to learn jndi. I have set up my code exactly as your own. But when I run it gives a null pointer exception. I am pasting the code below for your review. Please help; Thanks. import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import java.util.*; public class Ctxclass{ public static void main(String[] args) throws NamingException { Hashtable env= new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.fscontext.RefFSContextFactory"); env.put(Context.PROVIDER_URL,"file:/C:/"); Context ctx = new InitialContext(env); Driver xyz = new Driver("princeton", "rav4"); ctx.bind("best driver", xyz);}} import javax.naming.NamingException; import javax.naming.Reference; import javax.naming.Referenceable; import javax.naming.StringRefAddr;           public class Driver implements Referenceable { String name; String model;     Driver(String name, String model) throws NamingException{ this.name = name; this.model = this.model;}     @Override public Reference getReference() throws NamingException { Reference bill = new Reference(Driver.class.getName()); bill.add(new StringRefAddr(name, this.name)); bill.add(new StringRefAddr(model, this.model)); return bill;}} Exception in thread "main" java.lang.NullPointerException at java.util.Hashtable.put(Unknown Source) at com.sun.jndi.fscontext.RefFSContext.addObjectToBindings(RefFSContext.java:517) at com.sun.jndi.fscontext.RefFSContext.bindObject(RefFSContext.java:337) at com.sun.jndi.fscontext.RefFSContext.bind(RefFSContext.java:169) at com.sun.jndi.fscontext.FSContext.bind(FSContext.java:167) at javax.naming.InitialContext.bind(Unknown Source) at Ctxclass.main(Ctxclass.java:22)
@jedu1352
@jedu1352 9 жыл бұрын
Takuntor Fred I'd try working with D:\ partition. Windows can be very tricky and restrictive about creating files at root of C partition.
@takuntorfred2212
@takuntorfred2212 9 жыл бұрын
jEdu Thank you so very much sir. Thank you for responding. I tried your suggestion and it worked perfectly.Thanks. I'm really grateful.
@aaroldaaroldson708
@aaroldaaroldson708 6 жыл бұрын
4:08 We may access the Naming Service with anus service provider??? What are you saying??? Fix your audio or add subs PLEASE!
@WojtekHejna
@WojtekHejna 10 жыл бұрын
Well done!
@svalyavasvalyava9867
@svalyavasvalyava9867 3 жыл бұрын
Thank you!!!
@rallokkcaz
@rallokkcaz 3 жыл бұрын
Oof if you're here now.
03. JNDI - start of work with Context interface (2)
14:24
01. JNDI - introduction
16:10
jEdu
Рет қаралды 76 М.
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН
Enterprise Java Beans - Introduction
5:02
eDewcate
Рет қаралды 214 М.
Google’s Quantum Chip: Did We Just Tap Into Parallel Universes?
9:34
Java ExecutorService - Part 1 - Introduction
10:12
Defog Tech
Рет қаралды 425 М.
Working with EJB3 (EJB Tutorial Part 1)
1:00:59
DevelopIntelligence
Рет қаралды 135 М.
Spring Framework JMS integration Tutorial
44:41
illusionist380
Рет қаралды 210 М.
50 JMS 2.0 Best Practices in 50 Minutes
1:01:43
Parleys
Рет қаралды 10 М.
JVM ( java virtual machine) architecture - tutorial
29:16
Ranjith ramachandran
Рет қаралды 523 М.