Delivery Status Notification (Failure)
by postmaster@lists.jboss.org
This is an automatically generated Delivery Status Notification.
Unable to deliver message to the following recipients, because the message was forwarded more than the maximum allowed times. This could indicate a mail loop.
8r6jeaeaaaaa(a)technodom.kz
17 years, 10 months
[Installation, Configuration & DEPLOYMENT] - DataSource with JBOSS
by LGWEB
I'm using jboss 4.2 to hibernate as I make my system to integrate with the jboss in the case of transactions'm using hibernate, as a dataSource set for the jboss with hibernate and what. Jar in the classpath need for this?
I do hibernate configuraçaõ follows:
hibernate.cfg.xml
|
| <?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
| "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
| <hibernate-configuration>
| <session-factory name="">
| <property name="connection.url">jdbc:postgresql://localhost:5432/Tcc</property>
| <property name="connection.username">postgres</property>
| <property name="connection.password">512815</property>
| <property name="connection.driver_class">org.postgresql.Driver</property>
| <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
| <property name="hibernate.jdbc.batch_size">20</property>
| <!-- <property name="hibernate.cache.use_query_cache">true</property>
| Exibe no console o SQL gerado pelo hibernate-->
| <property name="show_sql">true</property>
| <mapping class="com.Lgweb.Tcc.Model.Cidade"/>
| <mapping class="com.Lgweb.Tcc.Model.Cliente"/>
| <mapping class="com.Lgweb.Tcc.Model.Condicaopagamento"/>
| <mapping class="com.Lgweb.Tcc.Model.Contaspagar"/>
| <mapping class="com.Lgweb.Tcc.Model.Contasreceber"/>
| <mapping class="com.Lgweb.Tcc.Model.DiascondicaoDias"/>
| <mapping class="com.Lgweb.Tcc.Model.Dias"/>
| <mapping class="com.Lgweb.Tcc.Model.Fornecedor"/>
| <mapping class="com.Lgweb.Tcc.Model.Numeracao"/>
| <mapping class="com.Lgweb.Tcc.Model.Pedido"/>
| <mapping class="com.Lgweb.Tcc.Model.Pedidocompra"/>
| <mapping class="com.Lgweb.Tcc.Model.Itenscompra"/>
| <mapping class="com.Lgweb.Tcc.Model.Itensvenda"/>
| <mapping class="com.Lgweb.Tcc.Model.Perfil"/>
| <mapping class="com.Lgweb.Tcc.Model.Pessoafisica"/>
| <mapping class="com.Lgweb.Tcc.Model.Pessoajuridica"/>
| <mapping class="com.Lgweb.Tcc.Model.Produto"/>
| <mapping class="com.Lgweb.Tcc.Model.Ramoatividade"/>
| <mapping class="com.Lgweb.Tcc.Model.Estado"/>
| <mapping class="com.Lgweb.Tcc.Model.Usuario"/>
| <mapping class="com.Lgweb.Tcc.Model.Formapagamento"/>
| <mapping class="com.Lgweb.Tcc.Model.ProdutoNumeracao"/>
| </session-factory>
| </hibernate-configuration>
|
|
|
hibernateUtil:
| package com.Lgweb.Tcc.Util;
|
| import org.hibernate.Session;
| import org.hibernate.SessionFactory;
| import org.hibernate.cfg.AnnotationConfiguration;
|
| public class HibernateUtil {
| private static final SessionFactory sessionFactory;
| private static final ThreadLocal<Session> threadLocal = new ThreadLocal<Session>();
| static{
| try{
| sessionFactory = new AnnotationConfiguration().configure("hibernate.cfg.xml").buildSessionFactory();
|
| } catch(Throwable t){
| throw new ExceptionInInitializerError(t);
|
| }
| }
|
| public static Session getInstance(){
| Session session = threadLocal.get();
| session = sessionFactory.openSession();
| threadLocal.set(session);
| return session;
| }
|
| public static SessionFactory getSessionFactory() {
| return sessionFactory;
| }
|
| public static ThreadLocal<Session> getThreadLocal() {
| return threadLocal;
| }
|
| }
|
|
|
|
|
|
|
|
What must change in my setup to work in a managed environment, where the JBOSS?
you hugs.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4156386#4156386
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4156386
17 years, 10 months
[JBossWS] - @WebServiceRef for JAX-RPC service?
by tomstrummer
Hi, does the @WebServiceRef annotation work for JAX-RPC services?
I can retrieve and use a service from the InitalContext (so I know it works) but I was hoping to get rid of the JNDI lookup. However if I use @WebServiceRef I just get a NullPointerException. Do I have to do anything fancy in my web.xml in order to enable the annotation scanning? This is all in a servlet.
I'm using JBossAS 4.2.2.GA upgraded to the latest JBossWS client (3.0.1-native-2.0.4.GA)
This doesn't work:
| public class TestServiceServlet extends HttpServlet {
|
| @WebServiceRef(wsdlLocation="META-INF/wsdl/IEnNET.wsdl")
| IEnNETService service;
|
| @Override
| protected void doGet(HttpServletRequest req, HttpServletResponse resp)
| throws ServletException, IOException {
|
| try {
| IEnNET port = service.getIEnNETPort(); // throws NPE
| // ...
|
This does work:
| public class TestServiceServlet extends HttpServlet {
|
| @Override
| protected void doGet(HttpServletRequest req, HttpServletResponse resp)
| throws ServletException, IOException {
|
| try {
| InitialContext ctx = new InitialContext();
| IEnNETService service = (IEnNETService)ctx.lookup("java:comp/env/service/EnNET");
| IEnNET port = service.getIEnNETPort();
|
web.xml looks like this:
| <service-ref>
| <service-ref-name>service/EnNET</service-ref-name>
| <service-interface>com.gridlogix.webservices.IEnNETService</service-interface>
| <wsdl-file>META-INF/wsdl/IEnNET.wsdl</wsdl-file>
| <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
| <port-component-ref>
| <service-endpoint-interface>com.gridlogix.webservices.IEnNET</service-endpoint-interface>
| </port-component-ref>
| </service-ref>
|
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4156382#4156382
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4156382
17 years, 10 months