Gary Dux

Greenhorn
+ Follow
since Aug 14, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Gary Dux

Hello guys,

for a couple of days i try to configure my jboss-deployment-structure.xml
to use another version of jaxb-imple/jaxb-api in my webservice packaged in an ear/lib.
My main aim is not to change base installation of jboss eap 6.4.0.

I want to solve the problem: https://github.com/javaee/jaxb-v2/issues/890 .

For example for cxf it works but do not work for jaxb.

<jboss-deployment-structure>
<deployment>
<dependencies>
</dependencies>
<exclusions>
<module name="org.apache.cxf"/>
<module name="org.apache.cxf.impl"/>
<module name="javax.xml.bind.api"/>
<module name="com.sun.xml.bind"/>
</exclusions>
</deployment>

<sub-deployment name="my-jboss-webservice.war">
       <dependencies>

       </dependencies>
</sub-deployment>

</jboss-deployment-structure>

I tried also to install jaxb-impl as another module version and added to JBOSS_MODULEPATH

Another configuration of jboss-deployment-structure.xml  do not work also:

<jboss-deployment-structure>
<deployment>
<dependencies>
</dependencies>
<exclusions>
<module name="org.apache.cxf"/>
<module name="org.apache.cxf.impl"/>
<module name="javax.xml.bind.api"/>
<module name="com.sun.xml.bind"/>
</exclusions>
</deployment>

<sub-deployment name="my-jboss-webservice.war">
       <dependencies>
           <module name="javax.xml.bind.api" slot="jaxb-2.2.6"/>
<module name="com.sun.xml.bind" slot="jaxb-2.2.6"/>
       </dependencies>
</sub-deployment>

</jboss-deployment-structure>

Excluding whole webservice subsystem and adding another version was also not succesfull:

<jboss-deployment-structure>
<deployment>
<dependencies>
</dependencies>
<exclude-subsystems>
           <subsystem name="webservices"/>
        </exclude-subsystems>
<exclusions>
<module name="org.apache.cxf"/>
<module name="org.apache.cxf.impl"/>
<module name="javax.xml.bind.api"/>
<module name="com.sun.xml.bind"/>
</exclusions>
</deployment>

<sub-deployment name="my-jboss-webservice.war">
       <dependencies>
            <module name="org.jboss.as.webservices" slot="jaxb-2.2.6"/>
       </dependencies>
</sub-deployment>

</jboss-deployment-structure>

I tried more configurations but it works only if i directly change the jars(jboss-eap-6.4\modules\system\layers\base\com\sun\xml\bind\main) in the jboss installation.

Can somebody help me with this problem?

Regards
Gary
5 years ago
We have some strange Behaviour using a org.springframework.transaction.jta.WebSphereUowTransactionManager.
With org.springframework.transaction.jta.JtaTransactionManager JMSMessages will not redelivered if there take place a transaction rollBack in underlying code.

Our System:

Websphere 8.5.5.5, Spring 4, Hibernate3, Container Managed Transaction Configuration.
JMSMessage Sending:
connection = connectionFactory.createConnection();
session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageProducer publisher = session.createProducer(queue);
publisher.setDeliveryMode(DeliveryMode.NON_PERSISTENT);

JMSMessage recieving over MessageListener by onMessage method

There is no ERROR no RuntimeException no Exception in onMessage method call

The MessageBean is configured:
@TransactionManagement(TransactionManagementType.CONTAINER)
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)

But there is a transaction rollback in underlying code during business logic triggered in onMessage method.

The Question is why working with org.springframework.transaction.jta.JtaTransactionManager there is no redelivering of JMSMessages
and with org.springframework.transaction.jta.WebSphereUowTransactionManager JMSMessages will be redelivered?

