aman thind

Ranch Hand
+ Follow
since Jun 29, 2007
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 aman thind

Found the solution. If anybody wants solution, please message me.
Hi,
I have 2 tables Employee and Department. They are connected via a third table Emp_Dept in which employee_Id and department_Id are foreign keys.In hibernate i am managing it through 4 entities.
EmpDeptPK has 2 fields Employee and Department and is an embeddable class.

EmpDept has one field EmpDeptPK as @EmbeddedId.

Employee entity is having
@OneToMany(fetch = FetchType.LAZY)
private Set<EmpDeptc> empDepts = new HashSet<EmpDept>(0);

Now i need to retrieve Employees and their departments if any.
This is my query:
select emp from Employee as emp where emp.employeeName = "abc";

And it is throwing SQLQuery exception saying table employee.employee_employee_Id does not exist.
I think problem is with my mapping. I am using hibernate 3. Any help will be appreciated.

Thanks
Hi,
i need to internationalize a Flex app at run time by taking locale info from the browser. I google and tried but couldn't find a solution. Here is the sample code i am using:




Instead of these buttons i want the browser to provide locale information.
I saw the adobe article/doc on internationalization but couldn't figure out the correct way to do it. Any help would be really appreciated.
Thanks
12 years ago
If anybody is looking for similar thing, i used span and EL to achieve the soln.
13 years ago
Found the soln. I used getElementByTagName("tbody") which is dynamically generated by display tag.
13 years ago
Hi,

I have a display tag in my jsp. When user clicks on a particular row, i was to call a javascript function and check the row selected and perform some functions like changing the look of row and get some data from it and compare with some thing else.

There are a few examples which i found after googling but none of them seems to be working Any idea how to achieve this?

Thanks in advance.

Aman
13 years ago
Hi,

I am using Struts 2 and display tag. I need to display something like this in one column:

From: <startDate> To: <endDAte>.

startDAte and endDate are coming from a DTO. How to achieve this in display tag. I also need to use different id's for startdate and end date column in display tag. Is that possible.

Here is the code i had written earlier using struts and html:

<td >From: <span id="startTimeSpan<s:property value="id"/>"><s:property value="startDate"/></span> - To:
<span id="endTimeSpan<s:property value="id"/>"> <s:property value="endDate"/></span></td>

Here for both spans, i am appending the id value so that id generated is unique.

Thanks in advance.
13 years ago
Thanks. We made some small changes since our composite primary key was a combination of foreign keys but it worked:)
Thanks once again.
Hi All,

We have a table
A(a_id, name) where a_id is primary key
B(b_id, name) where b_id is primary key
C(a_id, b_id) where a_id & b_id are composite key and foreign key to table 'A' & 'B'

We have proper mapping for table 'A' & 'B' in hibernate 3 using annotation.

But we are not sure how to create entity class for table 'C', since it does not have any primary key.
We wanted to know how to map composite foreign key.

Can any one please help us how to create the entity class for table 'C'
I have an itemrenderer which is inside an MDataGrid. Now when user logs in for the first time there will be a "new" image on all the columns. When user clicks/ double clicks any column, the image should get removed from that particular column. I am not able to achieve this. I tried invalidateDisplayList, invalidateList, nothing is working.Please help.


Thanks in advance,
Aman
13 years ago
Hi,I am using Flex to call my web services which are hosted on SSL(on JBoss 4.2). My flex is on local machine. Problem is that when i connect to webservice Flex is saying "wsdl fault"

[FaultEvent fault=[RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Unable to load WSDL."

I have create a crossdomain.xml file and placed it in my jboss-4.2.3.GA\server\default\deploy\jboss-web.deployer\ROOT.war folder.
Here is my crossdomain.xml

<?xml version="1.0"?>

<cross-domain-policy>

<allow-access-from domain="*" to-ports="*" />
<allow-http-request-headers-from domain="*" headers="SOAPAction"/>

</cross-domain-policy>

Can anyone tell me what i could be doing wrong.

Thanks.
13 years ago
Any tutorial/helpful link how to invoke an EJB3 exposed as a webservice on SSL/HTTPS on JBoss 4.2?
I am trying the common stuff available on internet but it's not working for me:(

yeah,i got it.I was missing an annotation @WebContext.You'll need jboss spi wsf jar for this annotation.thanks
13 years ago
Hi,can anyone tell me jar file needed for @TransportGuaranteeDT annotation. I need to expose my ejb3 webservice on https.

Thanks in advance
I am trying to call my EJB exposed as a webservice.I am using EJB3,JBoss 4.2. Here are the related code changes

EJB:

@RemoteBinding(clientBindUrl="sslsocket://0.0.0.0:3843", jndiBinding="StatelessSSL")

Jboss:
jboss-service.xml:
<mbean code="org.jboss.remoting.transport.Connector"
name="jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3">
<depends>jboss.aop:service=AspectDeployer</depends>
<attribute name="InvokerLocator">socket://${jboss.bind.address}:3873</attribute>;
<attribute name="Configuration">
<handlers>
<handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
</handlers>
</attribute>
</mbean>

<mbean code="org.jboss.remoting.transport.Connector"
name="jboss.remoting:type=Connector,transport=socket3843,handler=ejb3">
<depends>jboss.aop:service=AspectDeployer</depends>
<attribute name="InvokerLocator">sslsocket://0.0.0.0:3843</attribute>;
<attribute name="Configuration">
<handlers>
<handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
</handlers>
</attribute>
</mbean>

SERVER.xml
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
keystoreFile="${jboss.server.home.dir}/conf/test.keystore"
keystorePass="changeit" maxThreads="150"
scheme="https" secure="true"
clientAuth="false"
truststoreFile="${jboss.server.home.dir}/conf/test.truststore"
truststorepass="changeit"
sslProtocol="TLS"/>

But it's throwing following exceptions
java.net.ConnectException: Connection refused: connect
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
org.jboss.resource.JBossResourceException: Could not create connection;


I am new to this and don't know if i am missing something.ANy pointers,tutorial will be helpful.

Thanks.
I am using alive pdf to generate a pdf.I am passing the data like follows:
var myGrid:Grid = new Grid ( data,
26,
10,
new RGBColor (0x00CCFF),
new RGBColor (0xFFFFFF),
new RGBColor ( 0x0 ),
false,
new RGBColor(0x000000),
1, Joint.MITER);

and adding to pdf

pdf.addGrid( myGrid , -5, 20);
where
var pdf:PDF = new PDF( Orientation.LANDSCAPE, Unit.MM, Size.A4 );
pdf.setDisplayMode( Display.FULL_PAGE, Layout.SINGLE_PAGE );
pdf.setAutoPageBreak(true,10);

But the pdf being generated is sorting the columns based on their heading's first alphabet. Any way of stopping this autosorting. Any pointers will be appreciated.
Thanks
13 years ago