[JBoss Messaging] - JBoss 5.0.1, how to create new topic
by maxogm
Hello...
I need to create new topic in Jboss 5.0.1 from java applications. Did someone know how to do this.
In Jboss 4.0.1sp1 I do this using next method in Java:
| private void createTopic(String topicName) throws NamingException, InstanceNotFoundException, MBeanException, ReflectionException, IOException {
| Properties props = new Properties();
| props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
| props.put(Context.PROVIDER_URL, "jnp://localhost:1099");
|
| InitialContext iniCtx = new InitialContext(props);
|
| try{
| iniCtx.lookup("topic/" + topicName + "");
| }catch (NameNotFoundException e) {
| ObjectName destinationManager = ObjectNameFactory.create("jboss.mq:service=DestinationManager");
| RMIAdaptor server = null;
| server = (RMIAdaptor) iniCtx.lookup("jmx/invoker/RMIAdaptor");
| server.invoke(destinationManager, "createTopic", new Object[] { topicName, "topic/" + topicName }, new String[] {
| String.class.getName(), String.class.getName() });
| }
| }
|
|
I try to modificate previous code to work with Jboss 5.0.1GA, but I not success. Sorry on very bad English.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4227329#4227329
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4227329
15 years, 7 months
[Beginners Corner] - Re: trouble with greeter example...
by Meghiddo
sorry for multiple replies, I am not seeing a way to edit a post..
I still cant figure this out at all. Im guessing the problem lies in how I added the richfaces library? I dont know.
When I made the project (with eclipse) I got to the third page askin what implementation to use. I chose mojarra which is what I have always used. Then in the component libraries section I added a new one and named it RichFaces.
Should richfaces be a jsf impelmentation like mojarra is? I dot think this is right, RichFaces is just a component library right? I keep trying different combinations though with and without richfaces being a jsf implementation but I am having no luck. STill he same problems every time.
What could be wrong here??
My projects that do not use richfaces work just fine, I can open them on localhost just like always.
Itried addig the code to one of my applications that already does work. WHen I try to open it in my browser here is the first error in the stack:
org.apache.jasper.JasperException: The absolute uri: http://richfaces.org/a4j cannot be resolved in either web.xml or the jar files deployed with this application
I know it must be something I did when first creating the project, I am new to adding libraries.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4227327#4227327
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4227327
15 years, 7 months
[EJB 3.0] - In too deep: JBOSS + JAAS + AJAX
by bacooper81
I'm pretty new to EJB and JBOSS, but I really want to take advantage of all the functionality they provide, including authentication. So I'm building a web app with JAAS, JBOSS and AJAX, and I got it to authenticate a user. The problem is, after it does it forwards the browser to the URL the original request was made to. This is a problem because the original request was an AJAX call to the server, and is only supposed to refresh part of the page. Now its grabbing that little bit of data and showing it on a completely new page. I'm not really sure what to do here. Is there some way I can control what happens after authentication is complete? Or is there a better solution?
Thanks in advance for any help.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4227325#4227325
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4227325
15 years, 7 months
[Installation, Configuration & DEPLOYMENT] - Problems starting jboss on linux when using -b
by QBQ
Hi,
I'm running SUSE Linux Enterprise Server 10 SP2 - 2.6.16.60-0.34 with an instance of JBoss AS 5.0.0.GA. When I was running as root I could run jboss with the -b command, but now that I run su jboss it runs fine until I add the binding param.
Error Trace:
| 2009-04-28 13:47:41,472 DEBUG [org.jboss.invocation.iiop.IIOPInvoker] (main) Starting jboss:service=invoker,type=iiop
| 2009-04-28 13:47:41,502 DEBUG [org.jnp.interfaces.TimedSocketFactory] (main) createSocket, hostAddr: localhost/127.0.0.1, port: 1099, localAddr: null, localPort: 0, timeout: 0
| 2009-04-28 13:47:41,506 DEBUG [org.jnp.interfaces.NamingContext] (main) Failed to connect to localhost:1099
| javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]]
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:311)
| at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1698)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:680)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:673)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at org.jboss.util.naming.Util.createSubcontext(Util.java:70)
| at org.jboss.util.naming.Util.rebind(Util.java:130)
| at org.jboss.util.naming.Util.rebind(Util.java:117)
| at org.jboss.invocation.iiop.IIOPInvoker.startService(IIOPInvoker.java:228)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:322)
| at sun.reflect.GeneratedMethodAccessor106.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
| at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:189)
| at $Proxy36.start(Unknown Source)
| at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
| at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
| at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
| at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
| at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
| at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
| at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
| at org.jboss.system.ServiceController.start(ServiceController.java:460)
| at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:146)
| at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:104)
| at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:45)
| at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
| at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
| at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
| at org.jboss.Main.boot(Main.java:209)
| at org.jboss.Main$1.run(Main.java:547)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:281)
| ... 60 more
| Caused by: java.net.ConnectException: Connection refused
| at java.net.PlainSocketImpl.socketConnect(Native Method)
| at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
| at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
| at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
| at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
| at java.net.Socket.connect(Socket.java:520)
| at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:97)
| at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:82)
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:277)
| ... 60 more
|
|
My start command is
| $JBOSS_HOME/bin/run.sh -c all -b atl1335 -Djava.net.preferIPv4Stack=true -Djboss.messaging.serverPeerId=1
|
I found the suggestion for prefer ipv4 stack from this thread: http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4121889 but it still fails with and without this setting.
our hosts file minus our ip:
| 127.0.0.1 localhost
|
| # special IPv6 addresses
| ::1 localhost ipv6-localhost ipv6-loopback
|
| fe00::0 ipv6-localnet
|
| ff00::0 ipv6-mcastprefix
| ff02::1 ipv6-allnodes
| ff02::2 ipv6-allrouters
| ff02::3 ipv6-allhosts
| *.*.*.* atl1335.abc atl1335
|
|
I've tried chmod 645 and 777 on /etc/hosts with no luck. I've also tried using the ip instead of atl1335
What other suggestions can I try to get the -b part working? Please let me know if you need more info to help.
Thanks!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4227320#4227320
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4227320
15 years, 7 months