By same circumstances(transaction rollback take place in both situations and it is correct and is expected). How can i prevent redelivering in this situation by using org.springframework.transaction.jta.WebSphereUowTransactionManager? Is there a posibility to configure it? Is the only posibillity setting the "Maximum failed deliveries per message" the one solution? (see http://www.ibm.com/developerworks/websphere/techjournal/1407_titheridge/1407_titheridge.html)
8 years ago
Hello together,

in our applications we used to define jndi-mappings in jboss.xml:
<?xml version="1.0" encoding="UTF-8"?>
<jboss>
<enterprise-beans>
<session>
<ejb-name>ContractPortfolioProcessServiceBean</ejb-name>
<jndi-name>com/fja/ipl/customer/ilis/contractportfolio/ContractPortfolioProcessService</jndi-name>
</session>
</enterprise-beans>
</jboss>

ithis jboss.xml was placed then in META-INF of that ejb-jar

So it was easy to lookup for that bean like:

public static ContractPortfolioProcessService lookupContractPortfolioProcessService()
throws NamingException {
final Context context = new InitialContext();
return (ContractPortfolioProcessService ) context.lookup("com/fja/ipl/customer/ilis/contractportfolio/ContractPortfolioProcessService");
}
jndi.properties{
#JBoss
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=jnp://localhost:1099
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
}

How can it be made on JBOSS7?

Due ejb3-spec in JBOSS7 they can also define jboss-ejb3.xml like this:
<jboss:ejb-jar xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:iiop="urn:iiop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd
http://java.sun.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-spec-2_0.xsd
urn:iiop jboss-ejb-iiop_1_0.xsd"
version="3.1"
impl-version="2.0">
<enterprise-beans>
<session>
<ejb-name>CounterBean</ejb-name>
<mapped-name>org/jboss/as/quickstarts/ejb/remote/stateful/CounterBean</mapped-name>
</session>
</enterprise-beans>

<assembly-descriptor>
<iiop:iiop>
<ejb-name>CounterBean</ejb-name>
<iiop:binding-name>org/jboss/as/quickstarts/ejb/remote/stateful/CounterBean</iiop:binding-name>
</iiop:iiop>
</assembly-descriptor>
</jboss:ejb-jar>

It deploys also errorless. But i did not find any dokumentation to lookup my ejb like in example above.

Who can help me giving a hint in this case?

How is the jndi.properties-Configuration would be in this case?




10 years ago
Hello together,

investigating "getting started" for Jboss7 i have an example for an IIOP-Configuration: jboss-as-quickstart-master\jts\application-component-2(https://github.com/jboss-jdf/jboss-as-quickstart)

there i found an jboss-ejb3.xml with configuration:
<?xml version="1.0" encoding="UTF-8"?>
<jboss:ejb-jar xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:iiop="urn:iiop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd
http://java.sun.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-spec-2_0.xsd
urn:iiop jboss-ejb-iiop_1_0.xsd"
version="3.1"
impl-version="2.0">
<assembly-descriptor>
<iiop:iiop>
<ejb-name>CounterBean</ejb-name>
<iiop:binding-name>org/jboss/as/quickstarts/ejb/remote/stateful/CounterBean</iiop:binding-name>
</iiop:iiop>
</assembly-descriptor>
</jboss:ejb-jar>

And the Code calling this EJB from a Container would be like this:
@EJB(lookup = "corbaname:iiop:localhost:3628#org/jboss/as/quickstarts/ejb/remote/stateful/CounterBean")
RemoteCounter counterBean;

My Question is, how would be the jndi.properies or else for the Client like this?

public static RemoteCounter lookupRemoteStatefulCounter() throws NamingException {
final Hashtable jndiProperties = new Hashtable();
jndiProperties.put(Context.URL_PKG_PREFIXES,"org.jboss.ejb.client.naming");

//jndiProperties.put(Context.INITIAL_CONTEXT_FACTORY,"org.jboss.naming.remote.client.InitialContextFactory");
// jndiProperties.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.cosnaming.CNCtxFactory");
//jndiProperties.put(Context.PROVIDER_URL,"corbaloc::localhost:3528/JBoss/Naming/root");
// jndiProperties.put(Context.OBJECT_FACTORIES,"org.jboss.tm.iiop.client.IIOPClientUserTransactionObjectFactory");

final Context context = new InitialContext(jndiProperties);
String iiopJNDI = "corbaname:iiop:localhost:3528#org/jboss/as/quickstarts/ejb/remote/stateful/CounterBean";

return (RemoteCounter) context.lookup(iiopJNDI);
}

My many attempts do not led to any success.

I know there is another way to "lookup" an ejb on Jboss7 but i need it on this way. Please do not come with answer from the same sample-collection(f.e. ejb-remote).








10 years ago
Look at http://www.cmsmatrix.org/

My lead for Java is dotCMS 1.7. I had installed 1.6 was simple.
14 years ago
...i solved the Problem. I use the Version 1.0.1 of JasperReport and they can not set the filefilter at setter way. But if you extend the JRViewer in the same package you can override btnSaveActionPerformed() and that was what i did. In version 3.5.0 you can just configure it by setting the JRSaveContributor's calling the method setSaveContributors(JRSaveContributor[] saveContributors.
14 years ago
Hello Friends,

i mentioned my topic in header allready. Knows somebody a hint for my problem?

How can i disable some file-formats by saving a report.(see screenshot please)

Thanks for any answer.



14 years ago