[JBoss Seam] - Re: Some philosophy on the context name and access to Java B
by gavin.kingï¼ jboss.com
anonymous wrote : how do we initalize "context variables" appearing in .jsp pages, which do not contain any method or value binding expressions
I don't quite understand what you mean by this. Like a @Factory method or a factory in components.xml?
anonymous wrote : I don't see how the first two would solve my problem, because they only come into the picture, when a seam component gets created
@Create and @Factory are *totally* different to each other. You've misunderstood the Seam docs. @Create is called after a component is created. @Factory is used to auto-initialize the value of a context variable when it is null.
anonymous wrote : Because of that I get the feeling that one should avoid context variables inside of .jsp files and rather use them inside Seam Components.
This is definitely not right.
anonymous wrote : I'm basically looking for a pattern, which helps me to display base data information on .jsp pages, which get directly accessed by bookmarked GET requests, without any GET Parameters.
I still don't understand. You just use "pull-MVC". ie. seam automatically instantiates a component when it is referenced by the JSP. You don't have to do anything.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988287#3988287
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3988287
19Â years, 5Â months
[JBoss Messaging] - Re: where do i need to specify the JNP port which is used fo
by davidrh
Here is the code that we use to connect to a remote JBoss Messaging server:
| Hashtable properties1 = new Hashtable();
| properties1.put(Context.INITIAL_CONTEXT_FACTORY,
| "org.jnp.interfaces.NamingContextFactory");
| properties1.put(Context.URL_PKG_PREFIXES,
| "org.jboss.naming:org.jnp.interfaces");
| properties1.put(Context.PROVIDER_URL, "jnp://remoteserver:1099");
| properties1.put(Context.SECURITY_PRINCIPAL, "admin");
| properties1.put(Context.SECURITY_CREDENTIALS, "admin");
|
| ConnectionFactory connectionFactory1 = null;
|
| try {
| Context context1 = new InitialContext(properties1);
| connectionFactory1 = (ConnectionFactory) context1
| .lookup("ConnectionFactory");
| } catch (NamingException ne) {
| throw new RuntimeException(ne);
| }
|
You should replace remoteserver in the above example with your server name or IP address.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988285#3988285
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3988285
19Â years, 5Â months