[JBossWS] - Ignore certificate validation in client side (using JBoss4.
by J2EEUser
I want to use https for encryption using only Server side authentication. I created a self-signed certificated and installed it in the server.
In my client side I want to ignore the certificate validation.
I am using Jboss4.0.3sp1 application server and clientside is developed with jboss-axis client (axis-ws4ee.jar).
I tried the following options.
1. Created trustmanager to accept anycertificates and initialized sslcontext with my own trust manager
sample code
======
TrustManager[] trustAllCerts = new TrustManager[] {
new X509TrustManager() {
public java.security.cert.X509Certificate[] getAcceptedIssuers() {return null; }
public void checkClientTrusted(
java.security.cert.X509Certificate[] certs, String authType) {}
public void checkServerTrusted(
java.security.cert.X509Certificate[] certs, String authType) {}
}
} ;
SSLContext context;
context = SSLContext.getInstance("SSL");
HttpsURLConnection.setDefaultSSLSocketFactory(context.getSocketFactory());
============
2. Tried to set the AxisProeprties to sunfaketrustFactory
AxisProperties.setProperty("axis.socketSecureFactory" ,"org.apache.axis.components.net.SunFakeTrustSocketFactory");
None of the above are working.
Looks like SunFakeTrustSocketFactory class was removed in JBoss4.0.3sp1- axis-ws4ee.jar and it was availble in JBoss4.0.2- axis-ws4ee.jar
I need to fix this issue ASAP as our product needs to be released next week.
Any tip will be appreciate.
Thanks in advance,
RR
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041456#4041456
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041456
17 years, 8 months
[JBoss Seam] - Re: Problem by inserting of entities
by music
"Sammy8306" wrote : The answers to those question would depend on the contents of your persistence.xml file, may be you can post that?
Hi,
I also try a lot of things to do in persistance.xml. My persistance.xml look like this:
|
| <?xml version="1.0" encoding="UTF-8"?>
| <persistence xmlns="http://java.sun.com/xml/ns/persistence"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
| version="1.0">
|
| <persistence-unit name="video_library" transaction-type="JTA">
|
| <provider>org.hibernate.ejb.HibernatePersistence</provider>
| <jta-data-source>java:/video_libraryDatasource</jta-data-source>
|
| <properties>
|
| <!-- database connection properties -->
| <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver" />
| <property name="hibernate.connection.url" value="jdbc:hsqldb:./db/" />
| <property name="hibernate.connection.username" value="sa" />
| <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect" />
|
| <!-- JDBC connection pool (use the built-in) -->
| <property name="connection.pool_size" value="5" />
|
| <!-- Enable Hibernate's automatic session context management -->
| <property name="hibernate.current_session_context_class" value="thread" />
|
| <!-- enable OSCacheProvider as second-level cache provider -->
| <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider" />
|
| <!-- use query cache (individual queries should still be cacheable) -->
| <property name="hibernate.cache.use_query_cache" value="true" />
|
| <!-- with this option we can also completely disable second level cache -->
| <property name="hibernate.cache.use_second_level_cache" value="true" />
|
| <!-- force hibernate to cache all data in humanreadable format -->
| <property name="hibernate.cache.use_structured_entries" value="true" />
|
| <!-- Echo all executed SQL to stdout -->
| <property name="show_sql" value="true" />
|
| <!-- preety print of all SQL-Statements -->
| <property name="hibernate.format_sql" value="false" />
|
| <!-- Drop and re-create the database schema on startup -->
| <property name="hbm2ddl.auto" value="create-drop" />
|
| <!-- enable generation of statistics -->
| <property name="hibernate.generate_statistics" value="true" />
|
| <property name="jboss.entity.manager.factory.jndi.name" value="java:/video_libraryEntityManagerFactory"/>
|
| <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup" />
|
|
| </properties>
|
| </persistence-unit>
|
| </persistence>
|
I think that the action "create-drop" should do some stuff for me. At least I have always use it in row hibernate and I have not any problems with existing database.
Thx for responding!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041455#4041455
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041455
17 years, 8 months
[EJB/JBoss] - Accessing Scheduler throgh JNDI
by Nikolajs1968
Hello,
I am choosing curently between TimerService and JBoss Schedulers for running repeated requests with given timeout...
I tried to use JBoss Scheduler with "StartAtStartup" = true, generally haven't found any issues, worked Ok.
The question is - can I start and stop the Scheduler programmatically ? I.e. there is a EJB which I would like to start and stop Scheduler. I assume the start() and stop() methods in org.jboss.varia.scheduler.Scheduler are doing exactly this.
The trouble is, I cannot understand how to access the Scheduler service from my EJB . I need to pass JNDI name to InitialContext, right >
new InitialContext(). lookup( some name here );
the snippet from jboss-service.xml is :
<mbean code="org.jboss.varia.scheduler.Scheduler"
| name=":service=Scheduler,schedule=WSAsyncEJBClient">
| <classpath codebase="deploy/WSAsyncEJBClient" archives="WSAsyncEJBClient.jar"/>
|
| <attribute name="StartAtStartup">false</attribute>
| ...
| </mbean >
|
I wonder if JNDI name should match mbean name, or something else.
Thanks,
Nik
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041451#4041451
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041451
17 years, 8 months
[EJB/JBoss] - Accessing Scheduler throgh JNDI
by Nikolajs1968
Hello,
I am choosing curently between TimerService and JBoss Schedulers for running repeated requests with given timeout...
I tried to use JBoss Scheduler with "StartAtStartup" = true, generally haven't found any issues, worked Ok.
The question is - can I start and stop the Scheduler programmatically ? I.e. there is a EJB which I would like to start and stop Scheduler. I assume the start() and stop() methods in org.jboss.varia.scheduler.Scheduler are doing exactly this.
The trouble is, I cannot understand how to access the Scheduler service from my EJB . I need to pass JNDI name to InitialContext, right >
new InitialContext(). lookup( some name here );
the snippet from jboss-service.xml is :
mbean code="org.jboss.varia.scheduler.Scheduler"
name=":service=Scheduler,schedule=WSAsyncEJBClient">
false
...
</mbean
I wonder if JNDI name should match mbean name, or something else.
Thanks,
Nik
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041450#4041450
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041450
17 years, 8 months
[Clustering/JBoss] - org.jboss.invocation.ServiceUnavailableException: Service un
by gogoasa
Hello,
I have a clustered JBoss installation; on the client side I call a remote SLSB stub using the following jndi configuration :
| java.naming.factory.initial = org.jnp.interfaces.NamingContextFactory
| java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
| java.naming.provider.url=jnp://drogor:1100/,jnp://duparc:1100/
| jnp.partitionName=EntryChainPartition
|
I then kill a node on purpose, in order to see the failover behavior. On the client side I get the following exception.
| java.lang.RuntimeException: org.jboss.invocation.ServiceUnavailableException: Service unavailable (failover not possible inside a user transaction).; nested exception is:
| org.jboss.ha.framework.interfaces.GenericClusteringException:
| This application does not accept remote calls any more
| at fr.bnf.entrychain.jbpm.actions.CallServiceDelegate.execute(CallServiceDelegate.java:66)
|
I don't understand why the failover is not available inside a user transaction -- is it possible to get failover to work ?
Thanks for your ideas.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041444#4041444
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041444
17 years, 8 months