[JBoss Messaging] - Re: Clustering JBoss Messaging without Shared Database?
by ebenezerlovelin
Hi Tim,
I was unable to find the download for 1.4.0.SP3_CP02 and that is why I thought it 1.4.0.SP3 and 1.4.0.SP3_CP02 were the same.
I looked at the http://www.jboss.org/jbossmessaging/downloads/
and I was unable to find the specified version. I even looked for 1.4.1.CR1 and was not able to see it.
Do I have to download the source from somewhere and do a manual build?
Before raising my hand for help, I always like to try things out; this time, I looked at some old posts for example http://jira.jboss.org/jira/browse/JBMESSAGING-1266 and from what Andrei Martchouk told in the last comment
anonymous wrote : Tim, thanks for the very quick fix.
| We build it from subversion and tested, it works very well.
| Are there any chance to get the fix officially included into a community release? Or is it scheduled ONLY for EAP as you mentioned? We use comunity versions , but we prefer to use the official jboss builds.
|
I figured that I had to download the distribution from svn. Therefore, I downloaded JBM 1.4.0.SP3_CP02 version from the svn branch http://anonsvn.jboss.org/repos/messaging/tags/.
After this, in command prompt, I went to the directory where I had downloaded and ran the build file by typing "ant". The result: I have got two directories 1) thirdparty and 2)output.
I am stuck at this point. I would like to build it and get a binary distribution like in 1.4.0.SP3 in the download link http://www.jboss.org/jbossmessaging/downloads/. I would appreciate any help on this.
Thanks,
Ebe
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4159079#4159079
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4159079
17 years, 10 months
[Security & JAAS/JBoss] - Simple Auth for HelloWorld-Example not working...
by j0llyr0g3r
Hey folks,
since my first tries with JAAS and Jboss failed with a complex application, i made a simple HelloWorld application to exclude all possible errors.
My application is really simple:
RMI-client:
| public static void main(String[] args) throws NamingException, RemoteException {
|
| Hashtable<String, String> props = new Hashtable<String, String>();
| props.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
| props.put(Context.PROVIDER_URL,"jnp://sdoesmon:1099");
| Context ctx = new InitialContext(props);
| ISayHello iSayHello = (ISayHello) ctx.lookup("SayHello/SayHello/remote");
| System.out.println("Sending command....");
| String result = iSayHello.sayHello();
| System.out.println("result: " + result);
| }
|
My EJB:
@Stateless
| @Remote
| public class SayHello implements ISayHello {
|
| public String sayHello() {
| return "Yippie! There i am!";
| }
| }
This works like a charm and my client tells me:
Sending command....
| result: Yippie! There i am!
Now i wanted to add JAAS-authentification, so:
* I added the following lines to my client:
| props.put(Context.SECURITY_PRINCIPAL, "admin");
| props.put(Context.SECURITY_CREDENTIALS, "foo");
|
* I added the file users.properties to the directory META-INF of my ejb-subproject:
admin=foo
* I added the file roles.properties to the directory META-INF of my ejb-subproject:
admin=SayHelloRole
* I added the file ejb-jar.xml to the directory META-INF of my ejb-subproject:
| <ejb-jar>
| <enterprise-beans>
| <session>
| <ejb-name>SayHello</ejb-name>
| <security-role-ref>
| <role-name>SayHelloRole</role-name>
| <role-link>SayHelloRole</role-link>
| </security-role-ref>
| </session>
| </enterprise-beans>
| <assembly-descriptor>
| <security-role>
| <description>foo</description>
| <role-name>SayHelloRole</role-name>
| </security-role>
| <method-permission>
| <role-name>SayHelloRole</role-name>
| <method>
| <ejb-name>SayHello</ejb-name>
| <method-name>*</method-name>
| </method>
| </method-permission>
| </assembly-descriptor>
| </ejb-jar>
|
|
* I added the file jboss.xml to the directory META-INF of my project ROOT:
| <jboss>
| <security-domain>java:/jaas/SayHello</security-domain>
| <enterprise-beans>
| <session>
| <ejb-name>SayHello</ejb-name>
| <jndi-name>SayHello</jndi-name>
| </session>
| </enterprise-beans>
| </jboss>
|
So far, so good.....
Finally, i added this to the login-config.xml:
| <application-policy name = "SayHello">
| <authentication>
| <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag = "required">
| <module-option
| name="usersProperties">
| META-INF/users.properties
| </module-option>
| <module-option
| name="rolesProperties">
| META-INF/roles.properties
| </module-option>
| </login-module>
| </authentication>
| </application-policy>
|
|
I hoped this would work, but of course it doesn't, i can connect to my EJB with whatever user i want.
Even if i give the wrong password / user, my client still says:
Sending command....
| result: Yippie! There i am!
Jesus Christ! I don't even know where to start looking for the reason for this behaviour......
I would really appreciate it if somebody could give me a hint what is going wrong here......
What could i do to narrow down what my application is missing?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4159074#4159074
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4159074
17 years, 10 months
[Security & JAAS/JBoss] - difference between security-role-ref and security-role?
by j0llyr0g3r
Hey folks,
since i started to read my Jboss books i am more confused than before.
What is the difference between security-role-ref and security-role?
The books i have do not explain that in an understandable way...
Do i have to use both in my ejb-jar.xml?
Currently i have a configuration like this:
<ejb-jar>
| <enterprise-beans>
| <session>
| <ejb-name>SayHello</ejb-name>
| <security-role-ref>
| <role-name>SayHelloRole</role-name>
| <role-link>SayHelloRole</role-link>
| </security-role-ref>
| </session>
| </enterprise-beans>
| <assembly-descriptor>
| <security-role>
| <description>foooo</description>
| <role-name>SayHelloRole</role-name>
| </security-role>
| <method-permission>
| <role-name>admin</role-name>
| <method>
| <ejb-name>SayHello</ejb-name>
| <method-name>*</method-name>
| </method>
| </method-permission>
| </assembly-descriptor>
| </ejb-jar>
Is this correct? Does it make sense you?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4159070#4159070
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4159070
17 years, 10 months
[Remoting] - Trouble testing EJB's with Client
by Karen.Kramer
I just installed JBoss 4.2.2 GA and was trying to test Beans using a client in Eclipse and getting error messages.
On the server:
java.io.EOFException
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:530)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:373)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
and from LOG:
2008-06-18 13:29:47,935 DEBUG [org.jboss.remoting.transport.socket.ServerThread] WorkerThread#0[127.0.0.1:1550] closing socketWrapper: ServerSocketWrapper[Socket[addr=/127.0.0.1,port=1550,localport=4446].18f7f27]
2008-06-18 13:29:47,935 DEBUG [org.jboss.remoting.transport.socket.ServerSocketWrapper] wrote CLOSING
2008-06-18 13:29:47,935 DEBUG [org.jboss.remoting.transport.socket.SocketWrapper] ServerSocketWrapper[Socket[addr=/127.0.0.1,port=1550,localport=4446].18f7f27] closing
2008-06-18 13:30:20,544 TRACE [org.jboss.remoting.transport.socket.SocketServerInvoker] passed through ServerSocketRefresh.release()
2008-06-18 13:30:20,544 TRACE [org.jboss.remoting.serialization.impl.java.JavaSerializationManager] Creating ObjectOutputStream
2008-06-18 13:30:20,544 TRACE [org.jboss.remoting.serialization.impl.java.JavaSerializationManager] Creating ObjectInputStreamWithClassLoader
2008-06-18 13:30:20,607 DEBUG [org.jboss.remoting.transport.socket.ClientSocketWrapper] reset timeout: 60000
2008-06-18 13:30:20,607 ERROR [org.jboss.remoting.transport.socket.ServerThread] Worker thread initialization failure
In the console of Eclipse I when I run the client:
(socket.SocketClientInvoker 293 ) Got marshalling exception, exiting
java.io.OptionalDataException
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1310)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:128)
at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:66)
at org.jboss.invocation.unified.marshall.InvocationUnMarshaller.read(InvocationUnMarshaller.java:51)
at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:279)
at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
at org.jboss.remoting.Client.invoke(Client.java:525)
I am pointing to all of the jars on the jboss server in the build path of the project that I running the client in so that I am using the same exact jbossall-client.jar.
Snippet from client:
ejbHomeInterface = this.getHomeInterface( jndiName, _class );
interfaceImpl = ejbHomeInterface.getClass();
method = interfaceImpl.getMethod( CREATE, null );
Fails here on the invoke method:
remoteInterface = method.invoke( ejbHomeInterface, null );
I am using jdk1.5.0_06...don't think that matters, does it?
Not using EJB 3, this is part of a conversion from Weblogic 8.1
Any ideas....I've tried everything that I can think of.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4159063#4159063
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4159063
17 years, 10 months